diff --git a/.gitignore b/.gitignore index 7453d7e4b05bc2e65d5d533f87a385c949a3c246..dde329e20424c0bf93fb7e572bc85a7012b42d78 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -/docs/ _site/ .sass-cache/ .idea diff --git a/_quickstart/steemd_nodes.md b/_quickstart/steemd_nodes.md index 8db2039bf158c191da140811662b2fe387c0667a..985047ac1ce13b5c4401b7b5637cd7860fc55317 100644 --- a/_quickstart/steemd_nodes.md +++ b/_quickstart/steemd_nodes.md @@ -23,8 +23,10 @@ Although `steemd` fully supports WebSockets (`wss://` and `ws://`) public nodes | steemd.privex.io | @privex | | anyx.io | @anyx | + For a report on the latest public full nodes, check the latest posts on [@fullnodeupdate](https://steemit.com/@fullnodeupdate) by [@holger80](https://steemit.com/@holger80). Another excellent tool for checking real-time full node status is [geo.steem.pl](https://geo.steem.pl) by [@jamzed](https://steemit.com/@jamzed). + ### Private Nodes The simplest way to get started is by deploying a pre-built dockerized container. diff --git a/docs/CONTRIBUTING.html b/docs/CONTRIBUTING.html new file mode 100644 index 0000000000000000000000000000000000000000..f024ca63b049644c339a8a98fa4c541edf08d1c9 --- /dev/null +++ b/docs/CONTRIBUTING.html @@ -0,0 +1,427 @@ + + + + + + + + + + + + + + + + + + +Contributors | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+
+

+ + Contributors + + +

+ + + Everyone is welcome to contribute code to Steemit, Inc. projects. We have a Code of Conduct; +we ask that you please follow it in all your interactions with our team and your fellow +contributors. + +Please note that this contributing guide only applies to our development presence. + +## Repositories + +There are currently two repositories that you can contribute to: + +1. Devportal [https://github.com/steemit/devportal](https://github.com/steemit/devportal) +2. Javascript Tutorials [https://github.com/steemit/devportal-tutorials-js](https://github.com/steemit/devportal-tutorials-js) + +All of the repositories have a package.json file included with them with script helpers setup. To use these you will need the following packages installed: + +1. [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/en/) +2. [prettier](https://github.com/prettier/prettier) +3. [eslint](https://eslint.org/) + +These must all be installed in your development environment + +Each of the repositories have the following scripts + +`yarn lint` - performs linting validation on the codebase +`yarn fmt` - executes prettier to format the codebase + +There is also a `precommit` script that will run both of these on committing of code to the repositoriy. + +When contributing to the **DevPortal** all code snippets must be added to the `_includes/` folder since this will be linted on commit. You can also wrap all your code in the tutorial in ``` tags which will force them to be highlighted in the portal. + +## How to contribute + +1. File an issue describing the problem you would like to solve or the feature you would like to add. It saves unnecessary work on your part, in case there's a nontechnical reason we can't accept a particular change. Please note that we can and will _automatically close all pull requests that do not refer to an issue_. +2. Learn the conventions of the project you are submitting code to, even implicit ones, and follow them. In case you have a question about a project's conventions, please ask on the issue you filed. This includes writing tests, formatting code, and documentation. +3. File a pull request against your Github issue and fill out the pull request template. Remember, you are agreeing to license your code and any intellectual property associated with your code under the same terms as the repository you are contributing to. +4. If one of our teammates asks you to make changes, please make them. Our rule is that all requests for changes in code review are resolved in favor of the reviewer. Our teammates follow this rule too! + +## Code of Conduct + +Again, please note that this Code of Conduct _only applies to our development presence_. + +### Our Pledge + +We welcome your membership in our project and community under the rules that we have set below. + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers will work to make your participation in +our project and community as fulfilling as possible. + +### Our Rules + +All members of our project and community must: + +1. Show empathy toward other project and community members +2. Use welcoming and inclusive language +3. Respect differing viewpoints and experiences +4. Gracefully accept constructive criticism + +All members of our project and community must not: + +1. Harm our project and community, or advocate harm to our project and community +2. Insult or make derogatory comments about others +3. Interact with others after they have withdrawn permission to do so + +### Our Responsibilities + +We will use any and all lawful means at our disposal to enforce our rules. This includes +but is not limited to: + +1. Rejecting contributions +2. Removing comments, commits, code, wiki edits, and issues +3. Banning abusers + +We will clarify standards of acceptable behavior and we will take appropriate +and fair corrective action in response to any instances of unacceptable behavior. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting us at github.abuse@steemit.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. We +maintain strict confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +### Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/gg + +
+ +
+ + + + + + + + diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 0000000000000000000000000000000000000000..23d14744ffe976850db204846b174a2d7b347d02 --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,12 @@ +source 'https://rubygems.org' + +gem 'jekyll' +gem 'neatjson' +gem 'rake' +gem 'git' +gem 'steem-ruby' + +group :jekyll_plugins do + gem 'jekyll-seo-tag' + gem 'jekyll-sitemap' +end diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 0000000000000000000000000000000000000000..d2edd20a371632d6115609355cbfd12ce32f93d7 --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,90 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + bitcoin-ruby (0.0.18) + colorator (1.1.0) + concurrent-ruby (1.0.5) + em-websocket (0.5.1) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) + eventmachine (1.2.7) + ffi (1.9.25) + forwardable-extended (2.6.0) + git (1.5.0) + hashie (3.6.0) + http_parser.rb (0.6.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + jekyll (3.8.4) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 0.7) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 2.0) + kramdown (~> 1.14) + liquid (~> 4.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (>= 1.7, < 4) + safe_yaml (~> 1.0) + jekyll-sass-converter (1.5.2) + sass (~> 3.4) + jekyll-seo-tag (2.5.0) + jekyll (~> 3.3) + jekyll-sitemap (1.2.0) + jekyll (~> 3.3) + jekyll-watch (2.0.0) + listen (~> 3.0) + json (2.1.0) + kramdown (1.17.0) + liquid (4.0.1) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + little-plugger (1.1.4) + logging (2.2.2) + little-plugger (~> 1.1) + multi_json (~> 1.10) + mercenary (0.3.6) + multi_json (1.13.1) + neatjson (0.8.4) + pathutil (0.16.1) + forwardable-extended (~> 2.6) + public_suffix (3.0.3) + rake (12.3.1) + rb-fsevent (0.10.3) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + rouge (3.3.0) + ruby_dep (1.5.0) + safe_yaml (1.0.4) + sass (3.6.0) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + steem-ruby (0.9.3) + bitcoin-ruby (~> 0.0, >= 0.0.18) + ffi (~> 1.9, >= 1.9.23) + hashie (~> 3.5, >= 3.5.7) + json (~> 2.1, >= 2.1.0) + logging (~> 2.2, >= 2.2.0) + +PLATFORMS + ruby + +DEPENDENCIES + git + jekyll + jekyll-seo-tag + jekyll-sitemap + neatjson + rake + steem-ruby + +BUNDLED WITH + 1.16.5 diff --git a/docs/LICENSE b/docs/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..3a4a2fb87001991cacad8cad18ce1dde64140012 --- /dev/null +++ b/docs/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 CloudCannon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/docs/Rakefile b/docs/Rakefile new file mode 100644 index 0000000000000000000000000000000000000000..969f6dda75c7ead6f4033bbb88a93b160e2bf772 --- /dev/null +++ b/docs/Rakefile @@ -0,0 +1,184 @@ +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'scrape/api_definitions_job' +require 'scrape/tutorials_job/base' +require 'scrape/tutorials_job/javascript' +require 'scrape/tutorials_job/python' +require 'scrape/tutorials_job/ruby' + +require 'rake/testtask' +require 'net/https' +require 'json' +require 'yaml' + +namespace :scrape do + desc "Scrape steemjs docs" + task :javascript do + + end + + desc "Scrape pysteem docs" + task :python do + end + + desc "Scrape API Definitions" + task :api_defs do + url = ENV.fetch('TEST_NODE', 'https://api.steemit.com') + job = Scrape::ApiDefinitionsJob.new(url: url) + count = job.perform + + puts "Methods added or changed: #{count}" + end + + desc 'Scrape all known tutorial repositories.' + task :tutorials do + puts '=' * 80 + puts "JS-Tutorials:" + Rake::Task["scrape:tutorials:js"].invoke + puts '=' * 80 + puts "PY-Tutorials:" + Rake::Task["scrape:tutorials:py"].invoke + puts '=' * 80 + puts "RB-Tutorials:" + Rake::Task["scrape:tutorials:rb"].invoke + end + + namespace :tutorials do + desc 'Scrape JS-Tutorials' + task :js, [:num, :force] do |t, args| + job = Scrape::TutorialsJob::Javascript.new(num: args[:num], force: args[:force]) + count = job.perform + + puts "Tutorials added or changed: #{count}" + end + + desc 'Scrape PY-Tutorials' + task :py, [:num, :force] do |t, args| + job = Scrape::TutorialsJob::Python.new(num: args[:num], force: args[:force]) + count = job.perform + + puts "Tutorials added or changed: #{count}" + end + + desc 'Scrape RB-Tutorials' + task :rb, [:num, :force] do |t, args| + job = Scrape::TutorialsJob::Ruby.new(num: args[:num], force: args[:force]) + count = job.perform + + puts "Tutorials added or changed: #{count}" + end + end +end + +namespace :production do + task :prevent_dirty_builds do + if `git status --porcelain`.chomp.length > 0 + puts '*** WARNING: You currently have uncommitted changes. ***' + fail 'Build aborted, because project directory is not clean.' unless ENV['ALLOW_DIRTY'] + end + end + + task :build do + sh 'bundle exec jekyll build --destination docs' + end + + task :drop_previous_build do + sh 'git checkout master' + sh 'git rm -rf docs' + sh 'git commit -m "jekyll dropped previous site"' + end + + desc "Deploy current master to GH Pages" + task deploy: [:prevent_dirty_builds, :drop_previous_build, :build] do + sh 'git add -A' + sh 'git commit -m "jekyll base sources"' + sh 'git push origin master' + + exit(0) + end + + desc "Rollback GH Pages" + task rollback: [:prevent_dirty_builds] do + sh 'git checkout master' + sh 'git reset --hard HEAD^' + sh 'git push origin master' + + exit(0) + end +end + +namespace :test do + KNOWN_APIS = %i( + account_by_key_api account_history_api block_api condenser_api + database_api follow_api jsonrpc market_history_api network_broadcast_api + tags_api witness_api + ) + + desc "Tests the curl examples of api definitions. Known APIs: #{KNOWN_APIS.join(' ')}" + task :curl, [:apis] do |t, args| + smoke = 0 + url = ENV.fetch('TEST_NODE', 'https://api.steemit.com') + apis = [args[:apis].split(' ').map(&:to_sym)].flatten if !!args[:apis] + apis ||= KNOWN_APIS + + version = `curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_version", "params":[], "id":1}' #{url}` + version = JSON[version]['result'] + blockchain_version = version['blockchain_version'] + steem_rev = version['steem_revision'][0..5] + fc_rev = version['fc_revision'][0..5] + puts "node: #{url}; blockchain_version: #{blockchain_version}; steem_rev: #{steem_rev}; fc_rev: #{fc_rev}" + + apis.each do |api| + file_name = "_data/apidefinitions/#{api}.yml" + unless File.exist?(file_name) + puts "Does not exist: #{file_name}" + next + end + + yml = YAML.load_file(file_name) + + yml[0]['methods'].each do |method| + print "Testing #{method['api_method']} ... " + + if method['curl_examples'].nil? + puts "no curl examples." + next + end + + method['curl_examples'].each_with_index do |curl_example, index| + response = `curl -s -w \"HTTP_CODE:%{http_code}\" --data '#{curl_example}' #{url}` + response = response.split('HTTP_CODE:') + json = response[0] + code = response[1] + + case code + when '200' + data = JSON[json] + + if !!data['error'] + expected_curl_response = if !!method['expected_curl_responses'] + method['expected_curl_responses'][index] + end + + if !!expected_curl_response && data['error']['message'].include?(expected_curl_response) + print '√' + else + smoke += 1 + print "\n\t#{data['error']['message']}\n" + end + else + print '√' + end + else + smoke += 1 + 'X' + end + end + + print "\n" + end + end + + exit smoke + end +end diff --git a/docs/apidefinitions/account-by-key-api.html b/docs/apidefinitions/account-by-key-api.html new file mode 100644 index 0000000000000000000000000000000000000000..879ae9a804f57f44c879cdb5ad7b0f9e7f8c8d3b --- /dev/null +++ b/docs/apidefinitions/account-by-key-api.html @@ -0,0 +1,362 @@ + + + + + + + + + + + + + + + + + + +Account By Key Api | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

Used to lookup account information based on a key. These AppBase API methods are still under development and subject to change.

+ + +

account_by_key_api.get_key_references

+

Returns all accounts that have the key associated with their owner or active authorities.

+
Query Parameters JSON
+
{"keys": []}
+
+
Expected Response JSON
+
{"accounts": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"account_by_key_api.get_key_references", "params":{"keys":["STM5jZtLoV8YbxCxr4imnbWn61zMB24wwonpnVhfXRmv7j6fk3dTH"]}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/account-history-api.html b/docs/apidefinitions/account-history-api.html new file mode 100644 index 0000000000000000000000000000000000000000..7eae4dd9bc0e31527c1c4eb10068c009766e7ac7 --- /dev/null +++ b/docs/apidefinitions/account-history-api.html @@ -0,0 +1,442 @@ + + + + + + + + + + + + + + + + + + +Account History Api | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

Used to lookup account history information. These AppBase API methods are still under development and subject to change.

+ + +

account_history_api.get_account_history

+

Returns a history of all operations for a given account.

+
Query Parameters JSON
+
{
+  "account": "",
+  "start": "18446744073709551615",
+  "limit": 1000
+}
+
+
Expected Response JSON
+
{"history": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"account_history_api.get_account_history", "params":{"account":"steemit", "start":1000, "limit":1000}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"account_history_api.get_account_history", "params":{"account":"steemit", "start":-1, "limit":10000}, "id":1}' https://api.steemit.com
+
+ +
+ + +

account_history_api.get_ops_in_block

+

Returns all operations contained in a block.

+
Query Parameters JSON
+
{"block_num": 0, "only_virtual": false}
+
+
Expected Response JSON
+
{"ops": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"account_history_api.get_ops_in_block", "params":{"block_num":1,"only_virtual":false}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"account_history_api.get_ops_in_block", "params":{"block_num":5443322,"only_virtual":true}, "id":1}' https://api.steemit.com
+
+ +
+ + +

account_history_api.get_transaction

+

Returns the details of a transaction based on a transaction id.

+
Query Parameters JSON
+
{"id": "0000000000000000000000000000000000000000"}
+
+
Expected Response JSON
+
{
+  "ref_block_num": 0,
+  "ref_block_prefix": 0,
+  "expiration": "1970-01-01T00:00:00",
+  "operations": [],
+  "extensions": [],
+  "signatures": [],
+  "transaction_id": "0000000000000000000000000000000000000000",
+  "block_num": 0,
+  "transaction_num": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"account_history_api.get_transaction", "params":{"id":"6fde0190a97835ea6d9e651293e90c89911f933c"}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/block-api.html b/docs/apidefinitions/block-api.html new file mode 100644 index 0000000000000000000000000000000000000000..fcdcbc2d0616b75ef7a4b9ba102d58d2daa05654 --- /dev/null +++ b/docs/apidefinitions/block-api.html @@ -0,0 +1,462 @@ + + + + + + + + + + + + + + + + + + +Block Api | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

Used to query values related to the block plugin. These AppBase API methods are still under development and subject to change.

+ + +

block_api.get_block

+

Retrieve a full, signed block of the referenced block, or null if no matching block was found.

+ +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + +
block_num (int) 
1Queries the very first block.
8675309Queries block number 8,675,309.
62396745Queries block number 62,396,745.
+ +
Query Parameters JSON
+
{"block_num": 0}
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block", "params":{"block_num":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block", "params":{"block_num":8675309}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block", "params":{"block_num":62396745}, "id":1}' https://api.steemit.com
+
+ +
+ + +

block_api.get_block_header

+

Retrieve a block header of the referenced block, or null if no matching block was found.

+ +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + +
block_num (int) 
1Queries the block headers for the very first block.
8675309Queries block headers for block number 8,675,309.
62396745Queries block headers for block number 62,396,745.
+ +
Query Parameters JSON
+
{"block_num": 0}
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block_header", "params":{"block_num":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block_header", "params":{"block_num":8675309}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block_header", "params":{"block_num":62396745}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/broadcast-ops-comment.html b/docs/apidefinitions/broadcast-ops-comment.html new file mode 100644 index 0000000000000000000000000000000000000000..d96fab2a056010330cf687414a59957aaf9af19c --- /dev/null +++ b/docs/apidefinitions/broadcast-ops-comment.html @@ -0,0 +1,434 @@ + + + + + + + + + + + + + + + + + + +Broadcast Ops Comment | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

This is a brief overview of the parameters allowed and values passed by the ‘comment’ operation in the broadcast API

+ +

Additional info for API definitions is available on the dev portal

+ +

Purpose:

+ +

A broadcast operation on Steem is a way of expressing intention on the blockchain. +It is used to transmit signed transactions to the Steem network.

+ +

There are various broadcast types, in this instance we are focusing specifically on the comment operation. +Each of the broadcast operations have parameters that are passed with the specific method in order to affect the required change to the blockchain. +In other words, the broadcast.comment operation creates a comment or a post (post are also defined as comments) on the Steem blockchain.

+ +

Rules:

+ + +

Parameters:

+ + +

Additional Parameter Definitions:

+ + +

A typical comment operation would look similar to the below:

+ +
  const post = {
+    author :"Joe",
+    title :"A post by Joe",
+    body :"Look at my awesome post",
+    parent_author :'',
+    parent_permlink :"steem",
+    permlink :"a-post-by-joe",
+    json_metadata :"{\"tags\":[\"steemit\",\"example\",\"tags\"]}",
+  };
+
+

In which case the complete broadcast operation would look like this:

+ +
  broadcast.comment(post, privatePostingKey)
+
+

With privatePostingKey being the private posting key of the author broadcasting the comment or post

+ +

Create_vs_Update:

+ +

When a comment is first broadcast, the permlink must be unique for the author. + Otherwise, it is interpreted as an update operation. Updating will either replace the entire body with the latest operation or patch the body if using diff-match-patch.

+ +

For example, if we have a paragraph that has already been broadcast:

+ +

“It’s been quite a lot of fun working with these wonderful folk at Steemit, Inc”

+ +

And we want to change it to:

+ +

“It’s been quite a lot of fun working with these wonderful people at Steemit, Inc”

+ +

We can broadcast the comment operation with the following body:

+ + +

The blockchain will know that this means we have changed the word ‘folk’ to ‘people’ within that paragraph so when fetching this content, this diff will be applied.

+ +

In addition to body, the title and json_metadata fields will also be replaced by the latest operation.

+ +

Comment_Options: LINK

+ +

Updating_Archived_Content:

+ +

Content that is older than 7 days is considered “archived” and cannot be edited unless the author indicates otherwise by broadcasting a custom_json to the witness plugin using their active authority.

+ +

As of HF18, the witness plugin has a custom operation called enable_content_editing that allows a user to signal they want to edit their content. By consensus, content is editable indefinitely, but is soft forked to be frozen after payout. This operation requires an active key and is designed to prevent vandalism if a posting key is compromised.

+ +

For ‘custom_json’: LINK

+ +

Vote: LINK

+ +

It should also be noted that a vote operation can accompany a comment in the same transaction when the author self_upvotes

+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/broadcast-ops.html b/docs/apidefinitions/broadcast-ops.html new file mode 100644 index 0000000000000000000000000000000000000000..73884039de97afde819f5e710565f247789fb9ea --- /dev/null +++ b/docs/apidefinitions/broadcast-ops.html @@ -0,0 +1,2828 @@ + + + + + + + + + + + + + + + + + + +Broadcast Ops | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

An operation on Steem is a way of expressing intention on the blockchain. +They are also known as Broadcast Operations. They have types, like vote +or comment. They pass parameters like author and permlink, depending +on what their purpose is.

+ +

Operations are grouped into transactions and passed as parameters to +methods like network_broadcast_api.broadcast_transaction, in +the operations array. Transactions must be signed in order for the +blockchain to accept them. Here is an example of a transaction that +contains one operation (shown without signatures).

+ +
{
+   "jsonrpc":"2.0",
+   "method":"condenser_api.broadcast_transaction",
+   "params":{
+      "trx":{
+         "ref_block_num":1097,
+         "ref_block_prefix":2181793527,
+         "expiration":"2016-03-24T18:00:21",
+         "operations":[
+            [
+               "vote",
+               {
+                  "voter":"steemit",
+                  "author":"alice",
+                  "permlink":"a-post-by-alice",
+                  "weight":10000
+               }
+            ]
+         ],
+         "extensions":[],
+         "signatures":[]
+      }
+   },
+   "id":1
+}
+
+ +

Also see: Broadcast Transaction

+ + +

+vote + + +

+

This operation is used to cast a vote on a post/comment. The primary +purpose of voting is to express Proof-of-Brain about content to the +blockchain. When a vote is cast, the content is considered in the +consensus rules involving author and curation rewards.

+ +

An upvote can be cast from the point in time that the content is created +up to 6.5 days. The remaining 12 hours are locked out of upvotes at +which time only downvotes may be cast.

+ +

A secondary aspect to voting involves reputation, which is not part of +consensus.

+ +

Reputation Rules:

+
    +
  1. Must have non-negative reputation to effect another user’s reputation.
  2. +
  3. If you are down voting another user, you must have more reputation than them to impact their reputation.
  4. +
+ +

Notes:

+ + +
Roles: posting active owner
+
Parameters: voter author permlink weight
+ +
Example Op:
+ +
[
+  "vote",
+  {
+    "voter": "steemit",
+    "author": "alice",
+    "permlink": "a-post-by-alice",
+    "weight": 10000
+  }
+]
+
+ +
+ + +

+comment + + +

+

Creates a post/comment.

+ +

Notes:

+ + +
Roles: posting active owner
+
Parameters: parent_author parent_permlink author permlink title body json_metadata
+ +
Example Op:
+ +
[
+  "comment",
+  {
+    "parent_author": "",
+    "parent_permlink": "steem",
+    "author": "alice",
+    "permlink": "a-post-by-alice",
+    "title": "A Post By Alice",
+    "body": "This is my post.",
+    "json_metadata": "{\"tags\":[\"steemit\",\"example\",\"tags\"]}"
+  }
+]
+
+ +
+ + +

+transfer + + +

+

Transfers asset from one account to another. The memo is plain-text, +any encryption on the memo is up to a higher level protocol.

+ +

Notes:

+ + +
Roles: active owner
+
Parameters: from to amount memo
+ +
Example Op:
+ +
[
+  "transfer",
+  {
+    "from": "steemit",
+    "to": "alice",
+    "amount": {
+      "amount": "10",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "memo": "Thanks for all the fish."
+  }
+]
+
+ +
+ + +

+transfer_to_vesting + + +

+

This operation converts STEEM into VFS (Vesting Fund Shares) at the +current exchange rate. With this operation it is possible to give +another account vesting shares so that faucets can pre-fund new accounts +with vesting shares.

+ +

Notes:

+ + +
Roles: active owner
+
Parameters: from to amount
+ +
Example Op:
+ +
[
+  "transfer_to_vesting",
+  {
+    "from": "alice",
+    "to": "",
+    "amount": {
+      "amount": "357000",
+      "precision": 3,
+      "nai": "@@000000021"
+    }
+  }
+]
+
+ +
+ + +

+withdraw_vesting + + +

+

At any given point in time an account can be withdrawing from their +vesting shares. A user may change the number of shares they wish to +cash out at any time between 0 and their total vesting stake.

+ +

After applying this operation, vesting_shares will be withdrawn +at a rate of vesting_shares/13 per week for 13 weeks starting +one week after this operation is included in the blockchain.

+ +

This operation is not valid if the user has no vesting shares.

+ +

Notes:

+ + +
Roles: active owner
+
Parameters: account vesting_shares
+ +
Example Op:
+ +
[
+  "withdraw_vesting",
+  {
+    "account": "steemit",
+    "vesting_shares": {
+      "amount": "200000000000",
+      "precision": 6,
+      "nai": "@@000000037"
+    }
+  }
+]
+
+ +
+ + +

+limit_order_create + + +

+

This operation creates a limit order and matches it against existing +open orders. The maximum expiration time for any limit order is 28 days from head_block_time().

+ +
Roles: active owner
+
Parameters: owner orderid amount_to_sell min_to_receive fill_or_kill expiration
+ +
Example Op:
+ +
[
+  "limit_order_create",
+  {
+    "owner": "steemit",
+    "orderid": 10,
+    "amount_to_sell": {
+      "amount": "9950",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "min_to_receive": {
+      "amount": "3500",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "fill_or_kill": false,
+    "expiration": "2035-10-29T06:32:22"
+  }
+]
+
+ +
+ + +

+limit_order_cancel + + +

+

Cancels an order and returns the balance to owner.

+ +
Roles: active owner
+
Parameters: owner orderid
+ +
Example Op:
+ +
[
+  "limit_order_cancel",
+  {"owner": "steemit", "orderid": 10}
+]
+
+ +
+ + +

+price + + +

+ +
Roles: active owner
+
Parameters: base quote
+ +
+ + +

+feed_publish + + +

+

Feeds can only be published by the top N witnesses which are included in +every round and are used to define the exchange rate between steem and +the dollar.

+ +
Roles: active owner
+
Parameters: publisher exchange_rate
+ +
Example Op:
+ +
[
+  "feed_publish",
+  {
+    "publisher": "alice",
+    "exchange_rate": {
+      "base": {
+        "amount": "1000",
+        "precision": 3,
+        "nai": "@@000000013"
+      },
+      "quote": {
+        "amount": "1000000",
+        "precision": 3,
+        "nai": "@@000000021"
+      }
+    }
+  }
+]
+
+ +
+ + +

+convert + + +

+

This operation instructs the blockchain to start a conversion between +STEEM and SBD, the funds are deposited after 3.5 days.

+ +
Roles: active owner
+
Parameters: owner requestid amount
+ +
Example Op:
+ +
[
+  "convert",
+  {
+    "owner": "steemit",
+    "requestid": 1467592156,
+    "amount": {
+      "amount": "5000",
+      "precision": 3,
+      "nai": "@@000000013"
+    }
+  }
+]
+
+ +
+ + +

+account_create + + +

+ +
Roles: active owner
+
Parameters: fee creator new_account_name owner active posting memo_key json_metadata
+ +
Example Op:
+ +
[
+  "account_create",
+  {
+    "fee": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "creator": "steemit",
+    "new_account_name": "alice",
+    "owner": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5b4i9gBqvh4sbgrooXPu2dbGLewNPZkXeuNeBjyiswnu2szgXx",
+          1
+        ]
+      ]
+    },
+    "active": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM7ko5nzqaYfjbD4tKWGmiy3xtT9eQFZ3Pcmq5JmygTRptWSiVQy",
+          1
+        ]
+      ]
+    },
+    "posting": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5xAKxnMT2y9VoVJdF63K8xRQAohsiQy9bA33aHeyMB5vgkzaay",
+          1
+        ]
+      ]
+    },
+    "memo_key": "STM8ZSyzjPm48GmUuMSRufkVYkwYbZzbxeMysAVp7KFQwbTf98TcG",
+    "json_metadata": "{}"
+  }
+]
+
+ +
+ + +

+create_claimed_account + + +

+

When used with claim_account, works identically to account_create. See: Steem 0.20.2 Release Notes

+ +
Roles: active owner
+
Parameters: creator new_account_name owner active posting memo_key json_metadata
+ +
Example Op:
+ +
[
+  "create_claimed_account",
+  {
+    "creator": "steemit",
+    "new_account_name": "alice",
+    "owner": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5b4i9gBqvh4sbgrooXPu2dbGLewNPZkXeuNeBjyiswnu2szgXx",
+          1
+        ]
+      ]
+    },
+    "active": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM7ko5nzqaYfjbD4tKWGmiy3xtT9eQFZ3Pcmq5JmygTRptWSiVQy",
+          1
+        ]
+      ]
+    },
+    "posting": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5xAKxnMT2y9VoVJdF63K8xRQAohsiQy9bA33aHeyMB5vgkzaay",
+          1
+        ]
+      ]
+    },
+    "memo_key": "STM8ZSyzjPm48GmUuMSRufkVYkwYbZzbxeMysAVp7KFQwbTf98TcG",
+    "json_metadata": "{}"
+  }
+]
+
+ +
+ + +

+claim_account + + +

+

When used with create_claimed_account, works identically to account_create. See: Steem 0.20.2 Release Notes

+ +
Roles: active owner
+
Parameters: fee creator extensions
+ +
Example Op:
+ +
[
+  "claim_account",
+  {
+    "fee": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "creator": "steemit",
+    "extensions": []
+  }
+]
+
+ +
+ + +

+witness_set_properties + + +

+

Added in HF20 to replace the witness_update which was not easily extendable. While it is recommended to use witness_set_properties, witness_update will continue to work. See: Witness Parameters

+ +
Roles: block_signing active owner
+
Parameters: owner props extensions
+ +
Example Op:
+ +
[
+  "witness_set_properties",
+  {
+    "owner": "alice",
+    "props": {
+      "account_creation_fee": "0.000 STEEM",
+      "account_subsidy_budget": 10000,
+      "account_subsidy_decay": 330782,
+      "maximum_block_size": 65536,
+      "sbd_interest_rate": "0.000 STEEM",
+      "sbd_exchange_rate": {
+        "base": "0.000 SBD",
+        "quote": "0.000 STEEM"
+      },
+      "url": "68747470733A2F2F737465656D69742E636F6D",
+      "new_signing_key": "25688bbe7b1204f26e40be054c8b2ff1997eec6d4e7be6a105aab8a0e6f11c616d7cb6066"
+    },
+    "extensions": []
+  }
+]
+
+ +
+ + +

+account_update + + +

+ +
Roles: active owner
+
Parameters: account owner active posting memo_key json_metadata
+ +
Example Op:
+ +
[
+  "account_update",
+  {
+    "account": "steemit",
+    "posting": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM6FATHLohxTN8RWWkU9ZZwVywXo6MEDjHHui1jEBYkG2tTdvMYo",
+          1
+        ],
+        [
+          "STM76EQNV2RTA6yF9TnBvGSV71mW7eW36MM7XQp24JxdoArTfKA76",
+          1
+        ]
+      ]
+    },
+    "memo_key": "STM6FATHLohxTN8RWWkU9ZZwVywXo6MEDjHHui1jEBYkG2tTdvMYo",
+    "json_metadata": ""
+  }
+]
+
+ +
+ + +

+report_over_production + + +

+

Disabled in HF4

+ +

This operation is used to report a miner who signs two blocks +at the same time. To be valid, the violation must be reported within +STEEM_MAX_WITNESSES blocks of the head block (1 round) and the +producer must be in the ACTIVE witness set.

+ +

Users not in the ACTIVE witness set should not have to worry about their +key getting compromised and being used to produced multiple blocks so +the attacker can report it and steel their vesting steem.

+ +

The result of the operation is to transfer the full VESTING STEEM balance +of the block producer to the reporter.

+ +
Roles: active owner
+
Parameters: reporter first_block second_block
+ +
+ + +

+witness_update + + +

+

Users who wish to become a witness must pay a fee acceptable to +the current witnesses to apply for the position and allow voting +to begin.

+ +

If the owner isn’t a witness they will become a witness. Witnesses +are charged a fee equal to 1 weeks worth of witness pay which in +turn is derived from the current share supply. The fee is +only applied if the owner is not already a witness.

+ +

If the block_signing_key is null then the witness is removed from +contention. The network will pick the top 21 witnesses for +producing blocks.

+ +

Notes:

+ + +
Roles: active owner
+
Parameters: owner url block_signing_key props fee
+ +
Example Op:
+ +
[
+  "witness_update",
+  {
+    "owner": "alice",
+    "url": "witness-category/my-witness",
+    "block_signing_key": "STM8LoQjQqJHvotqBo7HjnqmUbFW9oJ2theyqonzUd9DdJ7YYHsvD",
+    "props": {
+      "account_creation_fee": {
+        "amount": "100000",
+        "precision": 3,
+        "nai": "@@000000021"
+      },
+      "maximum_block_size": 131072,
+      "sbd_interest_rate": 1000
+    },
+    "fee": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    }
+  }
+]
+
+ +
+ + +

+account_witness_vote + + +

+

All accounts with a VFS (Vesting Fund Shares) can vote for or against +any witness. See: STEEM_MAX_ACCOUNT_WITNESS_VOTES

+ +

If a proxy is specified then all existing votes are removed.

+ +
Roles: active owner
+
Parameters: account witness approve
+ +
Example Op:
+ +
[
+  "account_witness_vote",
+  {
+    "account": "alice",
+    "witness": "bob",
+    "approve": true
+  }
+]
+
+ +
+ + +

+account_witness_proxy + + +

+ +
Roles: active owner
+
Parameters: account proxy
+ +
Example Op:
+ +
[
+  "account_witness_proxy",
+  {"account": "alice", "proxy": "bob"}
+]
+
+ +
+ + +

+pow + + +

+

Disabled in HF14.

+ +
Roles: active owner
+
Parameters: worker input signature work
+ +
Example Op:
+ +
[
+  "pow",
+  {
+    "worker_account": "admin",
+    "block_id": "000004433bd4602cf5f74dbb564183837df9cef8",
+    "nonce": 82,
+    "work": {
+      "worker": "STM65wH1LZ7BfSHcK69SShnqCAH5xdoSZpGkUjmzHJ5GCuxEK9V5G",
+      "input": "59b009f89477919f95914151cef06f28bf344dd6fb7670aca1c1f4323c80446b",
+      "signature": "1f3f83209097efcd01b7d6f27ce726164323d503d6fcf4d55bfb7cb3032796f6766738b36062b5850d69447fdf9c091cbc70825df5eeacc4710a0b11ffdbf0912a",
+      "work": "0b62f4837801cd857f01d6a541faeb13d6bb95f1c36c6b4b14a47df632aa6c92"
+    },
+    "props": {
+      "account_creation_fee": {
+        "amount": "100000",
+        "precision": 3,
+        "nai": "@@000000021"
+      },
+      "maximum_block_size": 131072,
+      "sbd_interest_rate": 1000
+    }
+  }
+]
+
+ +
+ + +

+custom + + +

+

Provides a generic way to add higher level protocols on top of witness +consensus.

+ +

There is no validation for this operation other than that required auths +are valid.

+ +
Roles: active owner
+
Parameters: required_auths id data
+ +
Example Op:
+ +
[
+  "custom",
+  {
+    "required_auths": ["bytemaster"],
+    "id": 777,
+    "data": "0a627974656d617374657207737465656d697402a3d13897d82114466ad87a74b73a53292d8331d1bd1d3082da6bfbcff19ed097029db013797711c88cccca3692407f9ff9b9ce7221aaa2d797f1692be2215d0a5f6d2a8cab6832050078bc5729201e3ea24ea9f7873e6dbdc65a6bd9899053b9acda876dc69f11a13df9ca8b26b6"
+  }
+]
+
+ +
+ + +

+delete_comment + + +

+ +
Roles: posting active owner
+
Parameters: author permlink
+ +
Example Op:
+ +
[
+  "delete_comment",
+  {
+    "author": "alice",
+    "permlink": "a-post-by-alice"
+  }
+]
+
+ +
+ + +

+custom_json + + +

+

Serves the same purpose as custom but also supports required posting +authorities. Unlike custom, this operation is designed to be human +readable/developer friendly.

+ +
follow
+ +

As of HF9, the follow plugin will track follow/unfollow/ignore events.

+ +
reblog
+ +

As of HF14, allows users to share blogs they find with those who follow +them. This change implemented entirely outside the blockchain consensus +which means that reblogging does not create a new post, it merely shares +an existing post with people who follow you.

+ +
witness
+ +

As of HF18, the witness plugin has a custom operation called +enable_content_editing that allows a user to signal they want to edit +their content. By consensus, content is editable indefinitely, but is +soft forked to be frozen after payout. This operation requires an +active key and is designed to prevent vandalism if a posting key is +compromised. #1017

+ +
Roles: posting active owner
+
Parameters: required_auths required_posting_auths id json
+ +
Example Op:
+ +
[
+  "custom_json",
+  {
+    "required_auths": [],
+    "required_posting_auths": ["steemit"],
+    "id": "follow",
+    "json": "[\"follow\",{\"follower\":\"steemit\",\"following\":\"alice\",\"what\":[\"blog\"]}]"
+  }
+]
+
+ +
[
+  "custom_json",
+  {
+    "required_auths": [],
+    "required_posting_auths": ["alice"],
+    "id": "follow",
+    "json": "[\"follow\",{\"follower\":\"alice\",\"following\":\"eve\",\"what\":[\"ignore\"]}]"
+  }
+]
+
+ +
[
+  "custom_json",
+  {
+    "required_auths": [],
+    "required_posting_auths": ["bob"],
+    "id": "reblog",
+    "json": "{\"account\":\"bob\",\"author\":\"alice\",\"permlink\":\"a-post-by-alice\"}"
+  }
+]
+
+ +
[
+  "custom_json",
+  {
+    "required_auths": ["alice"],
+    "required_posting_auths": [],
+    "id": "witness",
+    "json": "[\"enable_content_editing\", {\"account\": \"alice\", \"relock_time\": \"2100-01-01T12:00:00\"}]"
+  }
+]
+
+ +
+ + +

+comment_options + + +

+

Authors of posts may not want all of the benefits that come from creating a post. This +operation allows authors to update properties associated with their post.

+ +

Typically, these options will accompany a comment operation in the same transaction.

+ +

As of HF17, content can specify beneficiaries to receive a part of +their author rewards. The beneficiaries are specified in the extension +field of the comment_options_operation and is a sorted vector (by +account name) of account name, weight pairs. The beneficiaries can only +be specified once and must be specified before any votes are cast on the +comment. Most apps are already adding a comment_options in the +transaction that creates the comment, so this should not be much of a +challenge to add to existing apps.

+ +

Notes:

+ + + +
Roles: posting active owner
+
Parameters: author permlink max_accepted_payout percent_steem_dollars allow_votes allow_curation_rewards extensions
+ +
Example Op:
+ +
[
+  "comment_options",
+  {
+    "author": "alice",
+    "permlink": "a-post-by-alice",
+    "max_accepted_payout": {
+      "amount": "1000000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "percent_steem_dollars": 5000,
+    "allow_votes": true,
+    "allow_curation_rewards": true,
+    "extensions": []
+  }
+]
+
+ +
[
+  "comment_options",
+  {
+    "author": "bob",
+    "permlink": "a-post-with-a-beneficiary",
+    "max_accepted_payout": {
+      "amount": "1000000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "percent_steem_dollars": 63,
+    "allow_votes": true,
+    "allow_curation_rewards": true,
+    "extensions": [
+      [
+        0,
+        {
+          "beneficiaries": [{"account": "charlie", "weight": 1000}]
+        }
+      ]
+    ]
+  }
+]
+
+ +
[
+  "comment_options",
+  {
+    "author": "charlie",
+    "permlink": "a-post-with-multiple-beneficiaries",
+    "max_accepted_payout": {
+      "amount": "1000000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "percent_steem_dollars": 62688,
+    "allow_votes": true,
+    "allow_curation_rewards": true,
+    "extensions": [
+      [
+        0,
+        {
+          "beneficiaries": [
+            {"account": "david", "weight": 500},
+            {"account": "erin", "weight": 500},
+            {"account": "faythe", "weight": 1000},
+            {"account": "frank", "weight": 500}
+          ]
+        }
+      ]
+    ]
+  }
+]
+
+ +
+ + +

+set_withdraw_vesting_route + + +

+

Allows an account to setup a vesting withdraw but with the additional +request for the funds to be transferred directly to another account’s +balance rather than the withdrawing account. In addition, those funds +can be immediately vested again, circumventing the conversion from +vests to steem and back, guaranteeing they maintain their value.

+ +

Notes:

+ + +
Roles: active owner
+
Parameters: from_account to_account percent auto_vest
+ +
Example Op:
+ +
[
+  "set_withdraw_vesting_route",
+  {
+    "from_account": "alice",
+    "to_account": "bob",
+    "percent": 10000,
+    "auto_vest": true
+  }
+]
+
+ +
+ + +

+limit_order_create2 + + +

+

This operation is identical to limit_order_create except it serializes +the price rather than calculating it from other fields. The maximum expiration time for any limit order is 28 days from head_block_time().

+ +
Roles: active owner
+
Parameters: owner orderid amount_to_sell exchange_rate fill_or_kill expiration
+ +
Example Op:
+ +
[
+  "limit_order_create2",
+  {
+    "owner": "alice",
+    "orderid": 492991,
+    "amount_to_sell": {
+      "amount": "1",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "exchange_rate": {
+      "base": {
+        "amount": "1",
+        "precision": 3,
+        "nai": "@@000000013"
+      },
+      "quote": {
+        "amount": "10",
+        "precision": 3,
+        "nai": "@@000000021"
+      }
+    },
+    "fill_or_kill": false,
+    "expiration": "2017-05-12T23:11:13"
+  }
+]
+
+ +
+ + +

+challenge_authority + + +

+

Disabled in HF14.

+ +
Roles: posting active owner
+
Parameters: challenger challenged require_owner
+ +
+ + +

+prove_authority + + +

+ +
Roles: active owner
+
Parameters: challenged require_owner
+ +
+ + +

+request_account_recovery + + +

+

All account recovery requests come from a listed recovery account. This +is secure based on the assumption that only a trusted account should be +a recovery account. It is the responsibility of the recovery account to +verify the identity of the account holder of the account to recover by +whichever means they have agreed upon. The blockchain assumes identity +has been verified when this operation is broadcast.

+ +

This operation creates an account recovery request which the account to +recover has 24 hours to respond to before the request expires and is +invalidated.

+ +

There can only be one active recovery request per account at any one time. +Pushing this operation for an account to recover when it already has +an active request will either update the request to a new new owner authority +and extend the request expiration to 24 hours from the current head block +time or it will delete the request. To cancel a request, simply set the +weight threshold of the new owner authority to 0, making it an open authority.

+ +

Additionally, the new owner authority must be satisfiable. In other words, +the sum of the key weights must be greater than or equal to the weight +threshold.

+ +

This operation only needs to be signed by the the recovery account. +The account to recover confirms its identity to the blockchain in +the recover account operation.

+ +

Notes:

+ + + +

See: #169

+ +
Roles: active owner
+
Parameters: recovery_account account_to_recover new_owner_authority extensions
+ +
Example Op:
+ +
[
+  "request_account_recovery",
+  {
+    "recovery_account": "steem",
+    "account_to_recover": "alice",
+    "new_owner_authority": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM6LYxj96zdypHYqgDdD6Nyh2NxerN3P1Mp3ddNm7gci63nfrSuZ",
+          1
+        ]
+      ]
+    },
+    "extensions": []
+  }
+]
+
+ +
+ + +

+recover_account + + +

+ +
Roles: owner
+
Parameters: account_to_recover new_owner_authority recent_owner_authority extensions
+ +
Example Op:
+ +
[
+  "recover_account",
+  {
+    "account_to_recover": "alice",
+    "new_owner_authority": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM7j3nhkhHTpXqLEvdx2yEGhQeeorTcxSV6WDL2DZGxwUxYGrHvh",
+          1
+        ]
+      ]
+    },
+    "recent_owner_authority": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM78Xth94gNxp8nmByFV2vNAhg9bsSdviJ6fQXUTFikySLK3uTxC",
+          1
+        ]
+      ]
+    },
+    "extensions": []
+  }
+]
+
+ +
+ + +

+change_recovery_account + + +

+

Each account lists another account as their recovery account. +The recovery account has the ability to create account_recovery_requests +for the account to recover. An account can change their recovery account +at any time with a 30 day delay. This delay is to prevent +an attacker from changing the recovery account to a malicious account +during an attack. These 30 days match the 30 days that an +owner authority is valid for recovery purposes.

+ +

On account creation the recovery account is set either to the creator of +the account (The account that pays the creation fee and is a signer on the transaction) +or to the empty string if the account was mined. An account with no recovery +has the top voted witness as a recovery account, at the time the recover +request is created. Note: This does mean the effective recovery account +of an account with no listed recovery account can change at any time as +witness vote weights. The top voted witness is explicitly the most trusted +witness according to stake.

+ +

See: #169

+ +
Roles: owner
+
Parameters: account_to_recover new_recovery_account extensions
+ +
Example Op:
+ +
[
+  "change_recovery_account",
+  {
+    "account_to_recover": "alice",
+    "new_recovery_account": "bob",
+    "extensions": []
+  }
+]
+
+ +
+ + +

+escrow_transfer + + +

+

The purpose of this operation is to enable someone to send money +contingently to another individual. The funds leave the from account +and go into a temporary balance where they are held until from +releases it to to or to refunds it to from.

+ +

In the event of a dispute the agent can divide the funds between the +to/from account. Disputes can be raised any time before or on the +dispute deadline time, after the escrow has been approved by all +parties.

+ +

This operation only creates a proposed escrow transfer. Both the agent +and to must agree to the terms of the arrangement by approving the +escrow.

+ +

The escrow agent is paid the fee on approval of all parties. It is up to +the escrow agent to determine the fee.

+ +

Escrow transactions are uniquely identified by from and escrow_id, +the escrow_id is defined by the sender.

+ +

See: steem_operations.hpp:229

+ +
Roles: active owner
+
Parameters: from to agent escrow_id sbd_amount steem_amount fee ratification_deadline escrow_expiration json_meta
+ +
Example Op:
+ +
[
+  "escrow_transfer",
+  {
+    "from": "alice",
+    "to": "bob",
+    "sbd_amount": {
+      "amount": "1000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "steem_amount": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "escrow_id": 23456789,
+    "agent": "charlie",
+    "fee": {
+      "amount": "100",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "json_meta": "{}",
+    "ratification_deadline": "2017-02-26T11:22:39",
+    "escrow_expiration": "2017-02-28T11:22:39"
+  }
+]
+
+ +
+ + +

+escrow_dispute + + +

+

If either the sender or receiver of an escrow payment has an issue, they +can raise it for dispute. Once a payment is in dispute, the agent has +authority over who gets what.

+ +

See: steem_operations.hpp:229

+ +
Roles: active owner
+
Parameters: from to agent who escrow_id
+ +
Example Op:
+ +
[
+  "escrow_dispute",
+  {
+    "from": "alice",
+    "to": "bob",
+    "agent": "charlie",
+    "who": "alice",
+    "escrow_id": 72526562
+  }
+]
+
+ +
+ + +

+escrow_release + + +

+

This operation can be used by anyone associated with the escrow transfer +to release funds if they have permission.

+ +

The permission scheme is as follows:

+ + +

See: steem_operations.hpp:229

+ +
Roles: active owner
+
Parameters: from to agent who receiver escrow_id sbd_amount steem_amount
+ +
Example Op:
+ +
[
+  "escrow_release",
+  {
+    "from": "alice",
+    "to": "bob",
+    "agent": "charlie",
+    "who": "charlie",
+    "receiver": "bob",
+    "escrow_id": 72526562,
+    "sbd_amount": {
+      "amount": "5000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "steem_amount": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    }
+  }
+]
+
+ +
+ + +

+pow2 + + +

+

Disabled in HF17.

+
Roles: active owner
+
Parameters: input pow_summary
+ +
Example Op:
+ +
[
+  "pow2",
+  {
+    "work": [
+      0,
+      {
+        "input": {
+          "worker_account": "alice",
+          "prev_block": "003ea604345523c344fbadab605073ea712dd76f",
+          "nonce": "1052853013628665497"
+        },
+        "pow_summary": 3817904373
+      }
+    ],
+    "props": {
+      "account_creation_fee": {
+        "amount": "1",
+        "precision": 3,
+        "nai": "@@000000021"
+      },
+      "maximum_block_size": 131072,
+      "sbd_interest_rate": 1000
+    }
+  }
+]
+
+ +
+ + +

+escrow_approve + + +

+

The agent and to accounts must approve an escrow transaction for it to +be valid on the blockchain. Once a party approves the escrow, they +cannot revoke their approval. Subsequent escrow approve operations, +regardless of the approval, will be rejected.

+ +

See: steem_operations.hpp:229

+ +
Roles: active owner
+
Parameters: from to agent who escrow_id approve
+ +
Example Op:
+ +
[
+  "escrow_approve",
+  {
+    "from": "alice",
+    "to": "bob",
+    "agent": "charlie",
+    "who": "charlie",
+    "escrow_id": 59102208,
+    "approve": true
+  }
+]
+
+ +
+ + +

+transfer_to_savings + + +

+

For time locked savings accounts. A user can place Steem and Steem +Dollars into time locked savings balances. Funds can be withdrawn from +these balances after a three day delay. The point of this addition is to +mitigate loss from hacked and compromised account. The max a user can +lose instantaneously is the sum of what the hold in liquid balances. +Assuming an account can be recovered quickly, loss in such situations +can be kept to a minimum.

+ +

See: steem_operations.hpp:868

+ +
Roles: active owner
+
Parameters: from to amount memo
+ +
Example Op:
+ +
[
+  "transfer_to_savings",
+  {
+    "from": "alice",
+    "to": "alice",
+    "amount": {
+      "amount": "1000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "memo": ""
+  }
+]
+
+ +
+ + +

+transfer_from_savings + + +

+ +
Roles: active owner
+
Parameters: from request_id to amount memo
+ +
Example Op:
+ +
[
+  "transfer_from_savings",
+  {
+    "from": "alice",
+    "request_id": 101,
+    "to": "alice",
+    "amount": {
+      "amount": "1000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "memo": ""
+  }
+]
+
+ +
+ + +

+cancel_transfer_from_savings + + +

+ +
Roles: active owner
+
Parameters: from request_id
+ +
Example Op:
+ +
[
+  "cancel_transfer_from_savings",
+  {"from": "alice", "request_id": 1}
+]
+
+ +
+ + +

+custom_binary + + +

+

The semmantics for this operation are the same as the custom_json +operation, but with a binary payload. The json deserialization has a +non-trivial cost associated with it. This operation will allow for +binary deserialization of plugin operations and should improve overall +performance of plugins that chose to use it.

+ +

See: steem_operations.hpp:491

+ +
Roles: posting active owner
+
Parameters: id data
+ +
+ + +

+decline_voting_rights + + +

+

An account can chose to decline their voting rights after a 30 day +delay. This includes voting on content and witnesses. The voting rights +cannot be acquired again once they have been declined. This is only to +formalize a smart contract between certain accounts and the community +that currently only exists as a social contract.

+ +

See: steem_operations.hpp:897

+ +
Roles: owner
+
Parameters: account decline
+ +
Example Op:
+ +
[
+  "decline_voting_rights",
+  {"account": "judy", "decline": true}
+]
+
+ +
+ + +

+reset_account + + +

+

This operation allows recovery_account to change account_to_reset’s +owner authority to new_owner_authority after 60 days of inactivity.

+ +

See: #169

+ +
Roles: active owner
+
Parameters: reset_account account_to_reset new_owner_authority
+ +
+ + +

+set_reset_account + + +

+

This operation allows account owner to control which account has the +power to execute the reset_account operation after 60 days.

+ +

See: #169

+ +
Roles: owner posting
+
Parameters: account current_reset_account reset_account
+ +
+ + +

+claim_reward_balance + + +

+ +
Roles: posting active owner
+
Parameters: account reward_steem reward_sbd reward_vests
+ +
Example Op:
+ +
[
+  "claim_reward_balance",
+  {
+    "account": "alice",
+    "reward_steem": {
+      "amount": "17",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "reward_sbd": {
+      "amount": "11",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "reward_vests": {
+      "amount": "185025103",
+      "precision": 6,
+      "nai": "@@000000037"
+    }
+  }
+]
+
+ +
+ + +

+delegate_vesting_shares + + +

+

Delegate vesting shares from one account to the other. The vesting +shares are still owned by the original account, but content voting +rights and resource credit are transferred to the receiving +account. This sets the delegation to vesting_shares, increasing it or +decreasing it as needed (i.e. a delegation of 0 removes the delegation).

+ +

When a delegation is removed the shares are placed in limbo for a week +to prevent a satoshi of VESTS from voting on the same content twice.

+ +

Also see:

+ + +
Roles: active owner
+
Parameters: delegator delegatee vesting_shares
+ +
Example Op:
+ +
[
+  "delegate_vesting_shares",
+  {
+    "delegator": "alice",
+    "delegatee": "bob",
+    "vesting_shares": {
+      "amount": "94599167138276",
+      "precision": 6,
+      "nai": "@@000000037"
+    }
+  }
+]
+
+ +
+ + +

+account_create_with_delegation + + +

+

Deprecated as of HF20 If an account creation service would still like to provide a delegation of Steem Power +to the accounts they create, they can still follow the account creation operation with an additional call to +delegate_vesting_shares to add a delegation of SP to the account.

+ +
+

Instead of paying the entire account creation fee with Steem, creators +can now pay a smaller fee (30x less) and delegate some Steem Power for +30 days. The exact amount is 5 * min_fee + STEEM_POWER == 150 * min_fee. +You can pay any combination of STEEM and Steem Power along that curve +(so long as the minimum fee is paid).

+
+ +
+

The witness voted STEEM fee is now the minimum required STEEM fee for +delegation. Witnesses should reduce their fee by 30x when the hardfork +goes live to preserve the same required fee for an all STEEM account +creation.

+
+ +

Also see:

+ + +
Roles: active owner
+
Parameters: fee delegation creator new_account_name owner active posting memo_key json_metadata extensions
+ +
Example Op:
+ +
[
+  "account_create_with_delegation",
+  {
+    "fee": {
+      "amount": "3000",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "delegation": {
+      "amount": "0",
+      "precision": 6,
+      "nai": "@@000000037"
+    },
+    "creator": "steemit",
+    "new_account_name": "alice",
+    "owner": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5Tki3ecCdCCHCjhhwvQvXuKryL2s34Ma6CXsRzntSUTYVYxCQ9",
+          1
+        ]
+      ]
+    },
+    "active": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM6LUoAA8gCL9tHRz7v9xcwR4ZWD3KDRHP5t1U7UAZHdfanLxyBE",
+          1
+        ]
+      ]
+    },
+    "posting": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM8anmpHdfVE4AmwsDpcSXpRsydHysEbv6vGJkRQy1d1CC83zeTA",
+          1
+        ]
+      ]
+    },
+    "memo_key": "STM67RYDyEkP1Ja1jFehJ45BFGA9oHHUnRnYbxKJEtMhVQiHW3S3k",
+    "json_metadata": "{}",
+    "extensions": []
+  }
+]
+
+ +
+ + +

+fill_convert_request + + +

+

Fills when conversion requests with a conversion date before the head +block time and then converts them to/from steem/sbd at the current +median price feed history price times the premium.

+ +
Roles: active owner
+
Parameters: owner requestid amount_in amount_out
+ +
+ + +

+author_reward + + +

+ +
Roles: posting active owner
+
Parameters: author permlink sbd_payout steem_payout vesting_payout
+ +
+ + +

+curation_reward + + +

+ +
Roles: posting active owner
+
Parameters: curator reward comment_author comment_permlink
+ +
+ + +

+comment_reward + + +

+

See: #774

+ +
Roles: posting active owner
+
Parameters: author permlink payout
+ +
+ + +

+liquidity_reward + + +

+

Deprecated as of HF12, see: #178.

+ +
Roles: active owner
+
Parameters: owner payout
+ +
+ + +

+interest + + +

+ +
Roles: active owner
+
Parameters: owner interest
+ +
Example Op:
+ +
[
+  "interest",
+  {"owner": "alice", "interest": "0.001 SBD"}
+]
+
+ +
+ + +

+fill_vesting_withdraw + + +

+

See: #78

+ +
Roles: active owner
+
Parameters: from_account to_account withdrawn deposited
+ +
Example Op:
+ +
[
+  "fill_vesting_withdraw",
+  {
+    "from_account": "alice",
+    "to_account": "alice",
+    "withdrawn": "0.026475 VESTS",
+    "deposited": "0.710 STEEM"
+  }
+]
+
+ +
+ + +

+fill_order + + +

+ +
Roles: posting active owner
+
Parameters: current_owner current_orderid current_pays open_owner open_orderid open_pays
+ +
Example Op:
+ +
[
+  "fill_order",
+  {
+    "current_owner": "alice",
+    "current_orderid": 42896,
+    "current_pays": "94.999 SBD",
+    "open_owner": "bob",
+    "open_orderid": 10001,
+    "open_pays": "500.000 STEEM"
+  }
+]
+
+ +
+ + +

+shutdown_witness + + +

+

When a witness goes offline.

+ +

See: #278

+ +
Roles: posting active owner
+
Parameters: owner
+ +
Example Op:
+ +
["shutdown_witness", {"owner": "alice"}]
+
+ +
+ + +

+fill_transfer_from_savings + + +

+ +
Roles: posting active owner
+
Parameters: from to amount request_id memo
+ +
+ + +

+hardfork + + +

+ +
Roles: posting active owner
+
Parameters: hardfork_id
+ +
+ + +

+comment_payout_update + + +

+ +
Roles: posting active owner
+
Parameters: author permlink
+ +
+ + +

+return_vesting_delegation + + +

+ +
Roles: posting active owner
+
Parameters: account vesting_shares
+ +
+ + +

+comment_benefactor_reward + + +

+ +
Roles: posting active owner
+
Parameters: benefactor author permlink reward
+ +
+ + +

+producer_reward + + +

+

Witness rewards for block signing are hard to account for. Making these +rewards visible will help witnesses and prospective witnesses by +providing them with more complete and accurate information to guide +their decisions to invest in the platform.

+ +
Roles: posting active owner
+
Parameters: producer vesting_shares
+ +
Example Op:
+ +
[
+  "producer_reward",
+  {
+    "producer": "alice",
+    "vesting_shares": "14403.626449 VESTS"
+  }
+]
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/condenser-api.html b/docs/apidefinitions/condenser-api.html new file mode 100644 index 0000000000000000000000000000000000000000..1f22b06fa37bd63fded02b44fe69e87bd01b3391 --- /dev/null +++ b/docs/apidefinitions/condenser-api.html @@ -0,0 +1,4775 @@ + + + + + + + + + + + + + + + + + + +Condenser Api | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

To help with this transition, we created condenser_api, which contains all of the API methods that currently exist and uses the existing argument formatting. The easiest way to get your app to work with Appbase is to change the api to condenser_api.

+ +

All calls in condenser_api will return [] as the argument, as the array argument passing is opaque and implemented in the API calls themselves. They follow the current argument formatting. Existing apps should only need to skip using login_api and send all of their calls to condenser_api without any other changes required to use Appbase.

+ +

For example, calling get_dynamic_global_properties with condenser_api vs database_api:

+ +
{"jsonrpc":"2.0", "method":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}
+
+ +
{"jsonrpc":"2.0", "method":"database_api.get_dynamic_global_properties", "id":1}
+
+ +

Because the method has no arguments, the params field can be omitted when not using condenser_api. However, it can optionally be included as the void type (e.g. "params":{}) but it is not required.

+ + +

condenser_api.broadcast_block

+

Used to broadcast a block.

+
Query Parameters JSON
+
[
+  {
+    "previous": "0000000000000000000000000000000000000000",
+    "timestamp": "1970-01-01T00:00:00",
+    "witness": "",
+    "transaction_merkle_root": "0000000000000000000000000000000000000000",
+    "extensions": [],
+    "witness_signature": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+    "transactions": []
+  }
+]
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.broadcast_block", "params":[{"previous":"0000000000000000000000000000000000000000","timestamp":"1970-01-01T00:00:00","witness":"","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactions":[]}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.broadcast_transaction

+

Used to broadcast a transaction.

+
Query Parameters JSON
+
[
+  {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+]
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.broadcast_transaction", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["vote",{"voter":"steemit","author":"alice","permlink":"a-post-by-alice","weight":10000}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.broadcast_transaction", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["pow",{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":"100.000 STEEM","maximum_block_size":131072,"sbd_interest_rate":1000}}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.broadcast_transaction_synchronous

+

Used to broadcast a transaction and waits for it to be processed synchronously.

+
Query Parameters JSON
+
[
+  {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+]
+
+
Expected Response JSON
+
{
+  "id": "0000000000000000000000000000000000000000",
+  "block_num": 0,
+  "trx_num": 0,
+  "expired": false
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.broadcast_transaction_synchronous", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["vote",{"voter":"steemit","author":"alice","permlink":"a-post-by-alice","weight":10000}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.broadcast_transaction_synchronous", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["pow",{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":"100.000 STEEM","maximum_block_size":131072,"sbd_interest_rate":1000}}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_account_bandwidth

+

Disabled since 0.20.6, see: #3029

+ +

Returns the available bandwidth of an account. Parameters: account:string; type:string, e.g.: forum or market

+ + + + + + + + + + + + + + + + + + + + + +
account (string)type (string) 
"steemit""forum"Query the available forum bandwidth for the account named “steemit”.
"alice""market"Query the available market bandwidth for the account named “alice”.
+ +

See: Forum/Market Bandwidth

+ +
Query Parameters JSON
+
["steemit", "forum"]
+
+
Expected Response JSON
+
{
+  "id": 8,
+  "account": "steemit",
+  "type": "forum",
+  "average_bandwidth": 214996934,
+  "lifetime_bandwidth": "48395000000",
+  "last_bandwidth_update": "2018-02-16T03:11:00"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_bandwidth", "params":["steemit","forum"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_bandwidth", "params":["alice","market"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_account_count

+

Returns the number of accounts.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
0
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_count", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_account_history

+

Returns a history of all operations for a given account. Parameters: account:string; start:int. e.g.: -1 for reverse history or any positive numeric; limit:int up to 10000

+ + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start (int)limit (int) 
"steemit"10001000Queries the account named steemit starting on the latest item in history, up to 1,000 results.
"alice"-110000Queries the account named alice starting on the oldest item in history, up to 10,000 results.
+ +
Query Parameters JSON
+
["", 0, 1000]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_history", "params":["steemit", 1000, 1000], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_history", "params":["steemit", -1, 10000], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_account_reputations

+

Returns a list of account reputations. Parameters: account_lower_bound:string; limit:int up to 1000

+ + + + + + + + + + + + + + + + + + + + + +
account_lower_bound (string)limit (int) 
"steemit"1Queries for accounts that start with “steemit”, only one result.
"a"10Queries for accounts that start with “a”, up to 10 results.
+ +
Query Parameters JSON
+
["", 1000]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_reputations", "params":["steemit", 1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_reputations", "params":["a", 10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_account_votes

+

Returns all votes by an account. Parameters: account:string

+ + + + + + + + + + + + + + + + + + +
account (string) 
"steemit"Queries for votes by “steemit”.
"alice"Queries for votes by “alice”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[
+  {
+    "authorperm": "",
+    "weight": "",
+    "rshares": "",
+    "percent": null,
+    "time": "2016-04-29T22:27:42"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_votes", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_votes", "params":["alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_accounts

+

Returns accounts, queried by name. Parameters: account:string array

+ + + + + + + + + + + + + + + + + + +
account (string array) 
["steemit"]Queries for account named “steemit”.
["steemit", "alice"]Queries for accounts named “steemit” and “alice”.
+ +
Query Parameters JSON
+
[[""]]
+
+
Expected Response JSON
+
[
+  {
+    "id": 0,
+    "name": "",
+    "owner": {
+      "weight_threshold": 0,
+      "account_auths": [],
+      "key_auths": [["", 0], ["", 0], ["", 0]]
+    },
+    "active": {
+      "weight_threshold": 0,
+      "account_auths": [],
+      "key_auths": [["", 0], ["", 0]]
+    },
+    "posting": {
+      "weight_threshold": 0,
+      "account_auths": [],
+      "key_auths": [["", 0], ["", 0], ["", 0]]
+    },
+    "memo_key": "",
+    "json_metadata": "",
+    "proxy": "",
+    "last_owner_update": "2017-03-16T21:17:51",
+    "last_account_update": "2017-03-16T23:10:36",
+    "created": "2016-03-24T17:00:21",
+    "mined": false,
+    "recovery_account": "",
+    "last_account_recovery": "1970-01-01T00:00:00",
+    "reset_account": "null",
+    "comment_count": 0,
+    "lifetime_vote_count": 0,
+    "post_count": 0,
+    "can_vote": false,
+    "voting_power": 0,
+    "last_vote_time": "2016-12-04T23:10:57",
+    "balance": "0.000 STEEM",
+    "savings_balance": "0.0 STEEM",
+    "sbd_balance": "0.0 SBD",
+    "sbd_seconds": "",
+    "sbd_seconds_last_update": "2018-04-10T04:08:36",
+    "sbd_last_interest_payment": "2018-03-15T17:58:24",
+    "savings_sbd_balance": "0.000 SBD",
+    "savings_sbd_seconds": "",
+    "savings_sbd_seconds_last_update": "1970-01-01T00:00:00",
+    "savings_sbd_last_interest_payment": "1970-01-01T00:00:00",
+    "savings_withdraw_requests": 0,
+    "reward_sbd_balance": "0.000 SBD",
+    "reward_steem_balance": "0.000 STEEM",
+    "reward_vesting_balance": "0.000000 VESTS",
+    "reward_vesting_steem": "0.000 STEEM",
+    "vesting_shares": "0.000 VESTS",
+    "delegated_vesting_shares": "0.000000 VESTS",
+    "received_vesting_shares": "0.000000 VESTS",
+    "vesting_withdraw_rate": "0.000000 VESTS",
+    "next_vesting_withdrawal": "1969-12-31T23:59:59",
+    "withdrawn": 0,
+    "to_withdraw": 0,
+    "withdraw_routes": 0,
+    "curation_rewards": 0,
+    "posting_rewards": 0,
+    "proxied_vsf_votes": [0, 0, 0, 0],
+    "witnesses_voted_for": 0,
+    "last_post": "2016-03-30T18:30:18",
+    "last_root_post": "2016-03-30T18:30:18",
+    "vesting_balance": "0.000 STEEM",
+    "reputation": "",
+    "transfer_history": [],
+    "market_history": [],
+    "post_history": [],
+    "vote_history": [],
+    "other_history": [],
+    "witness_votes": [],
+    "tags_usage": [],
+    "guest_bloggers": []
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_accounts", "params":[["steemit"]], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_accounts", "params":[["steemit", "alice"]], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_active_votes

+

Returns all votes for the given post. Parameters: author:string; permlink:string

+ + + + + + + + + + + + + + + + + + + + + +
author (string)permlink (string) 
"steemit""firstpost"Queries votes for content with a slug @steemit/firstpost
"alice""a-post-by-alice"Queries votes for content with a slug @alice/a-post-by-alice
+ +
Query Parameters JSON
+
["", ""]
+
+
Expected Response JSON
+
[
+  {
+    "voter": "",
+    "weight": "",
+    "rshares": 0,
+    "percent": 0,
+    "reputation": "",
+    "time": "1970-01-01T00:00:00"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_active_votes", "params":["steemit", "firstpost"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_active_votes", "params":["alice", "a-post-by-alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_active_witnesses

+

Returns the list of active witnesses.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_active_witnesses", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_block

+

Returns a block. Parameters: block_num:int

+ + + + + + + + + + + + + + + + + + + + + + +
block_num (int) 
1Queries the very first block.
8675309Queries block number 8,675,309.
62396745Queries block number 62,396,745.
+ +
Query Parameters JSON
+
[1]
+
+
Expected Response JSON
+
{
+  "previous": "0000000000000000000000000000000000000000",
+  "timestamp": "2016-03-24T16:05:00",
+  "witness": "initminer",
+  "transaction_merkle_root": "0000000000000000000000000000000000000000",
+  "extensions": [],
+  "witness_signature": "204f8ad56a8f5cf722a02b035a61b500aa59b9519b2c33c77a80c0a714680a5a5a7a340d909d19996613c5e4ae92146b9add8a7a663eef37d837ef881477313043",
+  "transactions": [],
+  "block_id": "0000000109833ce528d5bbfb3f6225b39ee10086",
+  "signing_key": "STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX",
+  "transaction_ids": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[8675309], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[62396745], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_block_header

+

Returns a block header. Parameters: block_num:int

+ + + + + + + + + + + + + + + + + + + + + + +
block_num (int) 
1Queries the block headers for the very first block.
8675309Queries block headers for block number 8,675,309.
62396745Queries block headers for block number 62,396,745.
+ +
Query Parameters JSON
+
[1]
+
+
Expected Response JSON
+
{
+  "previous": "0000000000000000000000000000000000000000",
+  "timestamp": "2016-03-24T16:05:00",
+  "witness": "initminer",
+  "transaction_merkle_root": "0000000000000000000000000000000000000000",
+  "extensions": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block_header", "params":[1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block_header", "params":[8675309], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block_header", "params":[62396745], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_blog

+

Returns the list of blog entries for an account. Parameters: account:string; start_entry_id:int; limit:int up to 500

+ + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start_entry_id (int)limit (int) 
“steemit”01Queries the blog for the account named “steemit”, up to one result.
“alice”050Queries the blog for the account named “alice”, up to 50 results.
+ +
Query Parameters JSON
+
["steemit", 0, 1]
+
+
Expected Response JSON
+
[
+  {
+    "comment": {
+      "id": 0,
+      "author": "steemit",
+      "permlink": "firstpost",
+      "category": "meta",
+      "parent_author": "",
+      "parent_permlink": "meta",
+      "title": "Welcome to Steem!",
+      "body": "Steemit is a social media platform where anyone can earn STEEM points by posting. The more people who like a post, the more STEEM the poster earns. Anyone can sell their STEEM for cash or vest it to boost their voting power.",
+      "json_metadata": "",
+      "last_update": "2016-03-30T18:30:18",
+      "created": "2016-03-30T18:30:18",
+      "active": "2018-04-09T12:00:42",
+      "last_payout": "2016-08-24T19:59:42",
+      "depth": 0,
+      "children": 336,
+      "net_rshares": 0,
+      "abs_rshares": 0,
+      "vote_rshares": 0,
+      "children_abs_rshares": "26169324897669",
+      "cashout_time": "1969-12-31T23:59:59",
+      "max_cashout_time": "1969-12-31T23:59:59",
+      "total_vote_weight": 0,
+      "reward_weight": 10000,
+      "total_payout_value": {
+        "amount": "942",
+        "precision": 3,
+        "nai": "@@000000013"
+      },
+      "curator_payout_value": {
+        "amount": "756",
+        "precision": 3,
+        "nai": "@@000000013"
+      },
+      "author_rewards": 3548,
+      "net_votes": 90,
+      "root_author": "steemit",
+      "root_permlink": "firstpost",
+      "max_accepted_payout": {
+        "amount": "1000000000",
+        "pecision": 3,
+        "nai": "@@000000013"
+      },
+      "percent_steem_dollars": 10000,
+      "allow_replies": true,
+      "allow_votes": true,
+      "allow_curation_rewards": true,
+      "beneficiaries": []
+    },
+    "blog": "steemit",
+    "reblog_on": "1970-01-01T00:00:00",
+    "entry_id": 0
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_blog", "params":["steemit",0,1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_blog", "params":["alice",0,50], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_blog_authors

+

Returns a list of authors that have had their content reblogged on a given blog account. Parameters: account:string

+ + + + + + + + + + + + + + + + + + +
account (string) 
"steemit"Queries for account named “steemit”.
"alice"Queries for accounts named alice”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[{"author": "", "count": 0}]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_blog_authors", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_blog_authors", "params":["alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_blog_entries

+

Returns a list of blog entries for an account. Parameters: account:string; start_entry_id:int; limit:int up to 500

+ + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start_entry_id (int)limit (int) 
“steemit”01Queries the blog entries for the account named “steemit”, up to one result.
“alice”050Queries the blog entries for the account named “alice”, up to 50 results.
+ +
Query Parameters JSON
+
["steemit", 0, 1]
+
+
Expected Response JSON
+
[
+  {
+    "author": "steemit",
+    "permlink": "firstpost",
+    "blog": "steemit",
+    "reblog_on": "1970-01-01T00:00:00",
+    "entry_id": 0
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_blog_entries", "params":["steemit",0,1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_blog_entries", "params":["alice",0,50], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_chain_properties

+

Returns the chain properties.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "account_creation_fee": "0.100 STEEM",
+  "maximum_block_size": 131072,
+  "sbd_interest_rate": 1000,
+  "account_subsidy_limit": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_chain_properties", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_comment_discussions_by_payout

+

Returns a list of discussions based on payout.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_comment_discussions_by_payout", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_comment_discussions_by_payout", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_config

+

Returns information about compile-time constants. See: Understanding Configuration Values

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_config", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_content

+

Returns the content (post or comment). Parameters: author:string; permlink:string

+ + + + + + + + + + + + + + + + + + + + + +
author (string)permlink (string) 
"steemit""firstpost"Queries content with a slug @steemit/firstpost
"alice""a-post-by-alice"Queries content with a slug @alice/a-post-by-alice
+ +
Query Parameters JSON
+
["", ""]
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "author": "",
+  "permlink": "",
+  "category": "",
+  "parent_author": "",
+  "parent_permlink": "",
+  "title": "",
+  "body": "",
+  "json_metadata": "",
+  "last_update": "1970-01-01T00:00:00",
+  "created": "1970-01-01T00:00:00",
+  "active": "1970-01-01T00:00:00",
+  "last_payout": "1970-01-01T00:00:00",
+  "depth": 0,
+  "children": 0,
+  "net_rshares": 0,
+  "abs_rshares": 0,
+  "vote_rshares": 0,
+  "children_abs_rshares": 0,
+  "cashout_time": "1970-01-01T00:00:00",
+  "max_cashout_time": "1970-01-01T00:00:00",
+  "total_vote_weight": 0,
+  "reward_weight": 0,
+  "total_payout_value": "0.000 STEEM",
+  "curator_payout_value": "0.000 STEEM",
+  "author_rewards": 0,
+  "net_votes": 0,
+  "root_author": "",
+  "root_permlink": "",
+  "max_accepted_payout": "0.000 STEEM",
+  "percent_steem_dollars": 0,
+  "allow_replies": false,
+  "allow_votes": false,
+  "allow_curation_rewards": false,
+  "beneficiaries": [],
+  "url": "",
+  "root_title": "",
+  "pending_payout_value": "0.000 STEEM",
+  "total_pending_payout_value": "0.000 STEEM",
+  "active_votes": [],
+  "replies": [],
+  "author_reputation": 0,
+  "promoted": "0.000 STEEM",
+  "body_length": 0,
+  "reblogged_by": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_content", "params":["steemit", "firstpost"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_content", "params":["alice", "a-post-by-alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_content_replies

+

Returns a list of replies. Parameters: author:string; permlink:string

+ + + + + + + + + + + + + + + + + + + + + +
author (string)permlink (string) 
"steemit""firstpost"Queries replies for a slug @steemit/firstpost
"alice""a-post-by-alice"Queries replies for a slug @alice/a-post-by-alice
+ +
Query Parameters JSON
+
["", ""]
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "author": "",
+  "permlink": "",
+  "category": "",
+  "parent_author": "",
+  "parent_permlink": "",
+  "title": "",
+  "body": "",
+  "json_metadata": "",
+  "last_update": "1970-01-01T00:00:00",
+  "created": "1970-01-01T00:00:00",
+  "active": "1970-01-01T00:00:00",
+  "last_payout": "1970-01-01T00:00:00",
+  "depth": 0,
+  "children": 0,
+  "net_rshares": 0,
+  "abs_rshares": 0,
+  "vote_rshares": 0,
+  "children_abs_rshares": 0,
+  "cashout_time": "1970-01-01T00:00:00",
+  "max_cashout_time": "1970-01-01T00:00:00",
+  "total_vote_weight": 0,
+  "reward_weight": 0,
+  "total_payout_value": "0.000 STEEM",
+  "curator_payout_value": "0.000 STEEM",
+  "author_rewards": 0,
+  "net_votes": 0,
+  "root_author": "",
+  "root_permlink": "",
+  "max_accepted_payout": "0.000 STEEM",
+  "percent_steem_dollars": 0,
+  "allow_replies": false,
+  "allow_votes": false,
+  "allow_curation_rewards": false,
+  "beneficiaries": [],
+  "url": "",
+  "root_title": "",
+  "pending_payout_value": "0.000 STEEM",
+  "total_pending_payout_value": "0.000 STEEM",
+  "active_votes": [],
+  "replies": [],
+  "author_reputation": 0,
+  "promoted": "0.000 STEEM",
+  "body_length": 0,
+  "reblogged_by": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_content_replies", "params":["steemit", "firstpost"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_content_replies", "params":["alice", "a-post-by-alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_conversion_requests

+

Returns a list of conversion request. Parameters: id:integer

+ + + + + + + + + + + + + + +
id (int) 
1234Queries a conversion request with the id of 1234.
+ +
Query Parameters JSON
+
[0]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_conversion_requests", "params":[1234], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_current_median_history_price

+ +
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{"base": "0.000 STEEM", "quote": "0.000 STEEM"}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_current_median_history_price", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_active

+

Returns a list of discussions based on active.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_active", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_active", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_author_before_date

+

Returns a list of discussions based on author before date.

+
Query Parameters JSON
+
["", "", "1970-01-01T00:00:00", 100]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_author_before_date", "params":["steemit","firstpost","2016-04-19T22:49:43",1], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_blog

+

Returns a list of discussions by blog.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_blog", "params":[{"tag":"steemit","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_blog", "params":[{"tag":"alice","limit":10}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_cashout

+

Returns a list of discussions by cashout.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_cashout", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_cashout", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_children

+

Returns a list of discussions by children.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_children", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_children", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_comments

+

Returns a list of discussions by comments.

+
Query Parameters JSON
+
[
+  {
+    "start_author": "",
+    "start_permlink": "",
+    "limit": 100
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_comments", "params":[{"start_author":"steemit","start_permlink":"firstpost","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_comments", "params":[{"start_author":"alice","start_permlink":"a-post-by-alice","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_created

+

Returns a list of discussions by created.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_created", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_created", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_feed

+

Returns a list of discussions by feed.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "start_author": "",
+    "start_permlink": "",
+    "limit": 100
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_feed", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_feed", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_hot

+

Returns a list of discussions by hot.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_hot", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_hot", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_promoted

+

Returns a list of discussions by promoted.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_promoted", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_promoted", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + + +

Returns a list of discussions by trending.

+ +
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+ +
[]
+
+ + + +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_trending", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_trending", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_votes

+

Returns a list of discussions by votes.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_votes", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_votes", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_dynamic_global_properties

+

Returns the current dynamic global properties. See: Understanding Dynamic Global Properties

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "head_block_number": 0,
+  "head_block_id": "0000000000000000000000000000000000000000",
+  "time": "1970-01-01T00:00:00",
+  "current_witness": "",
+  "total_pow": "18446744073709551615",
+  "num_pow_witnesses": 0,
+  "virtual_supply": "0.000 STEEM",
+  "current_supply": "0.000 STEEM",
+  "confidential_supply": "0.000 STEEM",
+  "current_sbd_supply": "0.000 STEEM",
+  "confidential_sbd_supply": "0.000 STEEM",
+  "total_vesting_fund_steem": "0.000 STEEM",
+  "total_vesting_shares": "0.000 STEEM",
+  "total_reward_fund_steem": "0.000 STEEM",
+  "total_reward_shares2": "0",
+  "pending_rewarded_vesting_shares": "0.000 STEEM",
+  "pending_rewarded_vesting_steem": "0.000 STEEM",
+  "sbd_interest_rate": 0,
+  "sbd_print_rate": 10000,
+  "maximum_block_size": 0,
+  "current_aslot": 0,
+  "recent_slots_filled": "0",
+  "participation_count": 0,
+  "last_irreversible_block_num": 0,
+  "vote_power_reserve_rate": 40
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_escrow

+

Returns the escrow for a certain account by id.

+
Query Parameters JSON
+
["", 0]
+
+
Expected Response JSON
+
null
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_escrow", "params":["steemit", 1234], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_expiring_vesting_delegations

+

Returns the expiring vesting delegations for an account. Parameters: account:string, after:timestamp

+ + + + + + + + + + + + + + + + + + + + + +
account (string)after (timestamp) 
"steemit""2018-01-01T00:00:00"Queries for expiring vesting after January 1st, 2018.
"alice""2017-12-01T00:00:00"Queries for expiring vesting after December 1st, 2017.
+ +
Query Parameters JSON
+
["", "1970-01-01T00:00:00"]
+
+
Expected Response JSON
+
[
+  {
+    "id": 0,
+    "delegator": "",
+    "vesting_shares": "0.000000 VESTS",
+    "expiration": "1970-01-01T00:00:00"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_expiring_vesting_delegations", "params":["steemit","2018-01-01T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_expiring_vesting_delegations", "params":["alice","2017-12-01T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_feed

+

Returns a list of items in an account’s feed. Parameters: account:string; start_entry_id:int; limit:int up to 500

+ + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start_entry_id (int)limit (int) 
"steemit"01Queries the account named steemit starting on the first item, up to 1 result.
"alice"110Queries the account named alice starting on the second item, up to 10 results.
+ +
Query Parameters JSON
+
["", 0, 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_feed", "params":["steemit",0,1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_feed", "params":["alice",1,10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_feed_entries

+

Returns a list of entries in an account’s feed. Parameters: account:string; start_entry_id:int; limit:int up to 500

+ + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start_entry_id (int)limit (int) 
"steemit"01Queries the account named steemit starting on the first item, up to 1 result.
"alice"110Queries the account named alice starting on the second item, up to 10 results.
+ +
Query Parameters JSON
+
["", 0, 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_feed_entries", "params":["steemit",0,1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_feed_entries", "params":["alice",1,10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_feed_history

+

Returns the history of price feed values.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "current_median_history": {"base": "0.000 STEEM", "quote": "0.000 STEEM"},
+  "price_history": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_feed_history", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_follow_count

+

Returns the count of followers/following for an account. Parameters: account:string

+ + + + + + + + + + + + + + + + + + +
account (string) 
"steemit"Queries the account named steemit.
"alice"Queries the account named alice.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
{
+  "account": "",
+  "follower_count": 0,
+  "following_count": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_follow_count", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_follow_count", "params":["alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_followers

+

Returns the list of followers for an account. Parameters: account:string; start:string (account to start from); type:string e.g.: blog; limit:int up to 1000

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start (string)type (string)limit (int) 
"steemit"null"blog"10Queries for follows of the account named steemit, up to 10 results.
"alice"null"ignore"100Queries for mutes of the account named alice, up to 100 results.
+ +
Query Parameters JSON
+
["", "", "", 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_followers", "params":["steemit",null,"blog",10], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_followers", "params":["alice",null,"ignore",100], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_following

+

Returns the list of accounts that are following an account. Parameters: account:string; start:string (account to start from); type:string e.g.: blog; limit:int up to 1000

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start (string)type (string)limit (int) 
"steemit"null"blog"10Queries for follows of the account named steemit, up to 10 results.
"alice"null"ignore"100Queries for mutes of the account named alice, up to 100 results.
+ +
Query Parameters JSON
+
["", "", "", 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_following", "params":["steemit",null,"blog",10], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_following", "params":["alice",null,"ignore",100], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_hardfork_version

+ +
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
"0.0.0"
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_hardfork_version", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_key_references

+

Returns all accounts that have the key associated with their owner or active authorities.

+
Query Parameters JSON
+
[
+  [
+    "STM5jZtLoV8YbxCxr4imnbWn61zMB24wwonpnVhfXRmv7j6fk3dTH"
+  ]
+]
+
+
Expected Response JSON
+
[["steemit"]]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_key_references", "params":[["STM5jZtLoV8YbxCxr4imnbWn61zMB24wwonpnVhfXRmv7j6fk3dTH"]], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_market_history

+

Returns the market history for the internal SBD:STEEM market. Parameters: bucket_seconds:int; start:timestamp; end:timestamp

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bucket_seconds (int)start (timestamp)end (timestamp) 
15"2018-01-01T00:00:00""2018-01-02T00:00:00"Queries for market history between January 1st, 2018 and January 2nd, 2018, segmented by 15 seconds.
60"2018-01-01T00:00:00""2018-01-02T00:00:00"Queries for market history between January 1st, 2018 and January 2nd, 2018, segmented by one minute.
300"2018-01-01T00:00:00""2018-01-02T00:00:00"Queries for market history between January 1st, 2018 and January 2nd, 2018, segmented by five minutes.
3600"2018-01-01T00:00:00""2018-01-02T00:00:00"Queries for market history between January 1st, 2018 and January 2nd, 2018, segmented by one hour.
86400"2018-01-01T00:00:00""2018-01-02T00:00:00"Queries for market history between January 1st, 2018 and January 2nd, 2018, segmented by one day.
+ +
Query Parameters JSON
+
[0, "1970-01-01T00:00:00", "1970-01-01T00:00:00"]
+
+
Expected Response JSON
+
[
+  {
+    "id": 0,
+    "open": "1970-01-01T00:00:00",
+    "seconds": 0,
+    "steem": {
+      "high": 0,
+      "low": 0,
+      "open": 0,
+      "close": 0,
+      "volume": 0
+    },
+    "non_steem": {
+      "high": 0,
+      "low": 0,
+      "open": 0,
+      "close": 0,
+      "volume": 0
+    }
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history", "params":[15,"2018-01-01T00:00:00","2018-01-02T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history", "params":[60,"2018-01-01T00:00:00","2018-01-02T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history", "params":[300,"2018-01-01T00:00:00","2018-01-02T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history", "params":[3600,"2018-01-01T00:00:00","2018-01-02T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history", "params":[86400,"2018-01-01T00:00:00","2018-01-02T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_market_history_buckets

+

Returns the bucket seconds being tracked by the plugin.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
[15, 60, 300, 3600, 86400]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history_buckets", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_next_scheduled_hardfork

+

Returns the next scheduled hardfork.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "hf_version": "0.0.0",
+  "live_time": "1970-01-01T00:00:00"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_next_scheduled_hardfork", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_open_orders

+

Returns the open orders for an account. account:string

+
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_open_orders", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_open_orders", "params":["alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_ops_in_block

+

Returns all operations contained in a block. Parameters: block_num:int; only_virtual:boolean

+ + + + + + + + + + + + + + + + + + + + + +
block_num (int)only_virtual (boolean) 
1falseQueries the operations in block #1.
5443322trueQueries only the virtual operations in block #5,443,322.
+ +
Query Parameters JSON
+
[0, false]
+
+
Expected Response JSON
+
[
+  {
+    "trx_id": "0000000000000000000000000000000000000000",
+    "block": 0,
+    "trx_in_block": 0,
+    "op_in_trx": 0,
+    "virtual_op": 0,
+    "timestamp": "2016-10-01T06:31:24",
+    "op": [
+      "producer_reward",
+      {
+        "producer": "",
+        "vesting_shares": "0.000000 VESTS"
+      }
+    ]
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_ops_in_block", "params":[1,false], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_ops_in_block", "params":[5443322,true], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_order_book

+

Returns the internal market order book. Parameters: limit:int up to 500

+ + + + + + + + + + + + + + + + + + +
limit (int) 
10Queries up to 10 items in the order book.
500Queries up to 500 items in the order book.
+ +
Query Parameters JSON
+
[0]
+
+
Expected Response JSON
+
{"bids": [], "asks": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_order_book", "params":[10], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_order_book", "params":[50], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_owner_history

+

Returns the owner history of an account. Parameters: account:string

+ + + + + + + + + + + + + + +
account (string) 
"steemit"Queries the owner history for account named “steemit”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_owner_history", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_post_discussions_by_payout

+

Returns a list of post discussions by payout.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_post_discussions_by_payout", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_post_discussions_by_payout", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_potential_signatures

+

This method will return the set of all public keys that could possibly sign for a given transaction.

+
Query Parameters JSON
+
[
+  {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_potential_signatures", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["pow",{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_reblogged_by

+

Returns a list of authors that have reblogged a post. Parameters: author:string; permlink:string

+ + + + + + + + + + + + + + + + + + + + + +
author (string)permlink (string) 
"steemit""firstpost"Queries reblogs for content with a slug @steemit/firstpost
"alice""a-post-by-alice"Queries reblogs for content with a slug @alice/a-post-by-alice
+ +
Query Parameters JSON
+
["", ""]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_reblogged_by", "params":["steemit","firstpost"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_reblogged_by", "params":["alice","a-post-by-alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_recent_trades

+

Returns the most recent trades for the internal SBD:STEEM market. Parameters: limit:int up to 1000

+ + + + + + + + + + + + + + + + + + +
limit (int) 
10Queries up to 10 latest trades.
500Queries up to 500 latest trades.
+ +
Query Parameters JSON
+
[1]
+
+
Expected Response JSON
+
[
+  {
+    "date": "1970-01-01T00:00:00",
+    "current_pays": "0.0 SBD",
+    "open_pays": "0.0 STEEM"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_recent_trades", "params":[10], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_recent_trades", "params":[500], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_recovery_request

+

Returns the recovery request for an account. Parameters: account:string

+ + + + + + + + + + + + + + +
account (string) 
"steemit"Queries the recovery requests for account named “steemit”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
null
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_recovery_request", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_replies_by_last_update

+

Returns a list of replies by last update. start_parent_author:string, start_permlink:string, limit:int up to 100

+
Query Parameters JSON
+
["", "", 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_replies_by_last_update", "params":["steemit","firstpost",1], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_required_signatures

+

This API will take a partially signed transaction and a set of public keys that the owner has the ability to sign for and return the minimal subset of public keys that should add signatures to the transaction. Parameters: trx:object; available_keys:[string]

+ +
Query Parameters JSON
+
[
+  {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  },
+  []
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_required_signatures", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["pow",{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}]],"extensions":[],"signatures":[]},[]], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_reward_fund

+

Returns information about the current reward funds.

+
Query Parameters JSON
+
["post"]
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "name": "",
+  "reward_balance": "0.000 STEEM",
+  "recent_claims": "0",
+  "last_update": "1970-01-01T00:00:00",
+  "content_constant": "0",
+  "percent_curation_rewards": 0,
+  "percent_content_rewards": 0,
+  "author_reward_curve": "quadratic",
+  "curation_reward_curve": "34723648"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_reward_fund", "params":["post"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_savings_withdraw_from

+

Returns savings withdraw from an account. Parameters: account:string

+ + + + + + + + + + + + + + +
account (string) 
"steemit"Queries the savings withdraw for account named “steemit”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_savings_withdraw_from", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_savings_withdraw_to

+

Returns the savings withdraw to an account. Parameters: account:string

+ + + + + + + + + + + + + + +
account (string) 
"steemit"Queries the savings withdraw for account named “steemit”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_savings_withdraw_to", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_state

+

Returns the state of a path. Deprecated. Parameters: path:string

+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
{
+  "current_route": "",
+  "props": {
+    "head_block_number": 0,
+    "head_block_id": "0000000000000000000000000000000000000000",
+    "time": "1970-01-01T00:00:00",
+    "current_witness": "",
+    "total_pow": "18446744073709551615",
+    "num_pow_witnesses": 0,
+    "virtual_supply": "0.000 STEEM",
+    "current_supply": "0.000 STEEM",
+    "confidential_supply": "0.000 STEEM",
+    "current_sbd_supply": "0.000 STEEM",
+    "confidential_sbd_supply": "0.000 STEEM",
+    "total_vesting_fund_steem": "0.000 STEEM",
+    "total_vesting_shares": "0.000 STEEM",
+    "total_reward_fund_steem": "0.000 STEEM",
+    "total_reward_shares2": "0",
+    "pending_rewarded_vesting_shares": "0.000 STEEM",
+    "pending_rewarded_vesting_steem": "0.000 STEEM",
+    "sbd_interest_rate": 0,
+    "sbd_print_rate": 10000,
+    "maximum_block_size": 0,
+    "current_aslot": 0,
+    "recent_slots_filled": "0",
+    "participation_count": 0,
+    "last_irreversible_block_num": 0,
+    "vote_power_reserve_rate": 40,
+    "average_block_size": 0,
+    "current_reserve_ratio": 1,
+    "max_virtual_bandwidth": "0"
+  },
+  "tag_idx": {"trending": []},
+  "tags": {},
+  "content": {},
+  "accounts": {},
+  "witnesses": {},
+  "discussion_idx": {},
+  "witness_schedule": {
+    "id": 0,
+    "current_virtual_time": "0",
+    "next_shuffle_block_num": 1,
+    "current_shuffled_witnesses": [],
+    "num_scheduled_witnesses": 1,
+    "top19_weight": 1,
+    "timeshare_weight": 5,
+    "miner_weight": 1,
+    "witness_pay_normalization_factor": 25,
+    "median_props": {
+      "account_creation_fee": "0.000 STEEM",
+      "maximum_block_size": 131072,
+      "sbd_interest_rate": 1000
+    },
+    "majority_version": "0.0.0",
+    "max_voted_witnesses": 19,
+    "max_miner_witnesses": 1,
+    "max_runner_witnesses": 1,
+    "hardfork_required_witnesses": 17
+  },
+  "feed_price": {"base": "0.000 STEEM", "quote": "0.000 STEEM"},
+  "error": ""
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_state", "params":["/@steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_tags_used_by_author

+

Returns a list of tags used by an author. Parameters: author:string

+ + + + + + + + + + + + + + +
account (string) 
"steemit"Queries the tags used by the account named “steemit”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_tags_used_by_author", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_ticker

+

Returns the market ticker for the internal SBD:STEEM market.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "latest": "0.00000000000000000",
+  "lowest_ask": "0.00000000000000000",
+  "highest_bid": "0.00000000000000000",
+  "percent_change": "0.00000000000000000",
+  "steem_volume": "0.000 STEEM",
+  "sbd_volume": "0.000 STEEM"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_ticker", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_trade_history

+

Returns the trade history for the internal SBD:STEEM market. Parameters: start:timestamp; end:timestamp; limit:int up to 1000

+ + + + + + + + + + + + + + + + + + +
start (timestamp)end (timestamp)limit (int) 
"2018-01-01T00:00:00""2018-01-02T00:00:00"10Queries up to 10 trades between January 1st, 2018 and January 2nd, 2018.
+ +
Query Parameters JSON
+
[
+  "1970-01-01T00:00:00",
+  "1970-01-01T00:00:00",
+  1000
+]
+
+
Expected Response JSON
+
[
+  {
+    "date": "1970-01-01T00:00:00",
+    "current_pays": "0.000 SBD",
+    "open_pays": "0.000 STEEM"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_trade_history", "params":["2018-01-01T00:00:00","2018-01-02T00:00:00",10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_transaction

+

Returns the details of a transaction based on a transaction id. Parameters: trx_id:string

+ + + + + + + + + + + + + + +
trx_id (string) 
"6fde0190a97835ea6d9e651293e90c89911f933c"Queries for this exact transaction id.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
{
+  "ref_block_num": 0,
+  "ref_block_prefix": 0,
+  "expiration": "1970-01-01T00:00:00",
+  "operations": [],
+  "extensions": [],
+  "signatures": [],
+  "transaction_id": "0000000000000000000000000000000000000000",
+  "block_num": 0,
+  "transaction_num": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_transaction", "params":["6fde0190a97835ea6d9e651293e90c89911f933c"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_transaction_hex

+

Returns a hexdump of the serialized binary form of a transaction.

+
Query Parameters JSON
+
[
+  {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+]
+
+
Expected Response JSON
+
""
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_transaction_hex", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["pow",{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
+ + + +

Returns the list of trending tags. Parameter: start_tag:string; limit:int up to 100

+ + + + + + + + + + + + + + + + + + + + + +
tag (string)limit (int) 
null100Queries the top 100 trending tags.
"steem"10Queries the tags after “steem”, up to 10 tags.
+ + +
["", 1]
+
+ +
[
+  {
+    "name": "",
+    "total_payouts": "0.000 SBD",
+    "net_votes": 0,
+    "top_posts": 0,
+    "comments": 0,
+    "trending": ""
+  }
+]
+
+ + + +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_trending_tags", "params":[null,100], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_trending_tags", "params":["steem",10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_version

+

Returns the versions of blockchain, steem, and FC.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "blockchain_version": "",
+  "steem_revision": "",
+  "fc_revision": ""
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_version", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_vesting_delegations

+

Returns the vesting delegations by an account. Parameters: delegator_account:string; start_account:string; limit:int up to 1000

+ + + + + + + + + + + + + + + + + + +
delegator_account (string)start_account (string)limit (int) 
"steemit"null10Queries up to 10 vesting delegations by “steemit”.
+ +
Query Parameters JSON
+
["", "", 1]
+
+
Expected Response JSON
+
[
+  {
+    "id": 0,
+    "delegator": "",
+    "delegatee": "",
+    "vesting_shares": "0.000000 VESTS",
+    "min_delegation_time": "1970-01-01T00:00:00"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_vesting_delegations", "params":["steemit",null,10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_volume

+

Returns the market volume for the past 24 hours.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "steem_volume": "0.000 STEEM",
+  "sbd_volume": "0.000 STEEM"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_volume", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_withdraw_routes

+

Returns the withdraw routes for an account. Parameters: account:string; type:string

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
account (string)type (string) 
"steemit""outgoing"Queries outgoing withdraw routes by “steemit”.
"steemit""incoming"Queries incoming withdraw routes by “steemit”.
"steemit""all"Queries all withdraw routes by “steemit”.
+ +
Query Parameters JSON
+
["", ""]
+
+
Expected Response JSON
+
[
+  {
+    "id": 0,
+    "from_account": "",
+    "to_account": "",
+    "percent": 0,
+    "auto_vest": false
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_withdraw_routes", "params":["steemit","outgoing"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_withdraw_routes", "params":["steemit","incoming"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_withdraw_routes", "params":["steemit","all"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_witness_by_account

+

Returns the witness of an account. Parameters: account:string

+ + + + + + + + + + + + + + +
account (string) 
"steemit"Queries witness account of “steemit” (of null if none exists).
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "owner": "",
+  "created": "1970-01-01T00:00:00",
+  "url": "",
+  "votes": "0",
+  "virtual_last_update": "0",
+  "virtual_position": "0",
+  "virtual_scheduled_time": "0",
+  "total_missed": 0,
+  "last_aslot": 0,
+  "last_confirmed_block_num": 0,
+  "pow_worker": 0,
+  "signing_key": "",
+  "props": {
+    "account_creation_fee": "0.000 STEEM",
+    "maximum_block_size": 65536,
+    "sbd_interest_rate": 0
+  },
+  "sbd_exchange_rate": {"base": "0.000 SBD", "quote": "0.000 STEEM"},
+  "last_sbd_exchange_update": "1970-01-01T00:00:00",
+  "last_work": "",
+  "running_version": "",
+  "hardfork_version_vote": "",
+  "hardfork_time_vote": "1970-01-01T00:00:00"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witness_by_account", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_witness_count

+ +
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
0
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witness_count", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_witness_schedule

+

Returns the current witness schedule.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "current_virtual_time": "0",
+  "next_shuffle_block_num": 1,
+  "current_shuffled_witnesses": [],
+  "num_scheduled_witnesses": 1,
+  "top19_weight": 1,
+  "timeshare_weight": 5,
+  "miner_weight": 1,
+  "witness_pay_normalization_factor": 25,
+  "median_props": {
+    "account_creation_fee": "0.000 STEEM",
+    "maximum_block_size": 131072,
+    "sbd_interest_rate": 1000
+  },
+  "majority_version": "0.0.0",
+  "max_voted_witnesses": 19,
+  "max_miner_witnesses": 1,
+  "max_runner_witnesses": 1,
+  "hardfork_required_witnesses": 17
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witness_schedule", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_witnesses

+

Returns current witnesses.

+
Query Parameters JSON
+
[[0]]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witnesses", "params":[[28]], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_witnesses_by_vote

+

Returns current witnesses by vote. Parameters: start_name:string; limit:int up to 1000

+ + + + + + + + + + + + + + + + + + + + + +
account (string)limit (int) 
null21Queries top 21 witness votes.
"a"1Queries top 10 witness votes starting with “a”.
+ +
Query Parameters JSON
+
["", 1000]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witnesses_by_vote", "params":[null, 21], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witnesses_by_vote", "params":["a", 1], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.lookup_account_names

+

Looks up account names. accounts:[string]

+
Query Parameters JSON
+
[["steemit"]]
+
+
Expected Response JSON
+
[
+  {
+    "id": 28,
+    "name": "steemit",
+    "owner": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5tfrdPG1Ycjwa9FuBUueDFFyygndBLXdVEEs2c9eRKScnFk6vM",
+          1
+        ],
+        [
+          "STM71f6yWztimJuREVyyMXNqAVbx1FzPVW6LLXNoQ35dHwKuszmHX",
+          1
+        ],
+        [
+          "STM7U3ymhUTuKME72dpdpQkdQvh722gTLjKBKtmKQPPWgtkr418Nf",
+          1
+        ]
+      ]
+    },
+    "active": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5832HKCJzs6K3rRCsZ1PidTKgjF38ZJb718Y3pCW92HEMsCGPf",
+          1
+        ],
+        [
+          "STM7Q2rLBqzPzFeteQZewv9Lu3NLE69fZoLeL6YK59t7UmssCBNTU",
+          1
+        ]
+      ]
+    },
+    "posting": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5jZtLoV8YbxCxr4imnbWn61zMB24wwonpnVhfXRmv7j6fk3dTH",
+          1
+        ],
+        [
+          "STM7xVFaqi8RxhWKZwuLA2bKrAiQmhnrbgvw4e2ChAsKYQbPjqUq2",
+          1
+        ],
+        [
+          "STM83dmDkQcZU9X8MWcxsTztSyutE6udrb55PvYgu7RLzStaoAt67",
+          1
+        ]
+      ]
+    },
+    "memo_key": "STM5jZtLoV8YbxCxr4imnbWn61zMB24wwonpnVhfXRmv7j6fk3dTH",
+    "json_metadata": "",
+    "proxy": "",
+    "last_owner_update": "2017-03-16T21:17:51",
+    "last_account_update": "2017-03-16T23:10:36",
+    "created": "2016-03-24T17:00:21",
+    "mined": true,
+    "recovery_account": "steem",
+    "last_account_recovery": "1970-01-01T00:00:00",
+    "reset_account": "null",
+    "comment_count": 0,
+    "lifetime_vote_count": 0,
+    "post_count": 1,
+    "can_vote": true,
+    "voting_power": 9950,
+    "last_vote_time": "2016-12-04T23:10:57",
+    "balance": "0.006 STEEM",
+    "savings_balance": "11006644.632 STEEM",
+    "sbd_balance": "8581.890 SBD",
+    "sbd_seconds": "18846158467785",
+    "sbd_seconds_last_update": "2018-04-10T04:08:36",
+    "sbd_last_interest_payment": "2018-03-15T17:58:24",
+    "savings_sbd_balance": "0.000 SBD",
+    "savings_sbd_seconds": "0",
+    "savings_sbd_seconds_last_update": "1970-01-01T00:00:00",
+    "savings_sbd_last_interest_payment": "1970-01-01T00:00:00",
+    "savings_withdraw_requests": 0,
+    "reward_sbd_balance": "0.000 SBD",
+    "reward_steem_balance": "0.000 STEEM",
+    "reward_vesting_balance": "0.000000 VESTS",
+    "reward_vesting_steem": "0.000 STEEM",
+    "vesting_shares": "90039851836.689703 VESTS",
+    "delegated_vesting_shares": "0.000000 VESTS",
+    "received_vesting_shares": "0.000000 VESTS",
+    "vesting_withdraw_rate": "0.000000 VESTS",
+    "next_vesting_withdrawal": "1969-12-31T23:59:59",
+    "withdrawn": 0,
+    "to_withdraw": 0,
+    "withdraw_routes": 0,
+    "curation_rewards": 0,
+    "posting_rewards": 3548,
+    "proxied_vsf_votes": ["28583799126", 0, 0, 0],
+    "witnesses_voted_for": 0,
+    "last_post": "2016-03-30T18:30:18",
+    "last_root_post": "2016-03-30T18:30:18"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.lookup_account_names", "params":[["steemit"]], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.lookup_accounts

+

Looks up accounts starting with name. Parameterslower_bound_name:string; limit:int up to 1000

+ + + + + + + + + + + + + + + + +
lower_bound_name (string)limit (int) 
"a"10Queries up to 10 accounts that start with “a”.
+ +
Query Parameters JSON
+
["", 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.lookup_accounts", "params":["a",10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.lookup_witness_accounts

+

Looks up witness accounts starting with name. Parameters: lower_bound_name:string; limit:int up to 1000

+ + + + + + + + + + + + + + + + +
lower_bound_name (string)limit (int) 
"a"10Queries up to 10 witnesses that start with “a”.
+ +
Query Parameters JSON
+
["", 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.lookup_witness_accounts", "params":["a",10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.verify_account_authority

+

Not Implemented

+ +
Query Parameters JSON
+
["", [""]]
+
+
Expected Response JSON
+
false
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.verify_account_authority", "params":["steemit",["STM7Q2rLBqzPzFeteQZewv9Lu3NLE69fZoLeL6YK59t7UmssCBNTU"]], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.verify_authority

+

Returns true if the transaction has all of the required signatures.

+
Query Parameters JSON
+
[
+  {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+]
+
+
Expected Response JSON
+
false
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.verify_authority", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["pow",{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_account_references

+ +
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
[]
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/database-api.html b/docs/apidefinitions/database-api.html new file mode 100644 index 0000000000000000000000000000000000000000..8cbefd1aaf26f816176ffd03e1899f735067ab78 --- /dev/null +++ b/docs/apidefinitions/database-api.html @@ -0,0 +1,1816 @@ + + + + + + + + + + + + + + + + + + +Database Api | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

Used to query information about accounts, transactions, and blockchain data. These AppBase API methods are still under development and subject to change.

+ + +

database_api.find_account_recovery_requests

+

Returns a list of account recovery requests.

+
Query Parameters JSON
+
{"accounts": []}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.find_accounts

+

Search for accounts.

+
Query Parameters JSON
+
{"accounts": []}
+
+
Expected Response JSON
+
{"accounts": []}
+
+ +
+ + +

database_api.find_change_recovery_account_requests

+

Returns a list of requests to change the recovery account.

+
Query Parameters JSON
+
{"accounts": []}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.find_comments

+

Search for comments.

+
Query Parameters JSON
+
{"comments": []}
+
+
Expected Response JSON
+
{"comments": []}
+
+ +
+ + +

database_api.find_decline_voting_rights_requests

+

Returns a list of requests to decline voting rights.

+
Query Parameters JSON
+
{"accounts": []}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.find_escrows

+

Returns a list of escrows.

+
Query Parameters JSON
+
{"from": ""}
+
+
Expected Response JSON
+
{"escrows": []}
+
+ +
+ + +

database_api.find_limit_orders

+

Returns a list of limit orders.

+
Query Parameters JSON
+
{"account": ""}
+
+
Expected Response JSON
+
{"orders": []}
+
+ +
+ + +

database_api.find_owner_histories

+

Returns owner authority history.

+
Query Parameters JSON
+
{"owner": ""}
+
+
Expected Response JSON
+
{"owner_auths": []}
+
+ +
+ + +

database_api.find_savings_withdrawals

+

Returns the list of savings withdrawls for an account.

+
Query Parameters JSON
+
{"account": ""}
+
+
Expected Response JSON
+
{"withdrawals": []}
+
+ +
+ + +

database_api.find_sbd_conversion_requests

+

Returns the list of SBD conversion requests for an account.

+
Query Parameters JSON
+
{"account": ""}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.find_vesting_delegation_expirations

+

Returns the expirations for vesting delegations.

+
Query Parameters JSON
+
{"account": ""}
+
+
Expected Response JSON
+
{"delegations": []}
+
+ +
+ + +

database_api.find_vesting_delegations

+

Returns the list of vesting delegations for an account.

+
Query Parameters JSON
+
{"account": ""}
+
+
Expected Response JSON
+
{"delegations": []}
+
+ +
+ + +

database_api.find_votes

+

Returns the votes for an author and permlink.

+
Query Parameters JSON
+
{"author": "", "permlink": ""}
+
+
Expected Response JSON
+
{"votes": []}
+
+ +
+ + +

database_api.find_withdraw_vesting_routes

+

Returns the list of vesting withdraw routes for an account.

+
Query Parameters JSON
+
{"account": "", "order": "by_name"}
+
+
Expected Response JSON
+
{"routes": []}
+
+ +
+ + +

database_api.find_witnesses

+

Search for witnesses.

+
Query Parameters JSON
+
{"owners": []}
+
+
Expected Response JSON
+
{"witnesses": []}
+
+ +
+ + +

database_api.get_active_witnesses

+

Returns the list of active witnesses.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{"witnesses": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_active_witnesses", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_config

+

Returns information about compile-time constants. Some properties may not be present. See: Understanding Configuration Values

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_config", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_current_price_feed

+

Returns the current price feed.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "base": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "quote": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  }
+}
+
+ +
+ + +

database_api.get_dynamic_global_properties

+

Returns the current dynamic global properties. See: Understanding Dynamic Global Properties

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "head_block_number": 0,
+  "head_block_id": "0000000000000000000000000000000000000000",
+  "time": "1970-01-01T00:00:00",
+  "current_witness": "",
+  "total_pow": "18446744073709551615",
+  "num_pow_witnesses": 0,
+  "virtual_supply": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "current_supply": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "confidential_supply": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "current_sbd_supply": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000013"
+  },
+  "confidential_sbd_supply": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000013"
+  },
+  "total_vesting_fund_steem": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "total_vesting_shares": {
+    "amount": "0",
+    "precision": 6,
+    "nai": "@@000000037"
+  },
+  "total_reward_fund_steem": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "total_reward_shares2": "0",
+  "pending_rewarded_vesting_shares": {
+    "amount": "0",
+    "precision": 6,
+    "nai": "@@000000037"
+  },
+  "pending_rewarded_vesting_steem": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "sbd_interest_rate": 0,
+  "sbd_print_rate": 10000,
+  "maximum_block_size": 0,
+  "current_aslot": 0,
+  "recent_slots_filled": "0",
+  "participation_count": 0,
+  "last_irreversible_block_num": 0,
+  "vote_power_reserve_rate": 40,
+  "delegation_return_period": 604800,
+  "reverse_auction_seconds": 0,
+  "available_account_subsidies": 0,
+  "sbd_stop_percent": 0,
+  "sbd_start_percent": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_dynamic_global_properties", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_feed_history

+

Returns the history of price feed values.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "current_median_history": {
+    "base": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "quote": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    }
+  },
+  "price_history": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_feed_history", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_hardfork_properties

+

Returns the current properties about the blockchain’s hardforks.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "processed_hardforks": [],
+  "last_hardfork": 0,
+  "current_hardfork_version": "0.0.0",
+  "next_hardfork": "0.0.0",
+  "next_hardfork_time": "1970-01-01T00:00:00"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_hardfork_properties", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_order_book

+

Returns the order book.

+
Query Parameters JSON
+
{"limit": 0}
+
+
Expected Response JSON
+
{"asks": [], "bids": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_order_book", "params":{"limit":10}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_order_book", "params":{"limit":50}, "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_potential_signatures

+

This method will return the set of all public keys that could possibly sign for a given transaction.

+
Query Parameters JSON
+
{
+  "trx": {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+}
+
+
Expected Response JSON
+
{"keys": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_potential_signatures", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"pow_operation","value":{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}}],"extensions":[],"signatures":[]}}, "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_required_signatures

+

This API will take a partially signed transaction and a set of public keys that the owner has the ability to sign for and return the minimal subset of public keys that should add signatures to the transaction.

+
Query Parameters JSON
+
{
+  "trx": {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  },
+  "available_keys": []
+}
+
+
Expected Response JSON
+
{"keys": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_required_signatures", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"pow_operation","value":{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}}],"extensions":[],"signatures":[]},"available_keys":[]}, "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_reward_funds

+

Returns information about the current reward funds.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{"funds": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_reward_funds", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_transaction_hex

+

Returns a hexdump of the serialized binary form of a transaction.

+
Query Parameters JSON
+
{
+  "trx": {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+}
+
+
Expected Response JSON
+
{"hex": ""}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_transaction_hex", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"pow_operation","value":{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}}],"extensions":[],"signatures":[]}}, "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_version

+

Returns the compile time versions of blockchain, steem, FC. Also returns the boot time version of the chain id (may be different from compile time value only when looking at a testnet)

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "blockchain_version": "",
+  "steem_revision": "",
+  "fc_revision": "",
+  "chain_id": "0000000000000000000000000000000000000000000000000000000000000000"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_version", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_witness_schedule

+

Returns the current witness schedule.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "current_virtual_time": "0",
+  "next_shuffle_block_num": 76479392,
+  "current_shuffled_witnesses": [],
+  "num_scheduled_witnesses": 0,
+  "elected_weight": 132,
+  "timeshare_weight": 86,
+  "miner_weight": 125,
+  "witness_pay_normalization_factor": 32767,
+  "median_props": {
+    "account_creation_fee": {
+      "amount": "1",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "maximum_block_size": 131072,
+    "sbd_interest_rate": 1000,
+    "account_subsidy_budget": 797,
+    "account_subsidy_decay": 347321
+  },
+  "majority_version": "0.0.0",
+  "max_voted_witnesses": 0,
+  "max_miner_witnesses": 0,
+  "max_runner_witnesses": 0,
+  "hardfork_required_witnesses": 0,
+  "account_subsidy_rd": {
+    "resource_unit": 0,
+    "budget_per_time_unit": 0,
+    "pool_eq": 0,
+    "max_pool_size": 0,
+    "decay_params": {
+      "decay_per_time_unit": 0,
+      "decay_per_time_unit_denom_shift": 0
+    },
+    "min_decay": 0
+  },
+  "account_subsidy_witness_rd": {
+    "resource_unit": 0,
+    "budget_per_time_unit": 0,
+    "pool_eq": 0,
+    "max_pool_size": 0,
+    "decay_params": {
+      "decay_per_time_unit": 0,
+      "decay_per_time_unit_denom_shift": 0
+    },
+    "min_decay": 0
+  },
+  "min_witness_account_subsidy_decay": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_witness_schedule", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.list_account_recovery_requests

+

Returns a list of account recovery requests.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.list_accounts

+

Returns a list of accounts.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"accounts": []}
+
+ +
+ + +

database_api.list_change_recovery_account_requests

+

Returns a list of recovery account change requests.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.list_comments

+

Returns a list of comments.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"comments": []}
+
+ +
+ + +

database_api.list_decline_voting_rights_requests

+

Returns a list of decline voting rights requests.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.list_escrows

+

Returns a list of escrows.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"escrows": []}
+
+ +
+ + +

database_api.list_limit_orders

+

Returns a list of limit orders.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"orders": []}
+
+ +
+ + +

database_api.list_owner_histories

+

Returns a list of owner authority histories.

+
Query Parameters JSON
+
{"start": null, "limit": 0}
+
+
Expected Response JSON
+
{"owner_auths": []}
+
+ +
+ + +

database_api.list_savings_withdrawals

+

Returns a list of savings withdrawls.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"withdrawals": []}
+
+ +
+ + +

database_api.list_sbd_conversion_requests

+

Returns a list of SBD conversion requests.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.list_vesting_delegation_expirations

+

Returns a list of vesting delegation expirations.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"delegations": []}
+
+ +
+ + +

database_api.list_vesting_delegations

+

Returns a list of vesting delegations.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"delegations": []}
+
+ +
+ + +

database_api.list_votes

+

Returns a list of votes.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"votes": []}
+
+ +
+ + +

database_api.list_withdraw_vesting_routes

+

Returns a list of vesting withdraw routes.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"routes": []}
+
+ +
+ + +

database_api.list_witness_votes

+

Returns a list of witness votes.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"votes": []}
+
+ +
+ + +

database_api.list_witnesses

+

Returns the list of witnesses.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"witnesses": []}
+
+ +
+ + +

database_api.verify_account_authority

+

Not Implemented

+ +
Query Parameters JSON
+
{"account": "", "signers": []}
+
+
Expected Response JSON
+
{"valid": false}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.verify_account_authority", "params":{"account":"steemit","signers":["STM7Q2rLBqzPzFeteQZewv9Lu3NLE69fZoLeL6YK59t7UmssCBNTU"]}, "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.verify_authority

+

Returns true if the transaction has all of the required signatures.

+
Query Parameters JSON
+
{
+  "trx": {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+}
+
+
Expected Response JSON
+
{"valid": false}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.verify_authority", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"pow_operation","value":{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}}],"extensions":[],"signatures":[]}}, "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.verify_signatures

+

This is a general purpose API that checks signatures against accounts for an arbitrary sha256 hash using the existing authority structures.

+
Query Parameters JSON
+
{
+  "hash": "0000000000000000000000000000000000000000000000000000000000000000",
+  "signatures": [],
+  "required_owner": [],
+  "required_active": [],
+  "required_posting": [],
+  "required_other": []
+}
+
+
Expected Response JSON
+
{"valid": false}
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/debug-node-api.html b/docs/apidefinitions/debug-node-api.html new file mode 100644 index 0000000000000000000000000000000000000000..5e24092743fd1a29998ca0c76b00123fd7a51d5c --- /dev/null +++ b/docs/apidefinitions/debug-node-api.html @@ -0,0 +1,627 @@ + + + + + + + + + + + + + + + + + + +Debug Node Api | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

This plugin allows all sorts of creative “what-if” experiments with the chain.

+ +

See: debug_node_plugin.md

+ + +

debug_node_api.debug_generate_blocks

+

Generate blocks locally.

+
Query Parameters JSON
+
{
+  "debug_key": "",
+  "count": 0,
+  "skip": 0,
+  "miss_blocks": 0,
+  "edit_if_needed": true
+}
+
+
Expected Response JSON
+
{"blocks": 0}
+
+ +
+ + +

debug_node_api.debug_generate_blocks_until

+

Generate blocks locally until a specified head block time. Can generate them sparsely.

+
Query Parameters JSON
+
{
+  "debug_key": "",
+  "head_block_time": "1970-01-01T00:00:00",
+  "generate_sparsely": true
+}
+
+
Expected Response JSON
+
{"blocks": 0}
+
+ +
+ + +

debug_node_api.debug_get_hardfork_property_object

+ +
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "processed_hardforks": [],
+  "last_hardfork": 0,
+  "current_hardfork_version": "0.0.0",
+  "next_hardfork": "0.0.0",
+  "next_hardfork_time": "1970-01-01T00:00:00"
+}
+
+ +
+ + +

debug_node_api.debug_get_json_schema

+ +
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{"schema": ""}
+
+ +
+ + +

debug_node_api.debug_get_witness_schedule

+ +
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "current_virtual_time": "0",
+  "next_shuffle_block_num": 21573344,
+  "current_shuffled_witnesses": [],
+  "num_scheduled_witnesses": 192,
+  "elected_weight": 49,
+  "timeshare_weight": 73,
+  "miner_weight": 1,
+  "witness_pay_normalization_factor": 0,
+  "median_props": {
+    "account_creation_fee": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "maximum_block_size": 131072,
+    "sbd_interest_rate": 1000,
+    "account_subsidy_budget": 797,
+    "account_subsidy_decay": 347321
+  },
+  "majority_version": "0.0.0",
+  "max_voted_witnesses": 128,
+  "max_miner_witnesses": 131,
+  "max_runner_witnesses": 191,
+  "hardfork_required_witnesses": 4,
+  "account_subsidy_rd": {
+    "resource_unit": 0,
+    "budget_per_time_unit": 0,
+    "pool_eq": 0,
+    "max_pool_size": 0,
+    "decay_params": {
+      "decay_per_time_unit": 0,
+      "decay_per_time_unit_denom_shift": 0
+    },
+    "min_decay": 0
+  },
+  "account_subsidy_witness_rd": {
+    "resource_unit": 0,
+    "budget_per_time_unit": 0,
+    "pool_eq": 0,
+    "max_pool_size": 0,
+    "decay_params": {
+      "decay_per_time_unit": 0,
+      "decay_per_time_unit_denom_shift": 0
+    },
+    "min_decay": 0
+  },
+  "min_witness_account_subsidy_decay": 0
+}
+
+ +
+ + +

debug_node_api.debug_has_hardfork

+ +
Query Parameters JSON
+
{"hardfork_id": 0}
+
+
Expected Response JSON
+
{"has_hardfork": false}
+
+ +
+ + +

debug_node_api.debug_pop_block

+

Pop a block from the blockchain, returning it.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{}
+
+ +
+ + +

debug_node_api.debug_push_blocks

+

Push blocks from existing database.

+
Query Parameters JSON
+
{
+  "src_filename": "",
+  "count": 0,
+  "skip_validate_invariants": false
+}
+
+
Expected Response JSON
+
{"blocks": 0}
+
+ +
+ + +

debug_node_api.debug_set_hardfork

+ +
Query Parameters JSON
+
{"hardfork_id": 0}
+
+
Expected Response JSON
+
{}
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/follow-api.html b/docs/apidefinitions/follow-api.html new file mode 100644 index 0000000000000000000000000000000000000000..28bfb68413f06ee6afc52a013d31edb063309c3f --- /dev/null +++ b/docs/apidefinitions/follow-api.html @@ -0,0 +1,688 @@ + + + + + + + + + + + + + + + + + + +Follow Api | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

Used to lookup information related to reputation and account follow operations. These AppBase API methods are still under development and subject to change.

+ + +

follow_api.get_account_reputations

+

Returns a list of account reputations.

+
Query Parameters JSON
+
{"account_lower_bound": "", "limit": 1000}
+
+
Expected Response JSON
+
{"reputations": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_account_reputations", "params":{"account_lower_bound":"steemit", "limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_account_reputations", "params":{"account_lower_bound":"a", "limit":10}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_blog

+

Returns the list of blog entries for an account.

+
Query Parameters JSON
+
{"account": "", "start_entry_id": 0, "limit": 500}
+
+
Expected Response JSON
+
{"blog": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog", "params":{"account":"steemit","start_entry_id":0,"limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog", "params":{"account":"alice","start_entry_id":0,"limit":50}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_blog_authors

+

Returns a list of authors that have had their content reblogged on a given blog account.

+
Query Parameters JSON
+
{"blog_account": ""}
+
+
Expected Response JSON
+
{"blog_authors": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog_authors", "params":{"blog_account":"steemit"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog_authors", "params":{"blog_account":"alice"}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_blog_entries

+

Returns a list of blog entries for an account.

+
Query Parameters JSON
+
{"account": "", "start_entry_id": 0, "limit": 500}
+
+
Expected Response JSON
+
{"blog": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog_entries", "params":{"account":"steemit","start_entry_id":0,"limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog_entries", "params":{"account":"alice","start_entry_id":0,"limit":50}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_feed

+

Returns a list of items in an account’s feed.

+
Query Parameters JSON
+
{"account": "", "start_entry_id": 0, "limit": 500}
+
+
Expected Response JSON
+
{"feed": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_feed", "params":{"account":"steemit","start_entry_id":0,"limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_feed", "params":{"account":"alice","start_entry_id":1,"limit":10}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_feed_entries

+

Returns a list of entries in an account’s feed.

+
Query Parameters JSON
+
{"account": "", "start_entry_id": 0, "limit": 500}
+
+
Expected Response JSON
+
{"feed": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_feed_entries", "params":{"account":"steemit","start_entry_id":0,"limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_feed_entries", "params":{"account":"alice","start_entry_id":1,"limit":10}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_follow_count

+

Returns the count of followers for an account.

+
Query Parameters JSON
+
{"account": ""}
+
+
Expected Response JSON
+
{
+  "account": "",
+  "follower_count": 0,
+  "following_count": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_follow_count", "params":{"account":"steemit"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_follow_count", "params":{"account":"alice"}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_followers

+

Returns the list of followers for an account.

+
Query Parameters JSON
+
{
+  "account": "",
+  "start": "",
+  "type": "undefined",
+  "limit": 1000
+}
+
+
Expected Response JSON
+
{"followers": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_followers", "params":{"account":"steemit","start":null,"type":"blog","limit":10}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_followers", "params":{"account":"alice","start":null,"type":"ignore","limit":100}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_following

+

Returns the list of accounts that are following an account.

+
Query Parameters JSON
+
{
+  "account": "",
+  "start": "",
+  "type": "undefined",
+  "limit": 1000
+}
+
+
Expected Response JSON
+
{"following": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_following", "params":{"account":"steemit","start":null,"type":"blog","limit":10}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_following", "params":{"account":"alice","start":null,"type":"ignore","limit":100}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_reblogged_by

+

Returns a list of authors that have reblogged a post.

+
Query Parameters JSON
+
{"author": "", "permlink": ""}
+
+
Expected Response JSON
+
{"accounts": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_reblogged_by", "params":{"author":"steemit","permlink":"firstpost"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_reblogged_by", "params":{"author":"alice","permlink":"a-post-by-alice"}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/index.html b/docs/apidefinitions/index.html new file mode 100644 index 0000000000000000000000000000000000000000..9b152edaa6ef75a9071eeb5a8f3fee26d7a624d0 --- /dev/null +++ b/docs/apidefinitions/index.html @@ -0,0 +1,11658 @@ + + + + + + + + + + + + + + + + + + +API Docs - API Definitions | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal - API Definitions

+ + + +
+
+
+
+ While the condenser_api.* calls are ready for use, all other appbase methods are currently works in progress and may change, or be unsuitable for production use. +
+
+
+ + + + + +
+

+ + Condenser Api + + +

+ + + +

To help with this transition, we created condenser_api, which contains all of the API methods that currently exist and uses the existing argument formatting. The easiest way to get your app to work with Appbase is to change the api to condenser_api.

+ +

All calls in condenser_api will return [] as the argument, as the array argument passing is opaque and implemented in the API calls themselves. They follow the current argument formatting. Existing apps should only need to skip using login_api and send all of their calls to condenser_api without any other changes required to use Appbase.

+ +

For example, calling get_dynamic_global_properties with condenser_api vs database_api:

+ +
{"jsonrpc":"2.0", "method":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}
+
+ +
{"jsonrpc":"2.0", "method":"database_api.get_dynamic_global_properties", "id":1}
+
+ +

Because the method has no arguments, the params field can be omitted when not using condenser_api. However, it can optionally be included as the void type (e.g. "params":{}) but it is not required.

+ + +

condenser_api.broadcast_block

+

Used to broadcast a block.

+
Query Parameters JSON
+
[
+  {
+    "previous": "0000000000000000000000000000000000000000",
+    "timestamp": "1970-01-01T00:00:00",
+    "witness": "",
+    "transaction_merkle_root": "0000000000000000000000000000000000000000",
+    "extensions": [],
+    "witness_signature": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+    "transactions": []
+  }
+]
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.broadcast_block", "params":[{"previous":"0000000000000000000000000000000000000000","timestamp":"1970-01-01T00:00:00","witness":"","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactions":[]}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.broadcast_transaction

+

Used to broadcast a transaction.

+
Query Parameters JSON
+
[
+  {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+]
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.broadcast_transaction", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["vote",{"voter":"steemit","author":"alice","permlink":"a-post-by-alice","weight":10000}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.broadcast_transaction", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["pow",{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":"100.000 STEEM","maximum_block_size":131072,"sbd_interest_rate":1000}}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.broadcast_transaction_synchronous

+

Used to broadcast a transaction and waits for it to be processed synchronously.

+
Query Parameters JSON
+
[
+  {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+]
+
+
Expected Response JSON
+
{
+  "id": "0000000000000000000000000000000000000000",
+  "block_num": 0,
+  "trx_num": 0,
+  "expired": false
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.broadcast_transaction_synchronous", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["vote",{"voter":"steemit","author":"alice","permlink":"a-post-by-alice","weight":10000}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.broadcast_transaction_synchronous", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["pow",{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":"100.000 STEEM","maximum_block_size":131072,"sbd_interest_rate":1000}}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_account_bandwidth

+

Disabled since 0.20.6, see: #3029

+ +

Returns the available bandwidth of an account. Parameters: account:string; type:string, e.g.: forum or market

+ + + + + + + + + + + + + + + + + + + + + +
account (string)type (string) 
"steemit""forum"Query the available forum bandwidth for the account named “steemit”.
"alice""market"Query the available market bandwidth for the account named “alice”.
+ +

See: Forum/Market Bandwidth

+ +
Query Parameters JSON
+
["steemit", "forum"]
+
+
Expected Response JSON
+
{
+  "id": 8,
+  "account": "steemit",
+  "type": "forum",
+  "average_bandwidth": 214996934,
+  "lifetime_bandwidth": "48395000000",
+  "last_bandwidth_update": "2018-02-16T03:11:00"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_bandwidth", "params":["steemit","forum"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_bandwidth", "params":["alice","market"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_account_count

+

Returns the number of accounts.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
0
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_count", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_account_history

+

Returns a history of all operations for a given account. Parameters: account:string; start:int. e.g.: -1 for reverse history or any positive numeric; limit:int up to 10000

+ + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start (int)limit (int) 
"steemit"10001000Queries the account named steemit starting on the latest item in history, up to 1,000 results.
"alice"-110000Queries the account named alice starting on the oldest item in history, up to 10,000 results.
+ +
Query Parameters JSON
+
["", 0, 1000]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_history", "params":["steemit", 1000, 1000], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_history", "params":["steemit", -1, 10000], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_account_reputations

+

Returns a list of account reputations. Parameters: account_lower_bound:string; limit:int up to 1000

+ + + + + + + + + + + + + + + + + + + + + +
account_lower_bound (string)limit (int) 
"steemit"1Queries for accounts that start with “steemit”, only one result.
"a"10Queries for accounts that start with “a”, up to 10 results.
+ +
Query Parameters JSON
+
["", 1000]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_reputations", "params":["steemit", 1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_reputations", "params":["a", 10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_account_votes

+

Returns all votes by an account. Parameters: account:string

+ + + + + + + + + + + + + + + + + + +
account (string) 
"steemit"Queries for votes by “steemit”.
"alice"Queries for votes by “alice”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[
+  {
+    "authorperm": "",
+    "weight": "",
+    "rshares": "",
+    "percent": null,
+    "time": "2016-04-29T22:27:42"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_votes", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_votes", "params":["alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_accounts

+

Returns accounts, queried by name. Parameters: account:string array

+ + + + + + + + + + + + + + + + + + +
account (string array) 
["steemit"]Queries for account named “steemit”.
["steemit", "alice"]Queries for accounts named “steemit” and “alice”.
+ +
Query Parameters JSON
+
[[""]]
+
+
Expected Response JSON
+
[
+  {
+    "id": 0,
+    "name": "",
+    "owner": {
+      "weight_threshold": 0,
+      "account_auths": [],
+      "key_auths": [["", 0], ["", 0], ["", 0]]
+    },
+    "active": {
+      "weight_threshold": 0,
+      "account_auths": [],
+      "key_auths": [["", 0], ["", 0]]
+    },
+    "posting": {
+      "weight_threshold": 0,
+      "account_auths": [],
+      "key_auths": [["", 0], ["", 0], ["", 0]]
+    },
+    "memo_key": "",
+    "json_metadata": "",
+    "proxy": "",
+    "last_owner_update": "2017-03-16T21:17:51",
+    "last_account_update": "2017-03-16T23:10:36",
+    "created": "2016-03-24T17:00:21",
+    "mined": false,
+    "recovery_account": "",
+    "last_account_recovery": "1970-01-01T00:00:00",
+    "reset_account": "null",
+    "comment_count": 0,
+    "lifetime_vote_count": 0,
+    "post_count": 0,
+    "can_vote": false,
+    "voting_power": 0,
+    "last_vote_time": "2016-12-04T23:10:57",
+    "balance": "0.000 STEEM",
+    "savings_balance": "0.0 STEEM",
+    "sbd_balance": "0.0 SBD",
+    "sbd_seconds": "",
+    "sbd_seconds_last_update": "2018-04-10T04:08:36",
+    "sbd_last_interest_payment": "2018-03-15T17:58:24",
+    "savings_sbd_balance": "0.000 SBD",
+    "savings_sbd_seconds": "",
+    "savings_sbd_seconds_last_update": "1970-01-01T00:00:00",
+    "savings_sbd_last_interest_payment": "1970-01-01T00:00:00",
+    "savings_withdraw_requests": 0,
+    "reward_sbd_balance": "0.000 SBD",
+    "reward_steem_balance": "0.000 STEEM",
+    "reward_vesting_balance": "0.000000 VESTS",
+    "reward_vesting_steem": "0.000 STEEM",
+    "vesting_shares": "0.000 VESTS",
+    "delegated_vesting_shares": "0.000000 VESTS",
+    "received_vesting_shares": "0.000000 VESTS",
+    "vesting_withdraw_rate": "0.000000 VESTS",
+    "next_vesting_withdrawal": "1969-12-31T23:59:59",
+    "withdrawn": 0,
+    "to_withdraw": 0,
+    "withdraw_routes": 0,
+    "curation_rewards": 0,
+    "posting_rewards": 0,
+    "proxied_vsf_votes": [0, 0, 0, 0],
+    "witnesses_voted_for": 0,
+    "last_post": "2016-03-30T18:30:18",
+    "last_root_post": "2016-03-30T18:30:18",
+    "vesting_balance": "0.000 STEEM",
+    "reputation": "",
+    "transfer_history": [],
+    "market_history": [],
+    "post_history": [],
+    "vote_history": [],
+    "other_history": [],
+    "witness_votes": [],
+    "tags_usage": [],
+    "guest_bloggers": []
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_accounts", "params":[["steemit"]], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_accounts", "params":[["steemit", "alice"]], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_active_votes

+

Returns all votes for the given post. Parameters: author:string; permlink:string

+ + + + + + + + + + + + + + + + + + + + + +
author (string)permlink (string) 
"steemit""firstpost"Queries votes for content with a slug @steemit/firstpost
"alice""a-post-by-alice"Queries votes for content with a slug @alice/a-post-by-alice
+ +
Query Parameters JSON
+
["", ""]
+
+
Expected Response JSON
+
[
+  {
+    "voter": "",
+    "weight": "",
+    "rshares": 0,
+    "percent": 0,
+    "reputation": "",
+    "time": "1970-01-01T00:00:00"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_active_votes", "params":["steemit", "firstpost"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_active_votes", "params":["alice", "a-post-by-alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_active_witnesses

+

Returns the list of active witnesses.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_active_witnesses", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_block

+

Returns a block. Parameters: block_num:int

+ + + + + + + + + + + + + + + + + + + + + + +
block_num (int) 
1Queries the very first block.
8675309Queries block number 8,675,309.
62396745Queries block number 62,396,745.
+ +
Query Parameters JSON
+
[1]
+
+
Expected Response JSON
+
{
+  "previous": "0000000000000000000000000000000000000000",
+  "timestamp": "2016-03-24T16:05:00",
+  "witness": "initminer",
+  "transaction_merkle_root": "0000000000000000000000000000000000000000",
+  "extensions": [],
+  "witness_signature": "204f8ad56a8f5cf722a02b035a61b500aa59b9519b2c33c77a80c0a714680a5a5a7a340d909d19996613c5e4ae92146b9add8a7a663eef37d837ef881477313043",
+  "transactions": [],
+  "block_id": "0000000109833ce528d5bbfb3f6225b39ee10086",
+  "signing_key": "STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX",
+  "transaction_ids": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[8675309], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[62396745], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_block_header

+

Returns a block header. Parameters: block_num:int

+ + + + + + + + + + + + + + + + + + + + + + +
block_num (int) 
1Queries the block headers for the very first block.
8675309Queries block headers for block number 8,675,309.
62396745Queries block headers for block number 62,396,745.
+ +
Query Parameters JSON
+
[1]
+
+
Expected Response JSON
+
{
+  "previous": "0000000000000000000000000000000000000000",
+  "timestamp": "2016-03-24T16:05:00",
+  "witness": "initminer",
+  "transaction_merkle_root": "0000000000000000000000000000000000000000",
+  "extensions": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block_header", "params":[1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block_header", "params":[8675309], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block_header", "params":[62396745], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_blog

+

Returns the list of blog entries for an account. Parameters: account:string; start_entry_id:int; limit:int up to 500

+ + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start_entry_id (int)limit (int) 
“steemit”01Queries the blog for the account named “steemit”, up to one result.
“alice”050Queries the blog for the account named “alice”, up to 50 results.
+ +
Query Parameters JSON
+
["steemit", 0, 1]
+
+
Expected Response JSON
+
[
+  {
+    "comment": {
+      "id": 0,
+      "author": "steemit",
+      "permlink": "firstpost",
+      "category": "meta",
+      "parent_author": "",
+      "parent_permlink": "meta",
+      "title": "Welcome to Steem!",
+      "body": "Steemit is a social media platform where anyone can earn STEEM points by posting. The more people who like a post, the more STEEM the poster earns. Anyone can sell their STEEM for cash or vest it to boost their voting power.",
+      "json_metadata": "",
+      "last_update": "2016-03-30T18:30:18",
+      "created": "2016-03-30T18:30:18",
+      "active": "2018-04-09T12:00:42",
+      "last_payout": "2016-08-24T19:59:42",
+      "depth": 0,
+      "children": 336,
+      "net_rshares": 0,
+      "abs_rshares": 0,
+      "vote_rshares": 0,
+      "children_abs_rshares": "26169324897669",
+      "cashout_time": "1969-12-31T23:59:59",
+      "max_cashout_time": "1969-12-31T23:59:59",
+      "total_vote_weight": 0,
+      "reward_weight": 10000,
+      "total_payout_value": {
+        "amount": "942",
+        "precision": 3,
+        "nai": "@@000000013"
+      },
+      "curator_payout_value": {
+        "amount": "756",
+        "precision": 3,
+        "nai": "@@000000013"
+      },
+      "author_rewards": 3548,
+      "net_votes": 90,
+      "root_author": "steemit",
+      "root_permlink": "firstpost",
+      "max_accepted_payout": {
+        "amount": "1000000000",
+        "pecision": 3,
+        "nai": "@@000000013"
+      },
+      "percent_steem_dollars": 10000,
+      "allow_replies": true,
+      "allow_votes": true,
+      "allow_curation_rewards": true,
+      "beneficiaries": []
+    },
+    "blog": "steemit",
+    "reblog_on": "1970-01-01T00:00:00",
+    "entry_id": 0
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_blog", "params":["steemit",0,1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_blog", "params":["alice",0,50], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_blog_authors

+

Returns a list of authors that have had their content reblogged on a given blog account. Parameters: account:string

+ + + + + + + + + + + + + + + + + + +
account (string) 
"steemit"Queries for account named “steemit”.
"alice"Queries for accounts named alice”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[{"author": "", "count": 0}]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_blog_authors", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_blog_authors", "params":["alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_blog_entries

+

Returns a list of blog entries for an account. Parameters: account:string; start_entry_id:int; limit:int up to 500

+ + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start_entry_id (int)limit (int) 
“steemit”01Queries the blog entries for the account named “steemit”, up to one result.
“alice”050Queries the blog entries for the account named “alice”, up to 50 results.
+ +
Query Parameters JSON
+
["steemit", 0, 1]
+
+
Expected Response JSON
+
[
+  {
+    "author": "steemit",
+    "permlink": "firstpost",
+    "blog": "steemit",
+    "reblog_on": "1970-01-01T00:00:00",
+    "entry_id": 0
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_blog_entries", "params":["steemit",0,1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_blog_entries", "params":["alice",0,50], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_chain_properties

+

Returns the chain properties.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "account_creation_fee": "0.100 STEEM",
+  "maximum_block_size": 131072,
+  "sbd_interest_rate": 1000,
+  "account_subsidy_limit": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_chain_properties", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_comment_discussions_by_payout

+

Returns a list of discussions based on payout.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_comment_discussions_by_payout", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_comment_discussions_by_payout", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_config

+

Returns information about compile-time constants. See: Understanding Configuration Values

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_config", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_content

+

Returns the content (post or comment). Parameters: author:string; permlink:string

+ + + + + + + + + + + + + + + + + + + + + +
author (string)permlink (string) 
"steemit""firstpost"Queries content with a slug @steemit/firstpost
"alice""a-post-by-alice"Queries content with a slug @alice/a-post-by-alice
+ +
Query Parameters JSON
+
["", ""]
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "author": "",
+  "permlink": "",
+  "category": "",
+  "parent_author": "",
+  "parent_permlink": "",
+  "title": "",
+  "body": "",
+  "json_metadata": "",
+  "last_update": "1970-01-01T00:00:00",
+  "created": "1970-01-01T00:00:00",
+  "active": "1970-01-01T00:00:00",
+  "last_payout": "1970-01-01T00:00:00",
+  "depth": 0,
+  "children": 0,
+  "net_rshares": 0,
+  "abs_rshares": 0,
+  "vote_rshares": 0,
+  "children_abs_rshares": 0,
+  "cashout_time": "1970-01-01T00:00:00",
+  "max_cashout_time": "1970-01-01T00:00:00",
+  "total_vote_weight": 0,
+  "reward_weight": 0,
+  "total_payout_value": "0.000 STEEM",
+  "curator_payout_value": "0.000 STEEM",
+  "author_rewards": 0,
+  "net_votes": 0,
+  "root_author": "",
+  "root_permlink": "",
+  "max_accepted_payout": "0.000 STEEM",
+  "percent_steem_dollars": 0,
+  "allow_replies": false,
+  "allow_votes": false,
+  "allow_curation_rewards": false,
+  "beneficiaries": [],
+  "url": "",
+  "root_title": "",
+  "pending_payout_value": "0.000 STEEM",
+  "total_pending_payout_value": "0.000 STEEM",
+  "active_votes": [],
+  "replies": [],
+  "author_reputation": 0,
+  "promoted": "0.000 STEEM",
+  "body_length": 0,
+  "reblogged_by": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_content", "params":["steemit", "firstpost"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_content", "params":["alice", "a-post-by-alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_content_replies

+

Returns a list of replies. Parameters: author:string; permlink:string

+ + + + + + + + + + + + + + + + + + + + + +
author (string)permlink (string) 
"steemit""firstpost"Queries replies for a slug @steemit/firstpost
"alice""a-post-by-alice"Queries replies for a slug @alice/a-post-by-alice
+ +
Query Parameters JSON
+
["", ""]
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "author": "",
+  "permlink": "",
+  "category": "",
+  "parent_author": "",
+  "parent_permlink": "",
+  "title": "",
+  "body": "",
+  "json_metadata": "",
+  "last_update": "1970-01-01T00:00:00",
+  "created": "1970-01-01T00:00:00",
+  "active": "1970-01-01T00:00:00",
+  "last_payout": "1970-01-01T00:00:00",
+  "depth": 0,
+  "children": 0,
+  "net_rshares": 0,
+  "abs_rshares": 0,
+  "vote_rshares": 0,
+  "children_abs_rshares": 0,
+  "cashout_time": "1970-01-01T00:00:00",
+  "max_cashout_time": "1970-01-01T00:00:00",
+  "total_vote_weight": 0,
+  "reward_weight": 0,
+  "total_payout_value": "0.000 STEEM",
+  "curator_payout_value": "0.000 STEEM",
+  "author_rewards": 0,
+  "net_votes": 0,
+  "root_author": "",
+  "root_permlink": "",
+  "max_accepted_payout": "0.000 STEEM",
+  "percent_steem_dollars": 0,
+  "allow_replies": false,
+  "allow_votes": false,
+  "allow_curation_rewards": false,
+  "beneficiaries": [],
+  "url": "",
+  "root_title": "",
+  "pending_payout_value": "0.000 STEEM",
+  "total_pending_payout_value": "0.000 STEEM",
+  "active_votes": [],
+  "replies": [],
+  "author_reputation": 0,
+  "promoted": "0.000 STEEM",
+  "body_length": 0,
+  "reblogged_by": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_content_replies", "params":["steemit", "firstpost"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_content_replies", "params":["alice", "a-post-by-alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_conversion_requests

+

Returns a list of conversion request. Parameters: id:integer

+ + + + + + + + + + + + + + +
id (int) 
1234Queries a conversion request with the id of 1234.
+ +
Query Parameters JSON
+
[0]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_conversion_requests", "params":[1234], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_current_median_history_price

+ +
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{"base": "0.000 STEEM", "quote": "0.000 STEEM"}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_current_median_history_price", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_active

+

Returns a list of discussions based on active.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_active", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_active", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_author_before_date

+

Returns a list of discussions based on author before date.

+
Query Parameters JSON
+
["", "", "1970-01-01T00:00:00", 100]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_author_before_date", "params":["steemit","firstpost","2016-04-19T22:49:43",1], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_blog

+

Returns a list of discussions by blog.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_blog", "params":[{"tag":"steemit","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_blog", "params":[{"tag":"alice","limit":10}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_cashout

+

Returns a list of discussions by cashout.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_cashout", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_cashout", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_children

+

Returns a list of discussions by children.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_children", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_children", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_comments

+

Returns a list of discussions by comments.

+
Query Parameters JSON
+
[
+  {
+    "start_author": "",
+    "start_permlink": "",
+    "limit": 100
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_comments", "params":[{"start_author":"steemit","start_permlink":"firstpost","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_comments", "params":[{"start_author":"alice","start_permlink":"a-post-by-alice","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_created

+

Returns a list of discussions by created.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_created", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_created", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_feed

+

Returns a list of discussions by feed.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "start_author": "",
+    "start_permlink": "",
+    "limit": 100
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_feed", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_feed", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_hot

+

Returns a list of discussions by hot.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_hot", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_hot", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_promoted

+

Returns a list of discussions by promoted.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_promoted", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_promoted", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + + +

Returns a list of discussions by trending.

+ +
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+ +
[]
+
+ + + +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_trending", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_trending", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_discussions_by_votes

+

Returns a list of discussions by votes.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_votes", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_discussions_by_votes", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_dynamic_global_properties

+

Returns the current dynamic global properties. See: Understanding Dynamic Global Properties

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "head_block_number": 0,
+  "head_block_id": "0000000000000000000000000000000000000000",
+  "time": "1970-01-01T00:00:00",
+  "current_witness": "",
+  "total_pow": "18446744073709551615",
+  "num_pow_witnesses": 0,
+  "virtual_supply": "0.000 STEEM",
+  "current_supply": "0.000 STEEM",
+  "confidential_supply": "0.000 STEEM",
+  "current_sbd_supply": "0.000 STEEM",
+  "confidential_sbd_supply": "0.000 STEEM",
+  "total_vesting_fund_steem": "0.000 STEEM",
+  "total_vesting_shares": "0.000 STEEM",
+  "total_reward_fund_steem": "0.000 STEEM",
+  "total_reward_shares2": "0",
+  "pending_rewarded_vesting_shares": "0.000 STEEM",
+  "pending_rewarded_vesting_steem": "0.000 STEEM",
+  "sbd_interest_rate": 0,
+  "sbd_print_rate": 10000,
+  "maximum_block_size": 0,
+  "current_aslot": 0,
+  "recent_slots_filled": "0",
+  "participation_count": 0,
+  "last_irreversible_block_num": 0,
+  "vote_power_reserve_rate": 40
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_escrow

+

Returns the escrow for a certain account by id.

+
Query Parameters JSON
+
["", 0]
+
+
Expected Response JSON
+
null
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_escrow", "params":["steemit", 1234], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_expiring_vesting_delegations

+

Returns the expiring vesting delegations for an account. Parameters: account:string, after:timestamp

+ + + + + + + + + + + + + + + + + + + + + +
account (string)after (timestamp) 
"steemit""2018-01-01T00:00:00"Queries for expiring vesting after January 1st, 2018.
"alice""2017-12-01T00:00:00"Queries for expiring vesting after December 1st, 2017.
+ +
Query Parameters JSON
+
["", "1970-01-01T00:00:00"]
+
+
Expected Response JSON
+
[
+  {
+    "id": 0,
+    "delegator": "",
+    "vesting_shares": "0.000000 VESTS",
+    "expiration": "1970-01-01T00:00:00"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_expiring_vesting_delegations", "params":["steemit","2018-01-01T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_expiring_vesting_delegations", "params":["alice","2017-12-01T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_feed

+

Returns a list of items in an account’s feed. Parameters: account:string; start_entry_id:int; limit:int up to 500

+ + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start_entry_id (int)limit (int) 
"steemit"01Queries the account named steemit starting on the first item, up to 1 result.
"alice"110Queries the account named alice starting on the second item, up to 10 results.
+ +
Query Parameters JSON
+
["", 0, 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_feed", "params":["steemit",0,1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_feed", "params":["alice",1,10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_feed_entries

+

Returns a list of entries in an account’s feed. Parameters: account:string; start_entry_id:int; limit:int up to 500

+ + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start_entry_id (int)limit (int) 
"steemit"01Queries the account named steemit starting on the first item, up to 1 result.
"alice"110Queries the account named alice starting on the second item, up to 10 results.
+ +
Query Parameters JSON
+
["", 0, 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_feed_entries", "params":["steemit",0,1], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_feed_entries", "params":["alice",1,10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_feed_history

+

Returns the history of price feed values.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "current_median_history": {"base": "0.000 STEEM", "quote": "0.000 STEEM"},
+  "price_history": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_feed_history", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_follow_count

+

Returns the count of followers/following for an account. Parameters: account:string

+ + + + + + + + + + + + + + + + + + +
account (string) 
"steemit"Queries the account named steemit.
"alice"Queries the account named alice.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
{
+  "account": "",
+  "follower_count": 0,
+  "following_count": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_follow_count", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_follow_count", "params":["alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_followers

+

Returns the list of followers for an account. Parameters: account:string; start:string (account to start from); type:string e.g.: blog; limit:int up to 1000

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start (string)type (string)limit (int) 
"steemit"null"blog"10Queries for follows of the account named steemit, up to 10 results.
"alice"null"ignore"100Queries for mutes of the account named alice, up to 100 results.
+ +
Query Parameters JSON
+
["", "", "", 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_followers", "params":["steemit",null,"blog",10], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_followers", "params":["alice",null,"ignore",100], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_following

+

Returns the list of accounts that are following an account. Parameters: account:string; start:string (account to start from); type:string e.g.: blog; limit:int up to 1000

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
account (string)start (string)type (string)limit (int) 
"steemit"null"blog"10Queries for follows of the account named steemit, up to 10 results.
"alice"null"ignore"100Queries for mutes of the account named alice, up to 100 results.
+ +
Query Parameters JSON
+
["", "", "", 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_following", "params":["steemit",null,"blog",10], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_following", "params":["alice",null,"ignore",100], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_hardfork_version

+ +
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
"0.0.0"
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_hardfork_version", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_key_references

+

Returns all accounts that have the key associated with their owner or active authorities.

+
Query Parameters JSON
+
[
+  [
+    "STM5jZtLoV8YbxCxr4imnbWn61zMB24wwonpnVhfXRmv7j6fk3dTH"
+  ]
+]
+
+
Expected Response JSON
+
[["steemit"]]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_key_references", "params":[["STM5jZtLoV8YbxCxr4imnbWn61zMB24wwonpnVhfXRmv7j6fk3dTH"]], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_market_history

+

Returns the market history for the internal SBD:STEEM market. Parameters: bucket_seconds:int; start:timestamp; end:timestamp

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bucket_seconds (int)start (timestamp)end (timestamp) 
15"2018-01-01T00:00:00""2018-01-02T00:00:00"Queries for market history between January 1st, 2018 and January 2nd, 2018, segmented by 15 seconds.
60"2018-01-01T00:00:00""2018-01-02T00:00:00"Queries for market history between January 1st, 2018 and January 2nd, 2018, segmented by one minute.
300"2018-01-01T00:00:00""2018-01-02T00:00:00"Queries for market history between January 1st, 2018 and January 2nd, 2018, segmented by five minutes.
3600"2018-01-01T00:00:00""2018-01-02T00:00:00"Queries for market history between January 1st, 2018 and January 2nd, 2018, segmented by one hour.
86400"2018-01-01T00:00:00""2018-01-02T00:00:00"Queries for market history between January 1st, 2018 and January 2nd, 2018, segmented by one day.
+ +
Query Parameters JSON
+
[0, "1970-01-01T00:00:00", "1970-01-01T00:00:00"]
+
+
Expected Response JSON
+
[
+  {
+    "id": 0,
+    "open": "1970-01-01T00:00:00",
+    "seconds": 0,
+    "steem": {
+      "high": 0,
+      "low": 0,
+      "open": 0,
+      "close": 0,
+      "volume": 0
+    },
+    "non_steem": {
+      "high": 0,
+      "low": 0,
+      "open": 0,
+      "close": 0,
+      "volume": 0
+    }
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history", "params":[15,"2018-01-01T00:00:00","2018-01-02T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history", "params":[60,"2018-01-01T00:00:00","2018-01-02T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history", "params":[300,"2018-01-01T00:00:00","2018-01-02T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history", "params":[3600,"2018-01-01T00:00:00","2018-01-02T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history", "params":[86400,"2018-01-01T00:00:00","2018-01-02T00:00:00"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_market_history_buckets

+

Returns the bucket seconds being tracked by the plugin.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
[15, 60, 300, 3600, 86400]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history_buckets", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_next_scheduled_hardfork

+

Returns the next scheduled hardfork.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "hf_version": "0.0.0",
+  "live_time": "1970-01-01T00:00:00"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_next_scheduled_hardfork", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_open_orders

+

Returns the open orders for an account. account:string

+
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_open_orders", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_open_orders", "params":["alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_ops_in_block

+

Returns all operations contained in a block. Parameters: block_num:int; only_virtual:boolean

+ + + + + + + + + + + + + + + + + + + + + +
block_num (int)only_virtual (boolean) 
1falseQueries the operations in block #1.
5443322trueQueries only the virtual operations in block #5,443,322.
+ +
Query Parameters JSON
+
[0, false]
+
+
Expected Response JSON
+
[
+  {
+    "trx_id": "0000000000000000000000000000000000000000",
+    "block": 0,
+    "trx_in_block": 0,
+    "op_in_trx": 0,
+    "virtual_op": 0,
+    "timestamp": "2016-10-01T06:31:24",
+    "op": [
+      "producer_reward",
+      {
+        "producer": "",
+        "vesting_shares": "0.000000 VESTS"
+      }
+    ]
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_ops_in_block", "params":[1,false], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_ops_in_block", "params":[5443322,true], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_order_book

+

Returns the internal market order book. Parameters: limit:int up to 500

+ + + + + + + + + + + + + + + + + + +
limit (int) 
10Queries up to 10 items in the order book.
500Queries up to 500 items in the order book.
+ +
Query Parameters JSON
+
[0]
+
+
Expected Response JSON
+
{"bids": [], "asks": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_order_book", "params":[10], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_order_book", "params":[50], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_owner_history

+

Returns the owner history of an account. Parameters: account:string

+ + + + + + + + + + + + + + +
account (string) 
"steemit"Queries the owner history for account named “steemit”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_owner_history", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_post_discussions_by_payout

+

Returns a list of post discussions by payout.

+
Query Parameters JSON
+
[
+  {
+    "tag": "",
+    "limit": 0,
+    "filter_tags": [],
+    "select_authors": [],
+    "select_tags": [],
+    "truncate_body": 0
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_post_discussions_by_payout", "params":[{"tag":"steem","limit":1}], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_post_discussions_by_payout", "params":[{"tag":"photography","limit":10,"truncate_body":0}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_potential_signatures

+

This method will return the set of all public keys that could possibly sign for a given transaction.

+
Query Parameters JSON
+
[
+  {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_potential_signatures", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["pow",{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_reblogged_by

+

Returns a list of authors that have reblogged a post. Parameters: author:string; permlink:string

+ + + + + + + + + + + + + + + + + + + + + +
author (string)permlink (string) 
"steemit""firstpost"Queries reblogs for content with a slug @steemit/firstpost
"alice""a-post-by-alice"Queries reblogs for content with a slug @alice/a-post-by-alice
+ +
Query Parameters JSON
+
["", ""]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_reblogged_by", "params":["steemit","firstpost"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_reblogged_by", "params":["alice","a-post-by-alice"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_recent_trades

+

Returns the most recent trades for the internal SBD:STEEM market. Parameters: limit:int up to 1000

+ + + + + + + + + + + + + + + + + + +
limit (int) 
10Queries up to 10 latest trades.
500Queries up to 500 latest trades.
+ +
Query Parameters JSON
+
[1]
+
+
Expected Response JSON
+
[
+  {
+    "date": "1970-01-01T00:00:00",
+    "current_pays": "0.0 SBD",
+    "open_pays": "0.0 STEEM"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_recent_trades", "params":[10], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_recent_trades", "params":[500], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_recovery_request

+

Returns the recovery request for an account. Parameters: account:string

+ + + + + + + + + + + + + + +
account (string) 
"steemit"Queries the recovery requests for account named “steemit”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
null
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_recovery_request", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_replies_by_last_update

+

Returns a list of replies by last update. start_parent_author:string, start_permlink:string, limit:int up to 100

+
Query Parameters JSON
+
["", "", 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_replies_by_last_update", "params":["steemit","firstpost",1], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_required_signatures

+

This API will take a partially signed transaction and a set of public keys that the owner has the ability to sign for and return the minimal subset of public keys that should add signatures to the transaction. Parameters: trx:object; available_keys:[string]

+ +
Query Parameters JSON
+
[
+  {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  },
+  []
+]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_required_signatures", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["pow",{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}]],"extensions":[],"signatures":[]},[]], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_reward_fund

+

Returns information about the current reward funds.

+
Query Parameters JSON
+
["post"]
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "name": "",
+  "reward_balance": "0.000 STEEM",
+  "recent_claims": "0",
+  "last_update": "1970-01-01T00:00:00",
+  "content_constant": "0",
+  "percent_curation_rewards": 0,
+  "percent_content_rewards": 0,
+  "author_reward_curve": "quadratic",
+  "curation_reward_curve": "34723648"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_reward_fund", "params":["post"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_savings_withdraw_from

+

Returns savings withdraw from an account. Parameters: account:string

+ + + + + + + + + + + + + + +
account (string) 
"steemit"Queries the savings withdraw for account named “steemit”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_savings_withdraw_from", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_savings_withdraw_to

+

Returns the savings withdraw to an account. Parameters: account:string

+ + + + + + + + + + + + + + +
account (string) 
"steemit"Queries the savings withdraw for account named “steemit”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_savings_withdraw_to", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_state

+

Returns the state of a path. Deprecated. Parameters: path:string

+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
{
+  "current_route": "",
+  "props": {
+    "head_block_number": 0,
+    "head_block_id": "0000000000000000000000000000000000000000",
+    "time": "1970-01-01T00:00:00",
+    "current_witness": "",
+    "total_pow": "18446744073709551615",
+    "num_pow_witnesses": 0,
+    "virtual_supply": "0.000 STEEM",
+    "current_supply": "0.000 STEEM",
+    "confidential_supply": "0.000 STEEM",
+    "current_sbd_supply": "0.000 STEEM",
+    "confidential_sbd_supply": "0.000 STEEM",
+    "total_vesting_fund_steem": "0.000 STEEM",
+    "total_vesting_shares": "0.000 STEEM",
+    "total_reward_fund_steem": "0.000 STEEM",
+    "total_reward_shares2": "0",
+    "pending_rewarded_vesting_shares": "0.000 STEEM",
+    "pending_rewarded_vesting_steem": "0.000 STEEM",
+    "sbd_interest_rate": 0,
+    "sbd_print_rate": 10000,
+    "maximum_block_size": 0,
+    "current_aslot": 0,
+    "recent_slots_filled": "0",
+    "participation_count": 0,
+    "last_irreversible_block_num": 0,
+    "vote_power_reserve_rate": 40,
+    "average_block_size": 0,
+    "current_reserve_ratio": 1,
+    "max_virtual_bandwidth": "0"
+  },
+  "tag_idx": {"trending": []},
+  "tags": {},
+  "content": {},
+  "accounts": {},
+  "witnesses": {},
+  "discussion_idx": {},
+  "witness_schedule": {
+    "id": 0,
+    "current_virtual_time": "0",
+    "next_shuffle_block_num": 1,
+    "current_shuffled_witnesses": [],
+    "num_scheduled_witnesses": 1,
+    "top19_weight": 1,
+    "timeshare_weight": 5,
+    "miner_weight": 1,
+    "witness_pay_normalization_factor": 25,
+    "median_props": {
+      "account_creation_fee": "0.000 STEEM",
+      "maximum_block_size": 131072,
+      "sbd_interest_rate": 1000
+    },
+    "majority_version": "0.0.0",
+    "max_voted_witnesses": 19,
+    "max_miner_witnesses": 1,
+    "max_runner_witnesses": 1,
+    "hardfork_required_witnesses": 17
+  },
+  "feed_price": {"base": "0.000 STEEM", "quote": "0.000 STEEM"},
+  "error": ""
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_state", "params":["/@steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_tags_used_by_author

+

Returns a list of tags used by an author. Parameters: author:string

+ + + + + + + + + + + + + + +
account (string) 
"steemit"Queries the tags used by the account named “steemit”.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_tags_used_by_author", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_ticker

+

Returns the market ticker for the internal SBD:STEEM market.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "latest": "0.00000000000000000",
+  "lowest_ask": "0.00000000000000000",
+  "highest_bid": "0.00000000000000000",
+  "percent_change": "0.00000000000000000",
+  "steem_volume": "0.000 STEEM",
+  "sbd_volume": "0.000 STEEM"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_ticker", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_trade_history

+

Returns the trade history for the internal SBD:STEEM market. Parameters: start:timestamp; end:timestamp; limit:int up to 1000

+ + + + + + + + + + + + + + + + + + +
start (timestamp)end (timestamp)limit (int) 
"2018-01-01T00:00:00""2018-01-02T00:00:00"10Queries up to 10 trades between January 1st, 2018 and January 2nd, 2018.
+ +
Query Parameters JSON
+
[
+  "1970-01-01T00:00:00",
+  "1970-01-01T00:00:00",
+  1000
+]
+
+
Expected Response JSON
+
[
+  {
+    "date": "1970-01-01T00:00:00",
+    "current_pays": "0.000 SBD",
+    "open_pays": "0.000 STEEM"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_trade_history", "params":["2018-01-01T00:00:00","2018-01-02T00:00:00",10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_transaction

+

Returns the details of a transaction based on a transaction id. Parameters: trx_id:string

+ + + + + + + + + + + + + + +
trx_id (string) 
"6fde0190a97835ea6d9e651293e90c89911f933c"Queries for this exact transaction id.
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
{
+  "ref_block_num": 0,
+  "ref_block_prefix": 0,
+  "expiration": "1970-01-01T00:00:00",
+  "operations": [],
+  "extensions": [],
+  "signatures": [],
+  "transaction_id": "0000000000000000000000000000000000000000",
+  "block_num": 0,
+  "transaction_num": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_transaction", "params":["6fde0190a97835ea6d9e651293e90c89911f933c"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_transaction_hex

+

Returns a hexdump of the serialized binary form of a transaction.

+
Query Parameters JSON
+
[
+  {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+]
+
+
Expected Response JSON
+
""
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_transaction_hex", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["pow",{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
+ + + +

Returns the list of trending tags. Parameter: start_tag:string; limit:int up to 100

+ + + + + + + + + + + + + + + + + + + + + +
tag (string)limit (int) 
null100Queries the top 100 trending tags.
"steem"10Queries the tags after “steem”, up to 10 tags.
+ + +
["", 1]
+
+ +
[
+  {
+    "name": "",
+    "total_payouts": "0.000 SBD",
+    "net_votes": 0,
+    "top_posts": 0,
+    "comments": 0,
+    "trending": ""
+  }
+]
+
+ + + +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_trending_tags", "params":[null,100], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_trending_tags", "params":["steem",10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_version

+

Returns the versions of blockchain, steem, and FC.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "blockchain_version": "",
+  "steem_revision": "",
+  "fc_revision": ""
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_version", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_vesting_delegations

+

Returns the vesting delegations by an account. Parameters: delegator_account:string; start_account:string; limit:int up to 1000

+ + + + + + + + + + + + + + + + + + +
delegator_account (string)start_account (string)limit (int) 
"steemit"null10Queries up to 10 vesting delegations by “steemit”.
+ +
Query Parameters JSON
+
["", "", 1]
+
+
Expected Response JSON
+
[
+  {
+    "id": 0,
+    "delegator": "",
+    "delegatee": "",
+    "vesting_shares": "0.000000 VESTS",
+    "min_delegation_time": "1970-01-01T00:00:00"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_vesting_delegations", "params":["steemit",null,10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_volume

+

Returns the market volume for the past 24 hours.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "steem_volume": "0.000 STEEM",
+  "sbd_volume": "0.000 STEEM"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_volume", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_withdraw_routes

+

Returns the withdraw routes for an account. Parameters: account:string; type:string

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
account (string)type (string) 
"steemit""outgoing"Queries outgoing withdraw routes by “steemit”.
"steemit""incoming"Queries incoming withdraw routes by “steemit”.
"steemit""all"Queries all withdraw routes by “steemit”.
+ +
Query Parameters JSON
+
["", ""]
+
+
Expected Response JSON
+
[
+  {
+    "id": 0,
+    "from_account": "",
+    "to_account": "",
+    "percent": 0,
+    "auto_vest": false
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_withdraw_routes", "params":["steemit","outgoing"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_withdraw_routes", "params":["steemit","incoming"], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_withdraw_routes", "params":["steemit","all"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_witness_by_account

+

Returns the witness of an account. Parameters: account:string

+ + + + + + + + + + + + + + +
account (string) 
"steemit"Queries witness account of “steemit” (of null if none exists).
+ +
Query Parameters JSON
+
[""]
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "owner": "",
+  "created": "1970-01-01T00:00:00",
+  "url": "",
+  "votes": "0",
+  "virtual_last_update": "0",
+  "virtual_position": "0",
+  "virtual_scheduled_time": "0",
+  "total_missed": 0,
+  "last_aslot": 0,
+  "last_confirmed_block_num": 0,
+  "pow_worker": 0,
+  "signing_key": "",
+  "props": {
+    "account_creation_fee": "0.000 STEEM",
+    "maximum_block_size": 65536,
+    "sbd_interest_rate": 0
+  },
+  "sbd_exchange_rate": {"base": "0.000 SBD", "quote": "0.000 STEEM"},
+  "last_sbd_exchange_update": "1970-01-01T00:00:00",
+  "last_work": "",
+  "running_version": "",
+  "hardfork_version_vote": "",
+  "hardfork_time_vote": "1970-01-01T00:00:00"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witness_by_account", "params":["steemit"], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_witness_count

+ +
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
0
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witness_count", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_witness_schedule

+

Returns the current witness schedule.

+
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "current_virtual_time": "0",
+  "next_shuffle_block_num": 1,
+  "current_shuffled_witnesses": [],
+  "num_scheduled_witnesses": 1,
+  "top19_weight": 1,
+  "timeshare_weight": 5,
+  "miner_weight": 1,
+  "witness_pay_normalization_factor": 25,
+  "median_props": {
+    "account_creation_fee": "0.000 STEEM",
+    "maximum_block_size": 131072,
+    "sbd_interest_rate": 1000
+  },
+  "majority_version": "0.0.0",
+  "max_voted_witnesses": 19,
+  "max_miner_witnesses": 1,
+  "max_runner_witnesses": 1,
+  "hardfork_required_witnesses": 17
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witness_schedule", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_witnesses

+

Returns current witnesses.

+
Query Parameters JSON
+
[[0]]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witnesses", "params":[[28]], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_witnesses_by_vote

+

Returns current witnesses by vote. Parameters: start_name:string; limit:int up to 1000

+ + + + + + + + + + + + + + + + + + + + + +
account (string)limit (int) 
null21Queries top 21 witness votes.
"a"1Queries top 10 witness votes starting with “a”.
+ +
Query Parameters JSON
+
["", 1000]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witnesses_by_vote", "params":[null, 21], "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witnesses_by_vote", "params":["a", 1], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.lookup_account_names

+

Looks up account names. accounts:[string]

+
Query Parameters JSON
+
[["steemit"]]
+
+
Expected Response JSON
+
[
+  {
+    "id": 28,
+    "name": "steemit",
+    "owner": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5tfrdPG1Ycjwa9FuBUueDFFyygndBLXdVEEs2c9eRKScnFk6vM",
+          1
+        ],
+        [
+          "STM71f6yWztimJuREVyyMXNqAVbx1FzPVW6LLXNoQ35dHwKuszmHX",
+          1
+        ],
+        [
+          "STM7U3ymhUTuKME72dpdpQkdQvh722gTLjKBKtmKQPPWgtkr418Nf",
+          1
+        ]
+      ]
+    },
+    "active": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5832HKCJzs6K3rRCsZ1PidTKgjF38ZJb718Y3pCW92HEMsCGPf",
+          1
+        ],
+        [
+          "STM7Q2rLBqzPzFeteQZewv9Lu3NLE69fZoLeL6YK59t7UmssCBNTU",
+          1
+        ]
+      ]
+    },
+    "posting": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5jZtLoV8YbxCxr4imnbWn61zMB24wwonpnVhfXRmv7j6fk3dTH",
+          1
+        ],
+        [
+          "STM7xVFaqi8RxhWKZwuLA2bKrAiQmhnrbgvw4e2ChAsKYQbPjqUq2",
+          1
+        ],
+        [
+          "STM83dmDkQcZU9X8MWcxsTztSyutE6udrb55PvYgu7RLzStaoAt67",
+          1
+        ]
+      ]
+    },
+    "memo_key": "STM5jZtLoV8YbxCxr4imnbWn61zMB24wwonpnVhfXRmv7j6fk3dTH",
+    "json_metadata": "",
+    "proxy": "",
+    "last_owner_update": "2017-03-16T21:17:51",
+    "last_account_update": "2017-03-16T23:10:36",
+    "created": "2016-03-24T17:00:21",
+    "mined": true,
+    "recovery_account": "steem",
+    "last_account_recovery": "1970-01-01T00:00:00",
+    "reset_account": "null",
+    "comment_count": 0,
+    "lifetime_vote_count": 0,
+    "post_count": 1,
+    "can_vote": true,
+    "voting_power": 9950,
+    "last_vote_time": "2016-12-04T23:10:57",
+    "balance": "0.006 STEEM",
+    "savings_balance": "11006644.632 STEEM",
+    "sbd_balance": "8581.890 SBD",
+    "sbd_seconds": "18846158467785",
+    "sbd_seconds_last_update": "2018-04-10T04:08:36",
+    "sbd_last_interest_payment": "2018-03-15T17:58:24",
+    "savings_sbd_balance": "0.000 SBD",
+    "savings_sbd_seconds": "0",
+    "savings_sbd_seconds_last_update": "1970-01-01T00:00:00",
+    "savings_sbd_last_interest_payment": "1970-01-01T00:00:00",
+    "savings_withdraw_requests": 0,
+    "reward_sbd_balance": "0.000 SBD",
+    "reward_steem_balance": "0.000 STEEM",
+    "reward_vesting_balance": "0.000000 VESTS",
+    "reward_vesting_steem": "0.000 STEEM",
+    "vesting_shares": "90039851836.689703 VESTS",
+    "delegated_vesting_shares": "0.000000 VESTS",
+    "received_vesting_shares": "0.000000 VESTS",
+    "vesting_withdraw_rate": "0.000000 VESTS",
+    "next_vesting_withdrawal": "1969-12-31T23:59:59",
+    "withdrawn": 0,
+    "to_withdraw": 0,
+    "withdraw_routes": 0,
+    "curation_rewards": 0,
+    "posting_rewards": 3548,
+    "proxied_vsf_votes": ["28583799126", 0, 0, 0],
+    "witnesses_voted_for": 0,
+    "last_post": "2016-03-30T18:30:18",
+    "last_root_post": "2016-03-30T18:30:18"
+  }
+]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.lookup_account_names", "params":[["steemit"]], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.lookup_accounts

+

Looks up accounts starting with name. Parameterslower_bound_name:string; limit:int up to 1000

+ + + + + + + + + + + + + + + + +
lower_bound_name (string)limit (int) 
"a"10Queries up to 10 accounts that start with “a”.
+ +
Query Parameters JSON
+
["", 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.lookup_accounts", "params":["a",10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.lookup_witness_accounts

+

Looks up witness accounts starting with name. Parameters: lower_bound_name:string; limit:int up to 1000

+ + + + + + + + + + + + + + + + +
lower_bound_name (string)limit (int) 
"a"10Queries up to 10 witnesses that start with “a”.
+ +
Query Parameters JSON
+
["", 1]
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.lookup_witness_accounts", "params":["a",10], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.verify_account_authority

+

Not Implemented

+ +
Query Parameters JSON
+
["", [""]]
+
+
Expected Response JSON
+
false
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.verify_account_authority", "params":["steemit",["STM7Q2rLBqzPzFeteQZewv9Lu3NLE69fZoLeL6YK59t7UmssCBNTU"]], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.verify_authority

+

Returns true if the transaction has all of the required signatures.

+
Query Parameters JSON
+
[
+  {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+]
+
+
Expected Response JSON
+
false
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.verify_authority", "params":[{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[["pow",{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}]],"extensions":[],"signatures":[]}], "id":1}' https://api.steemit.com
+
+ +
+ + +

condenser_api.get_account_references

+ +
Query Parameters JSON
+
[]
+
+
Expected Response JSON
+
[]
+
+ +
+ + +
+ +
+

+ + Broadcast Ops Comment + + +

+ + + +

This is a brief overview of the parameters allowed and values passed by the ‘comment’ operation in the broadcast API

+ +

Additional info for API definitions is available on the dev portal

+ +

Purpose:

+ +

A broadcast operation on Steem is a way of expressing intention on the blockchain. +It is used to transmit signed transactions to the Steem network.

+ +

There are various broadcast types, in this instance we are focusing specifically on the comment operation. +Each of the broadcast operations have parameters that are passed with the specific method in order to affect the required change to the blockchain. +In other words, the broadcast.comment operation creates a comment or a post (post are also defined as comments) on the Steem blockchain.

+ +

Rules:

+ + +

Parameters:

+ + +

Additional Parameter Definitions:

+ + +

A typical comment operation would look similar to the below:

+ +
  const post = {
+    author :"Joe",
+    title :"A post by Joe",
+    body :"Look at my awesome post",
+    parent_author :'',
+    parent_permlink :"steem",
+    permlink :"a-post-by-joe",
+    json_metadata :"{\"tags\":[\"steemit\",\"example\",\"tags\"]}",
+  };
+
+

In which case the complete broadcast operation would look like this:

+ +
  broadcast.comment(post, privatePostingKey)
+
+

With privatePostingKey being the private posting key of the author broadcasting the comment or post

+ +

Create_vs_Update:

+ +

When a comment is first broadcast, the permlink must be unique for the author. + Otherwise, it is interpreted as an update operation. Updating will either replace the entire body with the latest operation or patch the body if using diff-match-patch.

+ +

For example, if we have a paragraph that has already been broadcast:

+ +

“It’s been quite a lot of fun working with these wonderful folk at Steemit, Inc”

+ +

And we want to change it to:

+ +

“It’s been quite a lot of fun working with these wonderful people at Steemit, Inc”

+ +

We can broadcast the comment operation with the following body:

+ + +

The blockchain will know that this means we have changed the word ‘folk’ to ‘people’ within that paragraph so when fetching this content, this diff will be applied.

+ +

In addition to body, the title and json_metadata fields will also be replaced by the latest operation.

+ +

Comment_Options: LINK

+ +

Updating_Archived_Content:

+ +

Content that is older than 7 days is considered “archived” and cannot be edited unless the author indicates otherwise by broadcasting a custom_json to the witness plugin using their active authority.

+ +

As of HF18, the witness plugin has a custom operation called enable_content_editing that allows a user to signal they want to edit their content. By consensus, content is editable indefinitely, but is soft forked to be frozen after payout. This operation requires an active key and is designed to prevent vandalism if a posting key is compromised.

+ +

For ‘custom_json’: LINK

+ +

Vote: LINK

+ +

It should also be noted that a vote operation can accompany a comment in the same transaction when the author self_upvotes

+ + +
+ +
+

+ + Account By Key Api + + +

+ + + +

Used to lookup account information based on a key. These AppBase API methods are still under development and subject to change.

+ + +

account_by_key_api.get_key_references

+

Returns all accounts that have the key associated with their owner or active authorities.

+
Query Parameters JSON
+
{"keys": []}
+
+
Expected Response JSON
+
{"accounts": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"account_by_key_api.get_key_references", "params":{"keys":["STM5jZtLoV8YbxCxr4imnbWn61zMB24wwonpnVhfXRmv7j6fk3dTH"]}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ +
+

+ + Account History Api + + +

+ + + +

Used to lookup account history information. These AppBase API methods are still under development and subject to change.

+ + +

account_history_api.get_account_history

+

Returns a history of all operations for a given account.

+
Query Parameters JSON
+
{
+  "account": "",
+  "start": "18446744073709551615",
+  "limit": 1000
+}
+
+
Expected Response JSON
+
{"history": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"account_history_api.get_account_history", "params":{"account":"steemit", "start":1000, "limit":1000}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"account_history_api.get_account_history", "params":{"account":"steemit", "start":-1, "limit":10000}, "id":1}' https://api.steemit.com
+
+ +
+ + +

account_history_api.get_ops_in_block

+

Returns all operations contained in a block.

+
Query Parameters JSON
+
{"block_num": 0, "only_virtual": false}
+
+
Expected Response JSON
+
{"ops": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"account_history_api.get_ops_in_block", "params":{"block_num":1,"only_virtual":false}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"account_history_api.get_ops_in_block", "params":{"block_num":5443322,"only_virtual":true}, "id":1}' https://api.steemit.com
+
+ +
+ + +

account_history_api.get_transaction

+

Returns the details of a transaction based on a transaction id.

+
Query Parameters JSON
+
{"id": "0000000000000000000000000000000000000000"}
+
+
Expected Response JSON
+
{
+  "ref_block_num": 0,
+  "ref_block_prefix": 0,
+  "expiration": "1970-01-01T00:00:00",
+  "operations": [],
+  "extensions": [],
+  "signatures": [],
+  "transaction_id": "0000000000000000000000000000000000000000",
+  "block_num": 0,
+  "transaction_num": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"account_history_api.get_transaction", "params":{"id":"6fde0190a97835ea6d9e651293e90c89911f933c"}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ +
+

+ + Database Api + + +

+ + + +

Used to query information about accounts, transactions, and blockchain data. These AppBase API methods are still under development and subject to change.

+ + +

database_api.find_account_recovery_requests

+

Returns a list of account recovery requests.

+
Query Parameters JSON
+
{"accounts": []}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.find_accounts

+

Search for accounts.

+
Query Parameters JSON
+
{"accounts": []}
+
+
Expected Response JSON
+
{"accounts": []}
+
+ +
+ + +

database_api.find_change_recovery_account_requests

+

Returns a list of requests to change the recovery account.

+
Query Parameters JSON
+
{"accounts": []}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.find_comments

+

Search for comments.

+
Query Parameters JSON
+
{"comments": []}
+
+
Expected Response JSON
+
{"comments": []}
+
+ +
+ + +

database_api.find_decline_voting_rights_requests

+

Returns a list of requests to decline voting rights.

+
Query Parameters JSON
+
{"accounts": []}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.find_escrows

+

Returns a list of escrows.

+
Query Parameters JSON
+
{"from": ""}
+
+
Expected Response JSON
+
{"escrows": []}
+
+ +
+ + +

database_api.find_limit_orders

+

Returns a list of limit orders.

+
Query Parameters JSON
+
{"account": ""}
+
+
Expected Response JSON
+
{"orders": []}
+
+ +
+ + +

database_api.find_owner_histories

+

Returns owner authority history.

+
Query Parameters JSON
+
{"owner": ""}
+
+
Expected Response JSON
+
{"owner_auths": []}
+
+ +
+ + +

database_api.find_savings_withdrawals

+

Returns the list of savings withdrawls for an account.

+
Query Parameters JSON
+
{"account": ""}
+
+
Expected Response JSON
+
{"withdrawals": []}
+
+ +
+ + +

database_api.find_sbd_conversion_requests

+

Returns the list of SBD conversion requests for an account.

+
Query Parameters JSON
+
{"account": ""}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.find_vesting_delegation_expirations

+

Returns the expirations for vesting delegations.

+
Query Parameters JSON
+
{"account": ""}
+
+
Expected Response JSON
+
{"delegations": []}
+
+ +
+ + +

database_api.find_vesting_delegations

+

Returns the list of vesting delegations for an account.

+
Query Parameters JSON
+
{"account": ""}
+
+
Expected Response JSON
+
{"delegations": []}
+
+ +
+ + +

database_api.find_votes

+

Returns the votes for an author and permlink.

+
Query Parameters JSON
+
{"author": "", "permlink": ""}
+
+
Expected Response JSON
+
{"votes": []}
+
+ +
+ + +

database_api.find_withdraw_vesting_routes

+

Returns the list of vesting withdraw routes for an account.

+
Query Parameters JSON
+
{"account": "", "order": "by_name"}
+
+
Expected Response JSON
+
{"routes": []}
+
+ +
+ + +

database_api.find_witnesses

+

Search for witnesses.

+
Query Parameters JSON
+
{"owners": []}
+
+
Expected Response JSON
+
{"witnesses": []}
+
+ +
+ + +

database_api.get_active_witnesses

+

Returns the list of active witnesses.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{"witnesses": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_active_witnesses", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_config

+

Returns information about compile-time constants. Some properties may not be present. See: Understanding Configuration Values

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_config", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_current_price_feed

+

Returns the current price feed.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "base": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "quote": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  }
+}
+
+ +
+ + +

database_api.get_dynamic_global_properties

+

Returns the current dynamic global properties. See: Understanding Dynamic Global Properties

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "head_block_number": 0,
+  "head_block_id": "0000000000000000000000000000000000000000",
+  "time": "1970-01-01T00:00:00",
+  "current_witness": "",
+  "total_pow": "18446744073709551615",
+  "num_pow_witnesses": 0,
+  "virtual_supply": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "current_supply": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "confidential_supply": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "current_sbd_supply": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000013"
+  },
+  "confidential_sbd_supply": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000013"
+  },
+  "total_vesting_fund_steem": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "total_vesting_shares": {
+    "amount": "0",
+    "precision": 6,
+    "nai": "@@000000037"
+  },
+  "total_reward_fund_steem": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "total_reward_shares2": "0",
+  "pending_rewarded_vesting_shares": {
+    "amount": "0",
+    "precision": 6,
+    "nai": "@@000000037"
+  },
+  "pending_rewarded_vesting_steem": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "sbd_interest_rate": 0,
+  "sbd_print_rate": 10000,
+  "maximum_block_size": 0,
+  "current_aslot": 0,
+  "recent_slots_filled": "0",
+  "participation_count": 0,
+  "last_irreversible_block_num": 0,
+  "vote_power_reserve_rate": 40,
+  "delegation_return_period": 604800,
+  "reverse_auction_seconds": 0,
+  "available_account_subsidies": 0,
+  "sbd_stop_percent": 0,
+  "sbd_start_percent": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_dynamic_global_properties", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_feed_history

+

Returns the history of price feed values.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "current_median_history": {
+    "base": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "quote": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    }
+  },
+  "price_history": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_feed_history", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_hardfork_properties

+

Returns the current properties about the blockchain’s hardforks.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "processed_hardforks": [],
+  "last_hardfork": 0,
+  "current_hardfork_version": "0.0.0",
+  "next_hardfork": "0.0.0",
+  "next_hardfork_time": "1970-01-01T00:00:00"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_hardfork_properties", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_order_book

+

Returns the order book.

+
Query Parameters JSON
+
{"limit": 0}
+
+
Expected Response JSON
+
{"asks": [], "bids": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_order_book", "params":{"limit":10}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_order_book", "params":{"limit":50}, "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_potential_signatures

+

This method will return the set of all public keys that could possibly sign for a given transaction.

+
Query Parameters JSON
+
{
+  "trx": {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+}
+
+
Expected Response JSON
+
{"keys": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_potential_signatures", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"pow_operation","value":{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}}],"extensions":[],"signatures":[]}}, "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_required_signatures

+

This API will take a partially signed transaction and a set of public keys that the owner has the ability to sign for and return the minimal subset of public keys that should add signatures to the transaction.

+
Query Parameters JSON
+
{
+  "trx": {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  },
+  "available_keys": []
+}
+
+
Expected Response JSON
+
{"keys": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_required_signatures", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"pow_operation","value":{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}}],"extensions":[],"signatures":[]},"available_keys":[]}, "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_reward_funds

+

Returns information about the current reward funds.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{"funds": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_reward_funds", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_transaction_hex

+

Returns a hexdump of the serialized binary form of a transaction.

+
Query Parameters JSON
+
{
+  "trx": {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+}
+
+
Expected Response JSON
+
{"hex": ""}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_transaction_hex", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"pow_operation","value":{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}}],"extensions":[],"signatures":[]}}, "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_version

+

Returns the compile time versions of blockchain, steem, FC. Also returns the boot time version of the chain id (may be different from compile time value only when looking at a testnet)

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "blockchain_version": "",
+  "steem_revision": "",
+  "fc_revision": "",
+  "chain_id": "0000000000000000000000000000000000000000000000000000000000000000"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_version", "params":[], "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.get_witness_schedule

+

Returns the current witness schedule.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "current_virtual_time": "0",
+  "next_shuffle_block_num": 76479392,
+  "current_shuffled_witnesses": [],
+  "num_scheduled_witnesses": 0,
+  "elected_weight": 132,
+  "timeshare_weight": 86,
+  "miner_weight": 125,
+  "witness_pay_normalization_factor": 32767,
+  "median_props": {
+    "account_creation_fee": {
+      "amount": "1",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "maximum_block_size": 131072,
+    "sbd_interest_rate": 1000,
+    "account_subsidy_budget": 797,
+    "account_subsidy_decay": 347321
+  },
+  "majority_version": "0.0.0",
+  "max_voted_witnesses": 0,
+  "max_miner_witnesses": 0,
+  "max_runner_witnesses": 0,
+  "hardfork_required_witnesses": 0,
+  "account_subsidy_rd": {
+    "resource_unit": 0,
+    "budget_per_time_unit": 0,
+    "pool_eq": 0,
+    "max_pool_size": 0,
+    "decay_params": {
+      "decay_per_time_unit": 0,
+      "decay_per_time_unit_denom_shift": 0
+    },
+    "min_decay": 0
+  },
+  "account_subsidy_witness_rd": {
+    "resource_unit": 0,
+    "budget_per_time_unit": 0,
+    "pool_eq": 0,
+    "max_pool_size": 0,
+    "decay_params": {
+      "decay_per_time_unit": 0,
+      "decay_per_time_unit_denom_shift": 0
+    },
+    "min_decay": 0
+  },
+  "min_witness_account_subsidy_decay": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_witness_schedule", "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.list_account_recovery_requests

+

Returns a list of account recovery requests.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.list_accounts

+

Returns a list of accounts.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"accounts": []}
+
+ +
+ + +

database_api.list_change_recovery_account_requests

+

Returns a list of recovery account change requests.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.list_comments

+

Returns a list of comments.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"comments": []}
+
+ +
+ + +

database_api.list_decline_voting_rights_requests

+

Returns a list of decline voting rights requests.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.list_escrows

+

Returns a list of escrows.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"escrows": []}
+
+ +
+ + +

database_api.list_limit_orders

+

Returns a list of limit orders.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"orders": []}
+
+ +
+ + +

database_api.list_owner_histories

+

Returns a list of owner authority histories.

+
Query Parameters JSON
+
{"start": null, "limit": 0}
+
+
Expected Response JSON
+
{"owner_auths": []}
+
+ +
+ + +

database_api.list_savings_withdrawals

+

Returns a list of savings withdrawls.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"withdrawals": []}
+
+ +
+ + +

database_api.list_sbd_conversion_requests

+

Returns a list of SBD conversion requests.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"requests": []}
+
+ +
+ + +

database_api.list_vesting_delegation_expirations

+

Returns a list of vesting delegation expirations.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"delegations": []}
+
+ +
+ + +

database_api.list_vesting_delegations

+

Returns a list of vesting delegations.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"delegations": []}
+
+ +
+ + +

database_api.list_votes

+

Returns a list of votes.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"votes": []}
+
+ +
+ + +

database_api.list_withdraw_vesting_routes

+

Returns a list of vesting withdraw routes.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"routes": []}
+
+ +
+ + +

database_api.list_witness_votes

+

Returns a list of witness votes.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"votes": []}
+
+ +
+ + +

database_api.list_witnesses

+

Returns the list of witnesses.

+
Query Parameters JSON
+
{"start": null, "limit": 0, "order": "by_name"}
+
+
Expected Response JSON
+
{"witnesses": []}
+
+ +
+ + +

database_api.verify_account_authority

+

Not Implemented

+ +
Query Parameters JSON
+
{"account": "", "signers": []}
+
+
Expected Response JSON
+
{"valid": false}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.verify_account_authority", "params":{"account":"steemit","signers":["STM7Q2rLBqzPzFeteQZewv9Lu3NLE69fZoLeL6YK59t7UmssCBNTU"]}, "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.verify_authority

+

Returns true if the transaction has all of the required signatures.

+
Query Parameters JSON
+
{
+  "trx": {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  }
+}
+
+
Expected Response JSON
+
{"valid": false}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"database_api.verify_authority", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"pow_operation","value":{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}}],"extensions":[],"signatures":[]}}, "id":1}' https://api.steemit.com
+
+ +
+ + +

database_api.verify_signatures

+

This is a general purpose API that checks signatures against accounts for an arbitrary sha256 hash using the existing authority structures.

+
Query Parameters JSON
+
{
+  "hash": "0000000000000000000000000000000000000000000000000000000000000000",
+  "signatures": [],
+  "required_owner": [],
+  "required_active": [],
+  "required_posting": [],
+  "required_other": []
+}
+
+
Expected Response JSON
+
{"valid": false}
+
+ +
+ + +
+ +
+

+ + Follow Api + + +

+ + + +

Used to lookup information related to reputation and account follow operations. These AppBase API methods are still under development and subject to change.

+ + +

follow_api.get_account_reputations

+

Returns a list of account reputations.

+
Query Parameters JSON
+
{"account_lower_bound": "", "limit": 1000}
+
+
Expected Response JSON
+
{"reputations": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_account_reputations", "params":{"account_lower_bound":"steemit", "limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_account_reputations", "params":{"account_lower_bound":"a", "limit":10}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_blog

+

Returns the list of blog entries for an account.

+
Query Parameters JSON
+
{"account": "", "start_entry_id": 0, "limit": 500}
+
+
Expected Response JSON
+
{"blog": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog", "params":{"account":"steemit","start_entry_id":0,"limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog", "params":{"account":"alice","start_entry_id":0,"limit":50}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_blog_authors

+

Returns a list of authors that have had their content reblogged on a given blog account.

+
Query Parameters JSON
+
{"blog_account": ""}
+
+
Expected Response JSON
+
{"blog_authors": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog_authors", "params":{"blog_account":"steemit"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog_authors", "params":{"blog_account":"alice"}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_blog_entries

+

Returns a list of blog entries for an account.

+
Query Parameters JSON
+
{"account": "", "start_entry_id": 0, "limit": 500}
+
+
Expected Response JSON
+
{"blog": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog_entries", "params":{"account":"steemit","start_entry_id":0,"limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog_entries", "params":{"account":"alice","start_entry_id":0,"limit":50}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_feed

+

Returns a list of items in an account’s feed.

+
Query Parameters JSON
+
{"account": "", "start_entry_id": 0, "limit": 500}
+
+
Expected Response JSON
+
{"feed": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_feed", "params":{"account":"steemit","start_entry_id":0,"limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_feed", "params":{"account":"alice","start_entry_id":1,"limit":10}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_feed_entries

+

Returns a list of entries in an account’s feed.

+
Query Parameters JSON
+
{"account": "", "start_entry_id": 0, "limit": 500}
+
+
Expected Response JSON
+
{"feed": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_feed_entries", "params":{"account":"steemit","start_entry_id":0,"limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_feed_entries", "params":{"account":"alice","start_entry_id":1,"limit":10}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_follow_count

+

Returns the count of followers for an account.

+
Query Parameters JSON
+
{"account": ""}
+
+
Expected Response JSON
+
{
+  "account": "",
+  "follower_count": 0,
+  "following_count": 0
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_follow_count", "params":{"account":"steemit"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_follow_count", "params":{"account":"alice"}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_followers

+

Returns the list of followers for an account.

+
Query Parameters JSON
+
{
+  "account": "",
+  "start": "",
+  "type": "undefined",
+  "limit": 1000
+}
+
+
Expected Response JSON
+
{"followers": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_followers", "params":{"account":"steemit","start":null,"type":"blog","limit":10}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_followers", "params":{"account":"alice","start":null,"type":"ignore","limit":100}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_following

+

Returns the list of accounts that are following an account.

+
Query Parameters JSON
+
{
+  "account": "",
+  "start": "",
+  "type": "undefined",
+  "limit": 1000
+}
+
+
Expected Response JSON
+
{"following": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_following", "params":{"account":"steemit","start":null,"type":"blog","limit":10}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_following", "params":{"account":"alice","start":null,"type":"ignore","limit":100}, "id":1}' https://api.steemit.com
+
+ +
+ + +

follow_api.get_reblogged_by

+

Returns a list of authors that have reblogged a post.

+
Query Parameters JSON
+
{"author": "", "permlink": ""}
+
+
Expected Response JSON
+
{"accounts": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_reblogged_by", "params":{"author":"steemit","permlink":"firstpost"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_reblogged_by", "params":{"author":"alice","permlink":"a-post-by-alice"}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ +
+

+ + Jsonrpc + + +

+ + + +

Used to lookup information about the JSON RPC API. These AppBase API methods are still under development and subject to change.

+ + +

jsonrpc.get_methods

+

Returns a list of methods supported by the JSON RPC API.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"jsonrpc.get_methods", "id":1}' https://api.steemit.com
+
+ +
+ + +

jsonrpc.get_signature

+

Returns the signature information for a JSON RPC method including the arguments and expected response JSON.

+
Query Parameters JSON
+
{"method": ""}
+
+
Expected Response JSON
+
{"args": null, "ret": null}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"jsonrpc.get_signature", "params":{"method":"jsonrpc.get_methods"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"jsonrpc.get_signature", "params":{"method":"jsonrpc.get_signature"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"jsonrpc.get_signature", "params":{"method":"condenser_api.get_dynamic_global_properties"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"jsonrpc.get_signature", "params":{"method":"database_api.get_dynamic_global_properties"}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ +
+

+ + Market History Api + + +

+ + + +

Used to lookup market history information. These AppBase API methods are still under development and subject to change.

+ + +

market_history_api.get_market_history

+

Returns the market history for the internal SBD:STEEM market.

+
Query Parameters JSON
+
{
+  "bucket_seconds": 0,
+  "start": "1970-01-01T00:00:00",
+  "end": "1970-01-01T00:00:00"
+}
+
+
Expected Response JSON
+
{"buckets": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":15,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":60,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":300,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":3600,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":86400,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.steemit.com
+
+ +
+ + +

market_history_api.get_market_history_buckets

+

Returns the bucket seconds being tracked by the plugin.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{"bucket_sizes": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history_buckets", "id":1}' https://api.steemit.com
+
+ +
+ + +

market_history_api.get_order_book

+

Returns the internal market order book.

+
Query Parameters JSON
+
{"limit": 500}
+
+
Expected Response JSON
+
{"bids": [], "asks": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_order_book", "params":{"limit":10}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_order_book", "params":{"limit":50}, "id":1}' https://api.steemit.com
+
+ +
+ + +

market_history_api.get_recent_trades

+

Returns the most recent trades for the internal SBD:STEEM market.

+
Query Parameters JSON
+
{"limit": 1000}
+
+
Expected Response JSON
+
{"trades": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_recent_trades", "params":{"limit":10}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_recent_trades", "params":{"limit":500}, "id":1}' https://api.steemit.com
+
+ +
+ + +

market_history_api.get_ticker

+

Returns the market ticker for the internal SBD:STEEM market.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "latest": "0.00000000000000000",
+  "lowest_ask": "0.00000000000000000",
+  "highest_bid": "0.00000000000000000",
+  "percent_change": "0.00000000000000000",
+  "steem_volume": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "sbd_volume": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000013"
+  }
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_ticker", "id":1}' https://api.steemit.com
+
+ +
+ + +

market_history_api.get_trade_history

+

Returns the trade history for the internal SBD:STEEM market.

+
Query Parameters JSON
+
{
+  "start": "1970-01-01T00:00:00",
+  "end": "1970-01-01T00:00:00",
+  "limit": 1000
+}
+
+
Expected Response JSON
+
{"trades": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_trade_history", "params":{"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00","limit":10}, "id":1}' https://api.steemit.com
+
+ +
+ + +

market_history_api.get_volume

+

Returns the market volume for the past 24 hours.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "steem_volume": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "sbd_volume": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000013"
+  }
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_volume", "id":1}' https://api.steemit.com
+
+ +
+ + +
+ +
+

+ + Network Broadcast Api + + +

+ + + +

Used to broadcast transactions and blocks. These AppBase API methods are +still under development and subject to change.

+ +

Also see: Blockchain Ops

+ + +

network_broadcast_api.broadcast_block

+

Used to broadcast a block.

+
Query Parameters JSON
+
{
+  "block": {
+    "previous": "0000000000000000000000000000000000000000",
+    "timestamp": "1970-01-01T00:00:00",
+    "witness": "",
+    "transaction_merkle_root": "0000000000000000000000000000000000000000",
+    "extensions": [],
+    "witness_signature": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+    "transactions": []
+  }
+}
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"network_broadcast_api.broadcast_block", "params":{"block":{"previous":"0000000000000000000000000000000000000000","timestamp":"1970-01-01T00:00:00","witness":"","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactions":[]}}, "id":1}' https://api.steemit.com
+
+ +
+ + +

network_broadcast_api.broadcast_transaction

+

Used to broadcast a transaction.

+
Query Parameters JSON
+
{
+  "trx": {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  },
+  "max_block_age": -1
+}
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"network_broadcast_api.broadcast_transaction", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"vote_operation","value":{"voter":"steemit","author":"alice","permlink":"a-post-by-alice","weight":10000}}],"extensions":[],"signatures":[]},"max_block_age":50}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"network_broadcast_api.broadcast_transaction", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"pow_operation","value":{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}}],"extensions":[],"signatures":[]},"max_block_age":50}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ +
+

+ + Rc Api + + +

+ + + +

Allows querying of various Resource Credit metrics. See: RC Bandwidth System, 0.20.2 Release Notes, Developer Guide: Resource Credit System

+ + +

rc_api.find_rc_accounts

+

Returns the available resource credits of accounts. Parameters: accounts:string array

+ + + + + + + + + + + + + + + + + + +
accounts (string) 
"steemit"Query the available resource credits for the account named “steemit”.
"alice"Query the available resource credits for the accounts named “alice” and “bob”.
+ +
Query Parameters JSON
+
{"accounts": []}
+
+
Expected Response JSON
+
{
+  "rc_accounts": [
+    {
+      "account": "",
+      "rc_manabar": {"current_mana": "0", "last_update_time": 0},
+      "max_rc_creation_adjustment": {
+        "amount": "0",
+        "precision": 6,
+        "nai": "@@000000037"
+      },
+      "max_rc": "0"
+    }
+  ]
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.find_rc_accounts", "params":{"accounts":["steemit"]}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.find_rc_accounts", "params":{"accounts":["alice","bob"]}, "id":1}' https://api.steemit.com
+
+ +
+ + +

rc_api.get_resource_params

+

Work in progress. See: #2980

+ +
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "resource_names": [
+    "resource_history_bytes",
+    "resource_new_accounts",
+    "resource_market_bytes",
+    "resource_state_bytes",
+    "resource_execution_time"
+  ],
+  "resource_params": {
+    "resource_history_bytes": {
+      "resource_dynamics_params": {
+        "resource_unit": 1,
+        "budget_per_time_unit": 347222,
+        "pool_eq": "216404314004",
+        "max_pool_size": "432808628007",
+        "decay_params": {
+          "decay_per_time_unit": 3613026481,
+          "decay_per_time_unit_denom_shift": 51
+        },
+        "min_decay": 0
+      },
+      "price_curve_params": {
+        "coeff_a": "12981647055416481792",
+        "coeff_b": 1690658703,
+        "shift": 49
+      }
+    },
+    "resource_new_accounts": {
+      "resource_dynamics_params": {
+        "resource_unit": 10000,
+        "budget_per_time_unit": 797,
+        "pool_eq": 157691079,
+        "max_pool_size": 157691079,
+        "decay_params": {
+          "decay_per_time_unit": 347321,
+          "decay_per_time_unit_denom_shift": 36
+        },
+        "min_decay": 0
+      },
+      "price_curve_params": {
+        "coeff_a": "16484671763857882971",
+        "coeff_b": 1231961,
+        "shift": 51
+      }
+    },
+    "resource_market_bytes": {
+      "resource_dynamics_params": {
+        "resource_unit": 10,
+        "budget_per_time_unit": 578704,
+        "pool_eq": "16030041350",
+        "max_pool_size": "32060082699",
+        "decay_params": {
+          "decay_per_time_unit": 2540365427,
+          "decay_per_time_unit_denom_shift": 46
+        },
+        "min_decay": 0
+      },
+      "price_curve_params": {
+        "coeff_a": "9231393461629499392",
+        "coeff_b": 125234698,
+        "shift": 53
+      }
+    },
+    "resource_state_bytes": {
+      "resource_dynamics_params": {
+        "resource_unit": 1,
+        "budget_per_time_unit": 231481481,
+        "pool_eq": "144269542669147",
+        "max_pool_size": "288539085338293",
+        "decay_params": {
+          "decay_per_time_unit": 3613026481,
+          "decay_per_time_unit_denom_shift": 51
+        },
+        "min_decay": 0
+      },
+      "price_curve_params": {
+        "coeff_a": "12981647055416481792",
+        "coeff_b": "1127105802103",
+        "shift": 49
+      }
+    },
+    "resource_execution_time": {
+      "resource_dynamics_params": {
+        "resource_unit": 1,
+        "budget_per_time_unit": 82191781,
+        "pool_eq": "51225569123068",
+        "max_pool_size": "102451138246135",
+        "decay_params": {
+          "decay_per_time_unit": 3613026481,
+          "decay_per_time_unit_denom_shift": 51
+        },
+        "min_decay": 0
+      },
+      "price_curve_params": {
+        "coeff_a": "12981647055416481792",
+        "coeff_b": "400199758774",
+        "shift": 49
+      }
+    }
+  },
+  "size_info": {
+    "resource_state_bytes": {
+      "authority_base_size": 40000,
+      "authority_account_member_size": 180000,
+      "authority_key_member_size": 350000,
+      "account_object_base_size": 4800000,
+      "account_authority_object_base_size": 400000,
+      "account_recovery_request_object_base_size": 320000,
+      "comment_object_base_size": 2010000,
+      "comment_object_permlink_char_size": 10000,
+      "comment_object_parent_permlink_char_size": 20000,
+      "comment_object_beneficiaries_member_size": 180000,
+      "comment_vote_object_base_size": 470000,
+      "convert_request_object_base_size": 480000,
+      "decline_voting_rights_request_object_base_size": 280000,
+      "escrow_object_base_size": 1190000,
+      "limit_order_object_base_size": 147440,
+      "savings_withdraw_object_byte_size": 14656,
+      "transaction_object_base_size": 6090,
+      "transaction_object_byte_size": 174,
+      "vesting_delegation_object_base_size": 600000,
+      "vesting_delegation_expiration_object_base_size": 440000,
+      "withdraw_vesting_route_object_base_size": 430000,
+      "witness_object_base_size": 2660000,
+      "witness_object_url_char_size": 10000,
+      "witness_vote_object_base_size": 400000,
+      "STATE_BYTES_SCALE": 10000
+    },
+    "resource_execution_time": {
+      "account_create_operation_exec_time": 57700,
+      "account_create_with_delegation_operation_exec_time": 57700,
+      "account_update_operation_exec_time": 14000,
+      "account_witness_proxy_operation_exec_time": 117000,
+      "account_witness_vote_operation_exec_time": 23000,
+      "cancel_transfer_from_savings_operation_exec_time": 11500,
+      "change_recovery_account_operation_exec_time": 12000,
+      "claim_account_operation_exec_time": 10000,
+      "claim_reward_balance_operation_exec_time": 50300,
+      "comment_operation_exec_time": 114100,
+      "comment_options_operation_exec_time": 13200,
+      "convert_operation_exec_time": 15700,
+      "create_claimed_account_operation_exec_time": 57700,
+      "custom_operation_exec_time": 228000,
+      "custom_json_operation_exec_time": 228000,
+      "custom_binary_operation_exec_time": 228000,
+      "decline_voting_rights_operation_exec_time": 5300,
+      "delegate_vesting_shares_operation_exec_time": 19900,
+      "delete_comment_operation_exec_time": 51100,
+      "escrow_approve_operation_exec_time": 9900,
+      "escrow_dispute_operation_exec_time": 11500,
+      "escrow_release_operation_exec_time": 17200,
+      "escrow_transfer_operation_exec_time": 19100,
+      "feed_publish_operation_exec_time": 6200,
+      "limit_order_cancel_operation_exec_time": 9600,
+      "limit_order_create_operation_exec_time": 31700,
+      "limit_order_create2_operation_exec_time": 31700,
+      "request_account_recovery_operation_exec_time": 54400,
+      "set_withdraw_vesting_route_operation_exec_time": 17900,
+      "transfer_from_savings_operation_exec_time": 17500,
+      "transfer_operation_exec_time": 9600,
+      "transfer_to_savings_operation_exec_time": 6400,
+      "transfer_to_vesting_operation_exec_time": 44400,
+      "vote_operation_exec_time": 26500,
+      "withdraw_vesting_operation_exec_time": 10400,
+      "witness_set_properties_operation_exec_time": 9500,
+      "witness_update_operation_exec_time": 9500
+    }
+  }
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.get_resource_params", "id":1}' https://api.steemit.com
+
+ +
+ + +

rc_api.get_resource_pool

+

Work in progress. See: #2563, PR#2678

+ +
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "resource_pool": {
+    "resource_history_bytes": {"pool": "200825644923"},
+    "resource_new_accounts": {"pool": 37393465},
+    "resource_market_bytes": {"pool": "15915722826"},
+    "resource_state_bytes": {"pool": "132151641791507"},
+    "resource_execution_time": {"pool": "47739958648192"}
+  }
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.get_resource_pool", "id":1}' https://api.steemit.com
+
+ +
+ + +
+ +
+

+ + Tags Api + + +

+ + + +

Used to lookup information about tags, posts, and discussions. These AppBase API methods are still under development and subject to change.

+ + +

tags_api.get_active_votes

+

Returns all votes for the given post.

+
Query Parameters JSON
+
{"author": "", "permlink": ""}
+
+
Expected Response JSON
+
{"votes": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_active_votes", "params":{"author":"steemit", "permlink":"firstpost"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_active_votes", "params":{"author":"alice", "permlink":"a-post-by-alice"}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_comment_discussions_by_payout

+

Returns a list of discussions based on payout.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_comment_discussions_by_payout", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_comment_discussions_by_payout", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_content_replies

+

Returns a list of replies.

+
Query Parameters JSON
+
{"author": "", "permlink": ""}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_content_replies", "params":{"author":"steemit", "permlink":"firstpost"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_content_replies", "params":{"author":"alice", "permlink":"a-post-by-alice"}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussion

+

Returns the discussion given an author and permlink.

+
Query Parameters JSON
+
{"author": "", "permlink": ""}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "author": "",
+  "permlink": "",
+  "category": "",
+  "parent_author": "",
+  "parent_permlink": "",
+  "title": "",
+  "body": "",
+  "json_metadata": "",
+  "last_update": "1970-01-01T00:00:00",
+  "created": "1970-01-01T00:00:00",
+  "active": "1970-01-01T00:00:00",
+  "last_payout": "1970-01-01T00:00:00",
+  "depth": 0,
+  "children": 0,
+  "net_rshares": 0,
+  "abs_rshares": 0,
+  "vote_rshares": 0,
+  "children_abs_rshares": 0,
+  "cashout_time": "1970-01-01T00:00:00",
+  "max_cashout_time": "1970-01-01T00:00:00",
+  "total_vote_weight": 0,
+  "reward_weight": 0,
+  "total_payout_value": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "curator_payout_value": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "author_rewards": 0,
+  "net_votes": 0,
+  "root_author": "",
+  "root_permlink": "",
+  "max_accepted_payout": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "percent_steem_dollars": 0,
+  "allow_replies": false,
+  "allow_votes": false,
+  "allow_curation_rewards": false,
+  "beneficiaries": [],
+  "url": "",
+  "root_title": "",
+  "pending_payout_value": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "total_pending_payout_value": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "active_votes": [],
+  "replies": [],
+  "author_reputation": 0,
+  "promoted": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000013"
+  },
+  "body_length": 0,
+  "reblogged_by": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussion", "params":{"author":"steemit", "permlink":"firstpost"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussion", "params":{"author":"alice", "permlink":"a-post-by-alice"}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_active

+

Returns a list of discussions based on active.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_active", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_active", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_author_before_date

+

Returns a list of discussions based on author before date.

+
Query Parameters JSON
+
{
+  "author": "",
+  "start_permlink": "",
+  "before_date": "1970-01-01T00:00:00",
+  "limit": 100
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_author_before_date", "params":{"author":"steemit","start_permlink":"firstpost","before_date":"2016-04-19T22:49:43","limit":1}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_blog

+

Returns a list of discussions by blog.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_blog", "params":{"tag":"steemit","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_blog", "params":{"tag":"alice","limit":10}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_cashout

+

Returns a list of discussions by cashout.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_cashout", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_cashout", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_children

+

Returns a list of discussions by children.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_children", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_children", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_comments

+

Returns a list of discussions by comments.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_comments", "params":{"start_author":"steemit","start_permlink":"firstpost","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_comments", "params":{"start_author":"alice","start_permlink":"a-post-by-alice","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_created

+

Returns a list of discussions by created.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_created", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_created", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_feed

+

Returns a list of discussions by feed.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_feed", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_feed", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_hot

+

Returns a list of discussions by hot.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_hot", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_hot", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_promoted

+

Returns a list of discussions by promoted.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_promoted", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_promoted", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + + +

Returns a list of discussions by trending.

+ +
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+ +
{"discussions": []}
+
+ + + +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_trending", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_trending", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_votes

+

Returns a list of discussions by votes.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_votes", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_votes", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_post_discussions_by_payout

+

Returns a list of post discussions by payout.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_post_discussions_by_payout", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_post_discussions_by_payout", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_replies_by_last_update

+

Returns a list of replies by last update.

+
Query Parameters JSON
+
{
+  "start_parent_author": "",
+  "start_permlink": "",
+  "limit": 100
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_replies_by_last_update", "params":{"start_parent_author":"steemit","start_permlink":"firstpost","limit":1}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_tags_used_by_author

+

Returns a list of tags used by an author.

+
Query Parameters JSON
+
{"author": ""}
+
+
Expected Response JSON
+
{"tags": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_tags_used_by_author", "params":{"author":"steemit"}, "id":1}' https://api.steemit.com
+
+ +
+ + + +

Returns the list of trending tags.

+ +
{"start_tag": "", "limit": 100}
+
+ +
{"tags": []}
+
+ + + +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_trending_tags", "params":{"start_tag":null,"limit":100}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_trending_tags", "params":{"start_tag":"steem","limit":10}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ +
+

+ + Witness Api + + +

+ + + +

API removed in 0.20.6, see: #3029

+ + +

witness_api.get_account_bandwidth

+

Disabled since 0.20.6, see: #3029

+ +

Returns the available bandwidth of an account. See: Forum/Market Bandwidth

+ +
Query Parameters JSON
+
{"account": "", "type": "post"}
+
+
Expected Response JSON
+
{}
+
+ +
+ + +

witness_api.get_reserve_ratio

+

Disabled since 0.20.6, see: #3029

+ +

Returns the current reserve ratio.

+ +
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "average_block_size": 0,
+  "current_reserve_ratio": 1,
+  "max_virtual_bandwidth": "0"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"witness_api.get_account_bandwidth", "params":{"account":"steemit","type":"forum"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"witness_api.get_account_bandwidth", "params":{"account":"alice","type":"market"}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ +
+

+ + Block Api + + +

+ + + +

Used to query values related to the block plugin. These AppBase API methods are still under development and subject to change.

+ + +

block_api.get_block

+

Retrieve a full, signed block of the referenced block, or null if no matching block was found.

+ +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + +
block_num (int) 
1Queries the very first block.
8675309Queries block number 8,675,309.
62396745Queries block number 62,396,745.
+ +
Query Parameters JSON
+
{"block_num": 0}
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block", "params":{"block_num":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block", "params":{"block_num":8675309}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block", "params":{"block_num":62396745}, "id":1}' https://api.steemit.com
+
+ +
+ + +

block_api.get_block_header

+

Retrieve a block header of the referenced block, or null if no matching block was found.

+ +

Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + +
block_num (int) 
1Queries the block headers for the very first block.
8675309Queries block headers for block number 8,675,309.
62396745Queries block headers for block number 62,396,745.
+ +
Query Parameters JSON
+
{"block_num": 0}
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block_header", "params":{"block_num":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block_header", "params":{"block_num":8675309}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block_header", "params":{"block_num":62396745}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ +
+

+ + Debug Node Api + + +

+ + + +

This plugin allows all sorts of creative “what-if” experiments with the chain.

+ +

See: debug_node_plugin.md

+ + +

debug_node_api.debug_generate_blocks

+

Generate blocks locally.

+
Query Parameters JSON
+
{
+  "debug_key": "",
+  "count": 0,
+  "skip": 0,
+  "miss_blocks": 0,
+  "edit_if_needed": true
+}
+
+
Expected Response JSON
+
{"blocks": 0}
+
+ +
+ + +

debug_node_api.debug_generate_blocks_until

+

Generate blocks locally until a specified head block time. Can generate them sparsely.

+
Query Parameters JSON
+
{
+  "debug_key": "",
+  "head_block_time": "1970-01-01T00:00:00",
+  "generate_sparsely": true
+}
+
+
Expected Response JSON
+
{"blocks": 0}
+
+ +
+ + +

debug_node_api.debug_get_hardfork_property_object

+ +
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "processed_hardforks": [],
+  "last_hardfork": 0,
+  "current_hardfork_version": "0.0.0",
+  "next_hardfork": "0.0.0",
+  "next_hardfork_time": "1970-01-01T00:00:00"
+}
+
+ +
+ + +

debug_node_api.debug_get_json_schema

+ +
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{"schema": ""}
+
+ +
+ + +

debug_node_api.debug_get_witness_schedule

+ +
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "current_virtual_time": "0",
+  "next_shuffle_block_num": 21573344,
+  "current_shuffled_witnesses": [],
+  "num_scheduled_witnesses": 192,
+  "elected_weight": 49,
+  "timeshare_weight": 73,
+  "miner_weight": 1,
+  "witness_pay_normalization_factor": 0,
+  "median_props": {
+    "account_creation_fee": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "maximum_block_size": 131072,
+    "sbd_interest_rate": 1000,
+    "account_subsidy_budget": 797,
+    "account_subsidy_decay": 347321
+  },
+  "majority_version": "0.0.0",
+  "max_voted_witnesses": 128,
+  "max_miner_witnesses": 131,
+  "max_runner_witnesses": 191,
+  "hardfork_required_witnesses": 4,
+  "account_subsidy_rd": {
+    "resource_unit": 0,
+    "budget_per_time_unit": 0,
+    "pool_eq": 0,
+    "max_pool_size": 0,
+    "decay_params": {
+      "decay_per_time_unit": 0,
+      "decay_per_time_unit_denom_shift": 0
+    },
+    "min_decay": 0
+  },
+  "account_subsidy_witness_rd": {
+    "resource_unit": 0,
+    "budget_per_time_unit": 0,
+    "pool_eq": 0,
+    "max_pool_size": 0,
+    "decay_params": {
+      "decay_per_time_unit": 0,
+      "decay_per_time_unit_denom_shift": 0
+    },
+    "min_decay": 0
+  },
+  "min_witness_account_subsidy_decay": 0
+}
+
+ +
+ + +

debug_node_api.debug_has_hardfork

+ +
Query Parameters JSON
+
{"hardfork_id": 0}
+
+
Expected Response JSON
+
{"has_hardfork": false}
+
+ +
+ + +

debug_node_api.debug_pop_block

+

Pop a block from the blockchain, returning it.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{}
+
+ +
+ + +

debug_node_api.debug_push_blocks

+

Push blocks from existing database.

+
Query Parameters JSON
+
{
+  "src_filename": "",
+  "count": 0,
+  "skip_validate_invariants": false
+}
+
+
Expected Response JSON
+
{"blocks": 0}
+
+ +
+ + +

debug_node_api.debug_set_hardfork

+ +
Query Parameters JSON
+
{"hardfork_id": 0}
+
+
Expected Response JSON
+
{}
+
+ +
+ + +
+ +
+

+ + Broadcast Ops + + +

+ + + +

An operation on Steem is a way of expressing intention on the blockchain. +They are also known as Broadcast Operations. They have types, like vote +or comment. They pass parameters like author and permlink, depending +on what their purpose is.

+ +

Operations are grouped into transactions and passed as parameters to +methods like network_broadcast_api.broadcast_transaction, in +the operations array. Transactions must be signed in order for the +blockchain to accept them. Here is an example of a transaction that +contains one operation (shown without signatures).

+ +
{
+   "jsonrpc":"2.0",
+   "method":"condenser_api.broadcast_transaction",
+   "params":{
+      "trx":{
+         "ref_block_num":1097,
+         "ref_block_prefix":2181793527,
+         "expiration":"2016-03-24T18:00:21",
+         "operations":[
+            [
+               "vote",
+               {
+                  "voter":"steemit",
+                  "author":"alice",
+                  "permlink":"a-post-by-alice",
+                  "weight":10000
+               }
+            ]
+         ],
+         "extensions":[],
+         "signatures":[]
+      }
+   },
+   "id":1
+}
+
+ +

Also see: Broadcast Transaction

+ + +

+vote + + +

+

This operation is used to cast a vote on a post/comment. The primary +purpose of voting is to express Proof-of-Brain about content to the +blockchain. When a vote is cast, the content is considered in the +consensus rules involving author and curation rewards.

+ +

An upvote can be cast from the point in time that the content is created +up to 6.5 days. The remaining 12 hours are locked out of upvotes at +which time only downvotes may be cast.

+ +

A secondary aspect to voting involves reputation, which is not part of +consensus.

+ +

Reputation Rules:

+
    +
  1. Must have non-negative reputation to effect another user’s reputation.
  2. +
  3. If you are down voting another user, you must have more reputation than them to impact their reputation.
  4. +
+ +

Notes:

+ + +
Roles: posting active owner
+
Parameters: voter author permlink weight
+ +
Example Op:
+ +
[
+  "vote",
+  {
+    "voter": "steemit",
+    "author": "alice",
+    "permlink": "a-post-by-alice",
+    "weight": 10000
+  }
+]
+
+ +
+ + +

+comment + + +

+

Creates a post/comment.

+ +

Notes:

+ + +
Roles: posting active owner
+
Parameters: parent_author parent_permlink author permlink title body json_metadata
+ +
Example Op:
+ +
[
+  "comment",
+  {
+    "parent_author": "",
+    "parent_permlink": "steem",
+    "author": "alice",
+    "permlink": "a-post-by-alice",
+    "title": "A Post By Alice",
+    "body": "This is my post.",
+    "json_metadata": "{\"tags\":[\"steemit\",\"example\",\"tags\"]}"
+  }
+]
+
+ +
+ + +

+transfer + + +

+

Transfers asset from one account to another. The memo is plain-text, +any encryption on the memo is up to a higher level protocol.

+ +

Notes:

+ + +
Roles: active owner
+
Parameters: from to amount memo
+ +
Example Op:
+ +
[
+  "transfer",
+  {
+    "from": "steemit",
+    "to": "alice",
+    "amount": {
+      "amount": "10",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "memo": "Thanks for all the fish."
+  }
+]
+
+ +
+ + +

+transfer_to_vesting + + +

+

This operation converts STEEM into VFS (Vesting Fund Shares) at the +current exchange rate. With this operation it is possible to give +another account vesting shares so that faucets can pre-fund new accounts +with vesting shares.

+ +

Notes:

+ + +
Roles: active owner
+
Parameters: from to amount
+ +
Example Op:
+ +
[
+  "transfer_to_vesting",
+  {
+    "from": "alice",
+    "to": "",
+    "amount": {
+      "amount": "357000",
+      "precision": 3,
+      "nai": "@@000000021"
+    }
+  }
+]
+
+ +
+ + +

+withdraw_vesting + + +

+

At any given point in time an account can be withdrawing from their +vesting shares. A user may change the number of shares they wish to +cash out at any time between 0 and their total vesting stake.

+ +

After applying this operation, vesting_shares will be withdrawn +at a rate of vesting_shares/13 per week for 13 weeks starting +one week after this operation is included in the blockchain.

+ +

This operation is not valid if the user has no vesting shares.

+ +

Notes:

+ + +
Roles: active owner
+
Parameters: account vesting_shares
+ +
Example Op:
+ +
[
+  "withdraw_vesting",
+  {
+    "account": "steemit",
+    "vesting_shares": {
+      "amount": "200000000000",
+      "precision": 6,
+      "nai": "@@000000037"
+    }
+  }
+]
+
+ +
+ + +

+limit_order_create + + +

+

This operation creates a limit order and matches it against existing +open orders. The maximum expiration time for any limit order is 28 days from head_block_time().

+ +
Roles: active owner
+
Parameters: owner orderid amount_to_sell min_to_receive fill_or_kill expiration
+ +
Example Op:
+ +
[
+  "limit_order_create",
+  {
+    "owner": "steemit",
+    "orderid": 10,
+    "amount_to_sell": {
+      "amount": "9950",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "min_to_receive": {
+      "amount": "3500",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "fill_or_kill": false,
+    "expiration": "2035-10-29T06:32:22"
+  }
+]
+
+ +
+ + +

+limit_order_cancel + + +

+

Cancels an order and returns the balance to owner.

+ +
Roles: active owner
+
Parameters: owner orderid
+ +
Example Op:
+ +
[
+  "limit_order_cancel",
+  {"owner": "steemit", "orderid": 10}
+]
+
+ +
+ + +

+price + + +

+ +
Roles: active owner
+
Parameters: base quote
+ +
+ + +

+feed_publish + + +

+

Feeds can only be published by the top N witnesses which are included in +every round and are used to define the exchange rate between steem and +the dollar.

+ +
Roles: active owner
+
Parameters: publisher exchange_rate
+ +
Example Op:
+ +
[
+  "feed_publish",
+  {
+    "publisher": "alice",
+    "exchange_rate": {
+      "base": {
+        "amount": "1000",
+        "precision": 3,
+        "nai": "@@000000013"
+      },
+      "quote": {
+        "amount": "1000000",
+        "precision": 3,
+        "nai": "@@000000021"
+      }
+    }
+  }
+]
+
+ +
+ + +

+convert + + +

+

This operation instructs the blockchain to start a conversion between +STEEM and SBD, the funds are deposited after 3.5 days.

+ +
Roles: active owner
+
Parameters: owner requestid amount
+ +
Example Op:
+ +
[
+  "convert",
+  {
+    "owner": "steemit",
+    "requestid": 1467592156,
+    "amount": {
+      "amount": "5000",
+      "precision": 3,
+      "nai": "@@000000013"
+    }
+  }
+]
+
+ +
+ + +

+account_create + + +

+ +
Roles: active owner
+
Parameters: fee creator new_account_name owner active posting memo_key json_metadata
+ +
Example Op:
+ +
[
+  "account_create",
+  {
+    "fee": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "creator": "steemit",
+    "new_account_name": "alice",
+    "owner": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5b4i9gBqvh4sbgrooXPu2dbGLewNPZkXeuNeBjyiswnu2szgXx",
+          1
+        ]
+      ]
+    },
+    "active": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM7ko5nzqaYfjbD4tKWGmiy3xtT9eQFZ3Pcmq5JmygTRptWSiVQy",
+          1
+        ]
+      ]
+    },
+    "posting": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5xAKxnMT2y9VoVJdF63K8xRQAohsiQy9bA33aHeyMB5vgkzaay",
+          1
+        ]
+      ]
+    },
+    "memo_key": "STM8ZSyzjPm48GmUuMSRufkVYkwYbZzbxeMysAVp7KFQwbTf98TcG",
+    "json_metadata": "{}"
+  }
+]
+
+ +
+ + +

+create_claimed_account + + +

+

When used with claim_account, works identically to account_create. See: Steem 0.20.2 Release Notes

+ +
Roles: active owner
+
Parameters: creator new_account_name owner active posting memo_key json_metadata
+ +
Example Op:
+ +
[
+  "create_claimed_account",
+  {
+    "creator": "steemit",
+    "new_account_name": "alice",
+    "owner": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5b4i9gBqvh4sbgrooXPu2dbGLewNPZkXeuNeBjyiswnu2szgXx",
+          1
+        ]
+      ]
+    },
+    "active": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM7ko5nzqaYfjbD4tKWGmiy3xtT9eQFZ3Pcmq5JmygTRptWSiVQy",
+          1
+        ]
+      ]
+    },
+    "posting": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5xAKxnMT2y9VoVJdF63K8xRQAohsiQy9bA33aHeyMB5vgkzaay",
+          1
+        ]
+      ]
+    },
+    "memo_key": "STM8ZSyzjPm48GmUuMSRufkVYkwYbZzbxeMysAVp7KFQwbTf98TcG",
+    "json_metadata": "{}"
+  }
+]
+
+ +
+ + +

+claim_account + + +

+

When used with create_claimed_account, works identically to account_create. See: Steem 0.20.2 Release Notes

+ +
Roles: active owner
+
Parameters: fee creator extensions
+ +
Example Op:
+ +
[
+  "claim_account",
+  {
+    "fee": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "creator": "steemit",
+    "extensions": []
+  }
+]
+
+ +
+ + +

+witness_set_properties + + +

+

Added in HF20 to replace the witness_update which was not easily extendable. While it is recommended to use witness_set_properties, witness_update will continue to work. See: Witness Parameters

+ +
Roles: block_signing active owner
+
Parameters: owner props extensions
+ +
Example Op:
+ +
[
+  "witness_set_properties",
+  {
+    "owner": "alice",
+    "props": {
+      "account_creation_fee": "0.000 STEEM",
+      "account_subsidy_budget": 10000,
+      "account_subsidy_decay": 330782,
+      "maximum_block_size": 65536,
+      "sbd_interest_rate": "0.000 STEEM",
+      "sbd_exchange_rate": {
+        "base": "0.000 SBD",
+        "quote": "0.000 STEEM"
+      },
+      "url": "68747470733A2F2F737465656D69742E636F6D",
+      "new_signing_key": "25688bbe7b1204f26e40be054c8b2ff1997eec6d4e7be6a105aab8a0e6f11c616d7cb6066"
+    },
+    "extensions": []
+  }
+]
+
+ +
+ + +

+account_update + + +

+ +
Roles: active owner
+
Parameters: account owner active posting memo_key json_metadata
+ +
Example Op:
+ +
[
+  "account_update",
+  {
+    "account": "steemit",
+    "posting": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM6FATHLohxTN8RWWkU9ZZwVywXo6MEDjHHui1jEBYkG2tTdvMYo",
+          1
+        ],
+        [
+          "STM76EQNV2RTA6yF9TnBvGSV71mW7eW36MM7XQp24JxdoArTfKA76",
+          1
+        ]
+      ]
+    },
+    "memo_key": "STM6FATHLohxTN8RWWkU9ZZwVywXo6MEDjHHui1jEBYkG2tTdvMYo",
+    "json_metadata": ""
+  }
+]
+
+ +
+ + +

+report_over_production + + +

+

Disabled in HF4

+ +

This operation is used to report a miner who signs two blocks +at the same time. To be valid, the violation must be reported within +STEEM_MAX_WITNESSES blocks of the head block (1 round) and the +producer must be in the ACTIVE witness set.

+ +

Users not in the ACTIVE witness set should not have to worry about their +key getting compromised and being used to produced multiple blocks so +the attacker can report it and steel their vesting steem.

+ +

The result of the operation is to transfer the full VESTING STEEM balance +of the block producer to the reporter.

+ +
Roles: active owner
+
Parameters: reporter first_block second_block
+ +
+ + +

+witness_update + + +

+

Users who wish to become a witness must pay a fee acceptable to +the current witnesses to apply for the position and allow voting +to begin.

+ +

If the owner isn’t a witness they will become a witness. Witnesses +are charged a fee equal to 1 weeks worth of witness pay which in +turn is derived from the current share supply. The fee is +only applied if the owner is not already a witness.

+ +

If the block_signing_key is null then the witness is removed from +contention. The network will pick the top 21 witnesses for +producing blocks.

+ +

Notes:

+ + +
Roles: active owner
+
Parameters: owner url block_signing_key props fee
+ +
Example Op:
+ +
[
+  "witness_update",
+  {
+    "owner": "alice",
+    "url": "witness-category/my-witness",
+    "block_signing_key": "STM8LoQjQqJHvotqBo7HjnqmUbFW9oJ2theyqonzUd9DdJ7YYHsvD",
+    "props": {
+      "account_creation_fee": {
+        "amount": "100000",
+        "precision": 3,
+        "nai": "@@000000021"
+      },
+      "maximum_block_size": 131072,
+      "sbd_interest_rate": 1000
+    },
+    "fee": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    }
+  }
+]
+
+ +
+ + +

+account_witness_vote + + +

+

All accounts with a VFS (Vesting Fund Shares) can vote for or against +any witness. See: STEEM_MAX_ACCOUNT_WITNESS_VOTES

+ +

If a proxy is specified then all existing votes are removed.

+ +
Roles: active owner
+
Parameters: account witness approve
+ +
Example Op:
+ +
[
+  "account_witness_vote",
+  {
+    "account": "alice",
+    "witness": "bob",
+    "approve": true
+  }
+]
+
+ +
+ + +

+account_witness_proxy + + +

+ +
Roles: active owner
+
Parameters: account proxy
+ +
Example Op:
+ +
[
+  "account_witness_proxy",
+  {"account": "alice", "proxy": "bob"}
+]
+
+ +
+ + +

+pow + + +

+

Disabled in HF14.

+ +
Roles: active owner
+
Parameters: worker input signature work
+ +
Example Op:
+ +
[
+  "pow",
+  {
+    "worker_account": "admin",
+    "block_id": "000004433bd4602cf5f74dbb564183837df9cef8",
+    "nonce": 82,
+    "work": {
+      "worker": "STM65wH1LZ7BfSHcK69SShnqCAH5xdoSZpGkUjmzHJ5GCuxEK9V5G",
+      "input": "59b009f89477919f95914151cef06f28bf344dd6fb7670aca1c1f4323c80446b",
+      "signature": "1f3f83209097efcd01b7d6f27ce726164323d503d6fcf4d55bfb7cb3032796f6766738b36062b5850d69447fdf9c091cbc70825df5eeacc4710a0b11ffdbf0912a",
+      "work": "0b62f4837801cd857f01d6a541faeb13d6bb95f1c36c6b4b14a47df632aa6c92"
+    },
+    "props": {
+      "account_creation_fee": {
+        "amount": "100000",
+        "precision": 3,
+        "nai": "@@000000021"
+      },
+      "maximum_block_size": 131072,
+      "sbd_interest_rate": 1000
+    }
+  }
+]
+
+ +
+ + +

+custom + + +

+

Provides a generic way to add higher level protocols on top of witness +consensus.

+ +

There is no validation for this operation other than that required auths +are valid.

+ +
Roles: active owner
+
Parameters: required_auths id data
+ +
Example Op:
+ +
[
+  "custom",
+  {
+    "required_auths": ["bytemaster"],
+    "id": 777,
+    "data": "0a627974656d617374657207737465656d697402a3d13897d82114466ad87a74b73a53292d8331d1bd1d3082da6bfbcff19ed097029db013797711c88cccca3692407f9ff9b9ce7221aaa2d797f1692be2215d0a5f6d2a8cab6832050078bc5729201e3ea24ea9f7873e6dbdc65a6bd9899053b9acda876dc69f11a13df9ca8b26b6"
+  }
+]
+
+ +
+ + +

+delete_comment + + +

+ +
Roles: posting active owner
+
Parameters: author permlink
+ +
Example Op:
+ +
[
+  "delete_comment",
+  {
+    "author": "alice",
+    "permlink": "a-post-by-alice"
+  }
+]
+
+ +
+ + +

+custom_json + + +

+

Serves the same purpose as custom but also supports required posting +authorities. Unlike custom, this operation is designed to be human +readable/developer friendly.

+ +
follow
+ +

As of HF9, the follow plugin will track follow/unfollow/ignore events.

+ +
reblog
+ +

As of HF14, allows users to share blogs they find with those who follow +them. This change implemented entirely outside the blockchain consensus +which means that reblogging does not create a new post, it merely shares +an existing post with people who follow you.

+ +
witness
+ +

As of HF18, the witness plugin has a custom operation called +enable_content_editing that allows a user to signal they want to edit +their content. By consensus, content is editable indefinitely, but is +soft forked to be frozen after payout. This operation requires an +active key and is designed to prevent vandalism if a posting key is +compromised. #1017

+ +
Roles: posting active owner
+
Parameters: required_auths required_posting_auths id json
+ +
Example Op:
+ +
[
+  "custom_json",
+  {
+    "required_auths": [],
+    "required_posting_auths": ["steemit"],
+    "id": "follow",
+    "json": "[\"follow\",{\"follower\":\"steemit\",\"following\":\"alice\",\"what\":[\"blog\"]}]"
+  }
+]
+
+ +
[
+  "custom_json",
+  {
+    "required_auths": [],
+    "required_posting_auths": ["alice"],
+    "id": "follow",
+    "json": "[\"follow\",{\"follower\":\"alice\",\"following\":\"eve\",\"what\":[\"ignore\"]}]"
+  }
+]
+
+ +
[
+  "custom_json",
+  {
+    "required_auths": [],
+    "required_posting_auths": ["bob"],
+    "id": "reblog",
+    "json": "{\"account\":\"bob\",\"author\":\"alice\",\"permlink\":\"a-post-by-alice\"}"
+  }
+]
+
+ +
[
+  "custom_json",
+  {
+    "required_auths": ["alice"],
+    "required_posting_auths": [],
+    "id": "witness",
+    "json": "[\"enable_content_editing\", {\"account\": \"alice\", \"relock_time\": \"2100-01-01T12:00:00\"}]"
+  }
+]
+
+ +
+ + +

+comment_options + + +

+

Authors of posts may not want all of the benefits that come from creating a post. This +operation allows authors to update properties associated with their post.

+ +

Typically, these options will accompany a comment operation in the same transaction.

+ +

As of HF17, content can specify beneficiaries to receive a part of +their author rewards. The beneficiaries are specified in the extension +field of the comment_options_operation and is a sorted vector (by +account name) of account name, weight pairs. The beneficiaries can only +be specified once and must be specified before any votes are cast on the +comment. Most apps are already adding a comment_options in the +transaction that creates the comment, so this should not be much of a +challenge to add to existing apps.

+ +

Notes:

+ + + +
Roles: posting active owner
+
Parameters: author permlink max_accepted_payout percent_steem_dollars allow_votes allow_curation_rewards extensions
+ +
Example Op:
+ +
[
+  "comment_options",
+  {
+    "author": "alice",
+    "permlink": "a-post-by-alice",
+    "max_accepted_payout": {
+      "amount": "1000000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "percent_steem_dollars": 5000,
+    "allow_votes": true,
+    "allow_curation_rewards": true,
+    "extensions": []
+  }
+]
+
+ +
[
+  "comment_options",
+  {
+    "author": "bob",
+    "permlink": "a-post-with-a-beneficiary",
+    "max_accepted_payout": {
+      "amount": "1000000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "percent_steem_dollars": 63,
+    "allow_votes": true,
+    "allow_curation_rewards": true,
+    "extensions": [
+      [
+        0,
+        {
+          "beneficiaries": [{"account": "charlie", "weight": 1000}]
+        }
+      ]
+    ]
+  }
+]
+
+ +
[
+  "comment_options",
+  {
+    "author": "charlie",
+    "permlink": "a-post-with-multiple-beneficiaries",
+    "max_accepted_payout": {
+      "amount": "1000000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "percent_steem_dollars": 62688,
+    "allow_votes": true,
+    "allow_curation_rewards": true,
+    "extensions": [
+      [
+        0,
+        {
+          "beneficiaries": [
+            {"account": "david", "weight": 500},
+            {"account": "erin", "weight": 500},
+            {"account": "faythe", "weight": 1000},
+            {"account": "frank", "weight": 500}
+          ]
+        }
+      ]
+    ]
+  }
+]
+
+ +
+ + +

+set_withdraw_vesting_route + + +

+

Allows an account to setup a vesting withdraw but with the additional +request for the funds to be transferred directly to another account’s +balance rather than the withdrawing account. In addition, those funds +can be immediately vested again, circumventing the conversion from +vests to steem and back, guaranteeing they maintain their value.

+ +

Notes:

+ + +
Roles: active owner
+
Parameters: from_account to_account percent auto_vest
+ +
Example Op:
+ +
[
+  "set_withdraw_vesting_route",
+  {
+    "from_account": "alice",
+    "to_account": "bob",
+    "percent": 10000,
+    "auto_vest": true
+  }
+]
+
+ +
+ + +

+limit_order_create2 + + +

+

This operation is identical to limit_order_create except it serializes +the price rather than calculating it from other fields. The maximum expiration time for any limit order is 28 days from head_block_time().

+ +
Roles: active owner
+
Parameters: owner orderid amount_to_sell exchange_rate fill_or_kill expiration
+ +
Example Op:
+ +
[
+  "limit_order_create2",
+  {
+    "owner": "alice",
+    "orderid": 492991,
+    "amount_to_sell": {
+      "amount": "1",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "exchange_rate": {
+      "base": {
+        "amount": "1",
+        "precision": 3,
+        "nai": "@@000000013"
+      },
+      "quote": {
+        "amount": "10",
+        "precision": 3,
+        "nai": "@@000000021"
+      }
+    },
+    "fill_or_kill": false,
+    "expiration": "2017-05-12T23:11:13"
+  }
+]
+
+ +
+ + +

+challenge_authority + + +

+

Disabled in HF14.

+ +
Roles: posting active owner
+
Parameters: challenger challenged require_owner
+ +
+ + +

+prove_authority + + +

+ +
Roles: active owner
+
Parameters: challenged require_owner
+ +
+ + +

+request_account_recovery + + +

+

All account recovery requests come from a listed recovery account. This +is secure based on the assumption that only a trusted account should be +a recovery account. It is the responsibility of the recovery account to +verify the identity of the account holder of the account to recover by +whichever means they have agreed upon. The blockchain assumes identity +has been verified when this operation is broadcast.

+ +

This operation creates an account recovery request which the account to +recover has 24 hours to respond to before the request expires and is +invalidated.

+ +

There can only be one active recovery request per account at any one time. +Pushing this operation for an account to recover when it already has +an active request will either update the request to a new new owner authority +and extend the request expiration to 24 hours from the current head block +time or it will delete the request. To cancel a request, simply set the +weight threshold of the new owner authority to 0, making it an open authority.

+ +

Additionally, the new owner authority must be satisfiable. In other words, +the sum of the key weights must be greater than or equal to the weight +threshold.

+ +

This operation only needs to be signed by the the recovery account. +The account to recover confirms its identity to the blockchain in +the recover account operation.

+ +

Notes:

+ + + +

See: #169

+ +
Roles: active owner
+
Parameters: recovery_account account_to_recover new_owner_authority extensions
+ +
Example Op:
+ +
[
+  "request_account_recovery",
+  {
+    "recovery_account": "steem",
+    "account_to_recover": "alice",
+    "new_owner_authority": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM6LYxj96zdypHYqgDdD6Nyh2NxerN3P1Mp3ddNm7gci63nfrSuZ",
+          1
+        ]
+      ]
+    },
+    "extensions": []
+  }
+]
+
+ +
+ + +

+recover_account + + +

+ +
Roles: owner
+
Parameters: account_to_recover new_owner_authority recent_owner_authority extensions
+ +
Example Op:
+ +
[
+  "recover_account",
+  {
+    "account_to_recover": "alice",
+    "new_owner_authority": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM7j3nhkhHTpXqLEvdx2yEGhQeeorTcxSV6WDL2DZGxwUxYGrHvh",
+          1
+        ]
+      ]
+    },
+    "recent_owner_authority": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM78Xth94gNxp8nmByFV2vNAhg9bsSdviJ6fQXUTFikySLK3uTxC",
+          1
+        ]
+      ]
+    },
+    "extensions": []
+  }
+]
+
+ +
+ + +

+change_recovery_account + + +

+

Each account lists another account as their recovery account. +The recovery account has the ability to create account_recovery_requests +for the account to recover. An account can change their recovery account +at any time with a 30 day delay. This delay is to prevent +an attacker from changing the recovery account to a malicious account +during an attack. These 30 days match the 30 days that an +owner authority is valid for recovery purposes.

+ +

On account creation the recovery account is set either to the creator of +the account (The account that pays the creation fee and is a signer on the transaction) +or to the empty string if the account was mined. An account with no recovery +has the top voted witness as a recovery account, at the time the recover +request is created. Note: This does mean the effective recovery account +of an account with no listed recovery account can change at any time as +witness vote weights. The top voted witness is explicitly the most trusted +witness according to stake.

+ +

See: #169

+ +
Roles: owner
+
Parameters: account_to_recover new_recovery_account extensions
+ +
Example Op:
+ +
[
+  "change_recovery_account",
+  {
+    "account_to_recover": "alice",
+    "new_recovery_account": "bob",
+    "extensions": []
+  }
+]
+
+ +
+ + +

+escrow_transfer + + +

+

The purpose of this operation is to enable someone to send money +contingently to another individual. The funds leave the from account +and go into a temporary balance where they are held until from +releases it to to or to refunds it to from.

+ +

In the event of a dispute the agent can divide the funds between the +to/from account. Disputes can be raised any time before or on the +dispute deadline time, after the escrow has been approved by all +parties.

+ +

This operation only creates a proposed escrow transfer. Both the agent +and to must agree to the terms of the arrangement by approving the +escrow.

+ +

The escrow agent is paid the fee on approval of all parties. It is up to +the escrow agent to determine the fee.

+ +

Escrow transactions are uniquely identified by from and escrow_id, +the escrow_id is defined by the sender.

+ +

See: steem_operations.hpp:229

+ +
Roles: active owner
+
Parameters: from to agent escrow_id sbd_amount steem_amount fee ratification_deadline escrow_expiration json_meta
+ +
Example Op:
+ +
[
+  "escrow_transfer",
+  {
+    "from": "alice",
+    "to": "bob",
+    "sbd_amount": {
+      "amount": "1000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "steem_amount": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "escrow_id": 23456789,
+    "agent": "charlie",
+    "fee": {
+      "amount": "100",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "json_meta": "{}",
+    "ratification_deadline": "2017-02-26T11:22:39",
+    "escrow_expiration": "2017-02-28T11:22:39"
+  }
+]
+
+ +
+ + +

+escrow_dispute + + +

+

If either the sender or receiver of an escrow payment has an issue, they +can raise it for dispute. Once a payment is in dispute, the agent has +authority over who gets what.

+ +

See: steem_operations.hpp:229

+ +
Roles: active owner
+
Parameters: from to agent who escrow_id
+ +
Example Op:
+ +
[
+  "escrow_dispute",
+  {
+    "from": "alice",
+    "to": "bob",
+    "agent": "charlie",
+    "who": "alice",
+    "escrow_id": 72526562
+  }
+]
+
+ +
+ + +

+escrow_release + + +

+

This operation can be used by anyone associated with the escrow transfer +to release funds if they have permission.

+ +

The permission scheme is as follows:

+ + +

See: steem_operations.hpp:229

+ +
Roles: active owner
+
Parameters: from to agent who receiver escrow_id sbd_amount steem_amount
+ +
Example Op:
+ +
[
+  "escrow_release",
+  {
+    "from": "alice",
+    "to": "bob",
+    "agent": "charlie",
+    "who": "charlie",
+    "receiver": "bob",
+    "escrow_id": 72526562,
+    "sbd_amount": {
+      "amount": "5000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "steem_amount": {
+      "amount": "0",
+      "precision": 3,
+      "nai": "@@000000021"
+    }
+  }
+]
+
+ +
+ + +

+pow2 + + +

+

Disabled in HF17.

+
Roles: active owner
+
Parameters: input pow_summary
+ +
Example Op:
+ +
[
+  "pow2",
+  {
+    "work": [
+      0,
+      {
+        "input": {
+          "worker_account": "alice",
+          "prev_block": "003ea604345523c344fbadab605073ea712dd76f",
+          "nonce": "1052853013628665497"
+        },
+        "pow_summary": 3817904373
+      }
+    ],
+    "props": {
+      "account_creation_fee": {
+        "amount": "1",
+        "precision": 3,
+        "nai": "@@000000021"
+      },
+      "maximum_block_size": 131072,
+      "sbd_interest_rate": 1000
+    }
+  }
+]
+
+ +
+ + +

+escrow_approve + + +

+

The agent and to accounts must approve an escrow transaction for it to +be valid on the blockchain. Once a party approves the escrow, they +cannot revoke their approval. Subsequent escrow approve operations, +regardless of the approval, will be rejected.

+ +

See: steem_operations.hpp:229

+ +
Roles: active owner
+
Parameters: from to agent who escrow_id approve
+ +
Example Op:
+ +
[
+  "escrow_approve",
+  {
+    "from": "alice",
+    "to": "bob",
+    "agent": "charlie",
+    "who": "charlie",
+    "escrow_id": 59102208,
+    "approve": true
+  }
+]
+
+ +
+ + +

+transfer_to_savings + + +

+

For time locked savings accounts. A user can place Steem and Steem +Dollars into time locked savings balances. Funds can be withdrawn from +these balances after a three day delay. The point of this addition is to +mitigate loss from hacked and compromised account. The max a user can +lose instantaneously is the sum of what the hold in liquid balances. +Assuming an account can be recovered quickly, loss in such situations +can be kept to a minimum.

+ +

See: steem_operations.hpp:868

+ +
Roles: active owner
+
Parameters: from to amount memo
+ +
Example Op:
+ +
[
+  "transfer_to_savings",
+  {
+    "from": "alice",
+    "to": "alice",
+    "amount": {
+      "amount": "1000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "memo": ""
+  }
+]
+
+ +
+ + +

+transfer_from_savings + + +

+ +
Roles: active owner
+
Parameters: from request_id to amount memo
+ +
Example Op:
+ +
[
+  "transfer_from_savings",
+  {
+    "from": "alice",
+    "request_id": 101,
+    "to": "alice",
+    "amount": {
+      "amount": "1000",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "memo": ""
+  }
+]
+
+ +
+ + +

+cancel_transfer_from_savings + + +

+ +
Roles: active owner
+
Parameters: from request_id
+ +
Example Op:
+ +
[
+  "cancel_transfer_from_savings",
+  {"from": "alice", "request_id": 1}
+]
+
+ +
+ + +

+custom_binary + + +

+

The semmantics for this operation are the same as the custom_json +operation, but with a binary payload. The json deserialization has a +non-trivial cost associated with it. This operation will allow for +binary deserialization of plugin operations and should improve overall +performance of plugins that chose to use it.

+ +

See: steem_operations.hpp:491

+ +
Roles: posting active owner
+
Parameters: id data
+ +
+ + +

+decline_voting_rights + + +

+

An account can chose to decline their voting rights after a 30 day +delay. This includes voting on content and witnesses. The voting rights +cannot be acquired again once they have been declined. This is only to +formalize a smart contract between certain accounts and the community +that currently only exists as a social contract.

+ +

See: steem_operations.hpp:897

+ +
Roles: owner
+
Parameters: account decline
+ +
Example Op:
+ +
[
+  "decline_voting_rights",
+  {"account": "judy", "decline": true}
+]
+
+ +
+ + +

+reset_account + + +

+

This operation allows recovery_account to change account_to_reset’s +owner authority to new_owner_authority after 60 days of inactivity.

+ +

See: #169

+ +
Roles: active owner
+
Parameters: reset_account account_to_reset new_owner_authority
+ +
+ + +

+set_reset_account + + +

+

This operation allows account owner to control which account has the +power to execute the reset_account operation after 60 days.

+ +

See: #169

+ +
Roles: owner posting
+
Parameters: account current_reset_account reset_account
+ +
+ + +

+claim_reward_balance + + +

+ +
Roles: posting active owner
+
Parameters: account reward_steem reward_sbd reward_vests
+ +
Example Op:
+ +
[
+  "claim_reward_balance",
+  {
+    "account": "alice",
+    "reward_steem": {
+      "amount": "17",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "reward_sbd": {
+      "amount": "11",
+      "precision": 3,
+      "nai": "@@000000013"
+    },
+    "reward_vests": {
+      "amount": "185025103",
+      "precision": 6,
+      "nai": "@@000000037"
+    }
+  }
+]
+
+ +
+ + +

+delegate_vesting_shares + + +

+

Delegate vesting shares from one account to the other. The vesting +shares are still owned by the original account, but content voting +rights and resource credit are transferred to the receiving +account. This sets the delegation to vesting_shares, increasing it or +decreasing it as needed (i.e. a delegation of 0 removes the delegation).

+ +

When a delegation is removed the shares are placed in limbo for a week +to prevent a satoshi of VESTS from voting on the same content twice.

+ +

Also see:

+ + +
Roles: active owner
+
Parameters: delegator delegatee vesting_shares
+ +
Example Op:
+ +
[
+  "delegate_vesting_shares",
+  {
+    "delegator": "alice",
+    "delegatee": "bob",
+    "vesting_shares": {
+      "amount": "94599167138276",
+      "precision": 6,
+      "nai": "@@000000037"
+    }
+  }
+]
+
+ +
+ + +

+account_create_with_delegation + + +

+

Deprecated as of HF20 If an account creation service would still like to provide a delegation of Steem Power +to the accounts they create, they can still follow the account creation operation with an additional call to +delegate_vesting_shares to add a delegation of SP to the account.

+ +
+

Instead of paying the entire account creation fee with Steem, creators +can now pay a smaller fee (30x less) and delegate some Steem Power for +30 days. The exact amount is 5 * min_fee + STEEM_POWER == 150 * min_fee. +You can pay any combination of STEEM and Steem Power along that curve +(so long as the minimum fee is paid).

+
+ +
+

The witness voted STEEM fee is now the minimum required STEEM fee for +delegation. Witnesses should reduce their fee by 30x when the hardfork +goes live to preserve the same required fee for an all STEEM account +creation.

+
+ +

Also see:

+ + +
Roles: active owner
+
Parameters: fee delegation creator new_account_name owner active posting memo_key json_metadata extensions
+ +
Example Op:
+ +
[
+  "account_create_with_delegation",
+  {
+    "fee": {
+      "amount": "3000",
+      "precision": 3,
+      "nai": "@@000000021"
+    },
+    "delegation": {
+      "amount": "0",
+      "precision": 6,
+      "nai": "@@000000037"
+    },
+    "creator": "steemit",
+    "new_account_name": "alice",
+    "owner": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM5Tki3ecCdCCHCjhhwvQvXuKryL2s34Ma6CXsRzntSUTYVYxCQ9",
+          1
+        ]
+      ]
+    },
+    "active": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM6LUoAA8gCL9tHRz7v9xcwR4ZWD3KDRHP5t1U7UAZHdfanLxyBE",
+          1
+        ]
+      ]
+    },
+    "posting": {
+      "weight_threshold": 1,
+      "account_auths": [],
+      "key_auths": [
+        [
+          "STM8anmpHdfVE4AmwsDpcSXpRsydHysEbv6vGJkRQy1d1CC83zeTA",
+          1
+        ]
+      ]
+    },
+    "memo_key": "STM67RYDyEkP1Ja1jFehJ45BFGA9oHHUnRnYbxKJEtMhVQiHW3S3k",
+    "json_metadata": "{}",
+    "extensions": []
+  }
+]
+
+ +
+ + +

+fill_convert_request + + +

+

Fills when conversion requests with a conversion date before the head +block time and then converts them to/from steem/sbd at the current +median price feed history price times the premium.

+ +
Roles: active owner
+
Parameters: owner requestid amount_in amount_out
+ +
+ + +

+author_reward + + +

+ +
Roles: posting active owner
+
Parameters: author permlink sbd_payout steem_payout vesting_payout
+ +
+ + +

+curation_reward + + +

+ +
Roles: posting active owner
+
Parameters: curator reward comment_author comment_permlink
+ +
+ + +

+comment_reward + + +

+

See: #774

+ +
Roles: posting active owner
+
Parameters: author permlink payout
+ +
+ + +

+liquidity_reward + + +

+

Deprecated as of HF12, see: #178.

+ +
Roles: active owner
+
Parameters: owner payout
+ +
+ + +

+interest + + +

+ +
Roles: active owner
+
Parameters: owner interest
+ +
Example Op:
+ +
[
+  "interest",
+  {"owner": "alice", "interest": "0.001 SBD"}
+]
+
+ +
+ + +

+fill_vesting_withdraw + + +

+

See: #78

+ +
Roles: active owner
+
Parameters: from_account to_account withdrawn deposited
+ +
Example Op:
+ +
[
+  "fill_vesting_withdraw",
+  {
+    "from_account": "alice",
+    "to_account": "alice",
+    "withdrawn": "0.026475 VESTS",
+    "deposited": "0.710 STEEM"
+  }
+]
+
+ +
+ + +

+fill_order + + +

+ +
Roles: posting active owner
+
Parameters: current_owner current_orderid current_pays open_owner open_orderid open_pays
+ +
Example Op:
+ +
[
+  "fill_order",
+  {
+    "current_owner": "alice",
+    "current_orderid": 42896,
+    "current_pays": "94.999 SBD",
+    "open_owner": "bob",
+    "open_orderid": 10001,
+    "open_pays": "500.000 STEEM"
+  }
+]
+
+ +
+ + +

+shutdown_witness + + +

+

When a witness goes offline.

+ +

See: #278

+ +
Roles: posting active owner
+
Parameters: owner
+ +
Example Op:
+ +
["shutdown_witness", {"owner": "alice"}]
+
+ +
+ + +

+fill_transfer_from_savings + + +

+ +
Roles: posting active owner
+
Parameters: from to amount request_id memo
+ +
+ + +

+hardfork + + +

+ +
Roles: posting active owner
+
Parameters: hardfork_id
+ +
+ + +

+comment_payout_update + + +

+ +
Roles: posting active owner
+
Parameters: author permlink
+ +
+ + +

+return_vesting_delegation + + +

+ +
Roles: posting active owner
+
Parameters: account vesting_shares
+ +
+ + +

+comment_benefactor_reward + + +

+ +
Roles: posting active owner
+
Parameters: benefactor author permlink reward
+ +
+ + +

+producer_reward + + +

+

Witness rewards for block signing are hard to account for. Making these +rewards visible will help witnesses and prospective witnesses by +providing them with more complete and accurate information to guide +their decisions to invest in the platform.

+ +
Roles: posting active owner
+
Parameters: producer vesting_shares
+ +
Example Op:
+ +
[
+  "producer_reward",
+  {
+    "producer": "alice",
+    "vesting_shares": "14403.626449 VESTS"
+  }
+]
+
+ +
+ + +
+ + + +
+ + + + + + + + diff --git a/docs/apidefinitions/jsonrpc.html b/docs/apidefinitions/jsonrpc.html new file mode 100644 index 0000000000000000000000000000000000000000..edf549c1af05dc30d63bd52deda8b5c76ed92356 --- /dev/null +++ b/docs/apidefinitions/jsonrpc.html @@ -0,0 +1,399 @@ + + + + + + + + + + + + + + + + + + +Jsonrpc | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

Used to lookup information about the JSON RPC API. These AppBase API methods are still under development and subject to change.

+ + +

jsonrpc.get_methods

+

Returns a list of methods supported by the JSON RPC API.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
[]
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"jsonrpc.get_methods", "id":1}' https://api.steemit.com
+
+ +
+ + +

jsonrpc.get_signature

+

Returns the signature information for a JSON RPC method including the arguments and expected response JSON.

+
Query Parameters JSON
+
{"method": ""}
+
+
Expected Response JSON
+
{"args": null, "ret": null}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"jsonrpc.get_signature", "params":{"method":"jsonrpc.get_methods"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"jsonrpc.get_signature", "params":{"method":"jsonrpc.get_signature"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"jsonrpc.get_signature", "params":{"method":"condenser_api.get_dynamic_global_properties"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"jsonrpc.get_signature", "params":{"method":"database_api.get_dynamic_global_properties"}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/market-history-api.html b/docs/apidefinitions/market-history-api.html new file mode 100644 index 0000000000000000000000000000000000000000..26f779721d66fcb95402578f4a934a14530c465e --- /dev/null +++ b/docs/apidefinitions/market-history-api.html @@ -0,0 +1,592 @@ + + + + + + + + + + + + + + + + + + +Market History Api | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

Used to lookup market history information. These AppBase API methods are still under development and subject to change.

+ + +

market_history_api.get_market_history

+

Returns the market history for the internal SBD:STEEM market.

+
Query Parameters JSON
+
{
+  "bucket_seconds": 0,
+  "start": "1970-01-01T00:00:00",
+  "end": "1970-01-01T00:00:00"
+}
+
+
Expected Response JSON
+
{"buckets": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":15,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":60,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":300,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":3600,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history", "params":{"bucket_seconds":86400,"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00"}, "id":1}' https://api.steemit.com
+
+ +
+ + +

market_history_api.get_market_history_buckets

+

Returns the bucket seconds being tracked by the plugin.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{"bucket_sizes": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history_buckets", "id":1}' https://api.steemit.com
+
+ +
+ + +

market_history_api.get_order_book

+

Returns the internal market order book.

+
Query Parameters JSON
+
{"limit": 500}
+
+
Expected Response JSON
+
{"bids": [], "asks": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_order_book", "params":{"limit":10}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_order_book", "params":{"limit":50}, "id":1}' https://api.steemit.com
+
+ +
+ + +

market_history_api.get_recent_trades

+

Returns the most recent trades for the internal SBD:STEEM market.

+
Query Parameters JSON
+
{"limit": 1000}
+
+
Expected Response JSON
+
{"trades": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_recent_trades", "params":{"limit":10}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_recent_trades", "params":{"limit":500}, "id":1}' https://api.steemit.com
+
+ +
+ + +

market_history_api.get_ticker

+

Returns the market ticker for the internal SBD:STEEM market.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "latest": "0.00000000000000000",
+  "lowest_ask": "0.00000000000000000",
+  "highest_bid": "0.00000000000000000",
+  "percent_change": "0.00000000000000000",
+  "steem_volume": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "sbd_volume": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000013"
+  }
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_ticker", "id":1}' https://api.steemit.com
+
+ +
+ + +

market_history_api.get_trade_history

+

Returns the trade history for the internal SBD:STEEM market.

+
Query Parameters JSON
+
{
+  "start": "1970-01-01T00:00:00",
+  "end": "1970-01-01T00:00:00",
+  "limit": 1000
+}
+
+
Expected Response JSON
+
{"trades": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_trade_history", "params":{"start":"2018-01-01T00:00:00","end":"2018-01-02T00:00:00","limit":10}, "id":1}' https://api.steemit.com
+
+ +
+ + +

market_history_api.get_volume

+

Returns the market volume for the past 24 hours.

+
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "steem_volume": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "sbd_volume": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000013"
+  }
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_volume", "id":1}' https://api.steemit.com
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/network-broadcast-api.html b/docs/apidefinitions/network-broadcast-api.html new file mode 100644 index 0000000000000000000000000000000000000000..87234edbc8a3f7327fa4a3ffae869ac2dced5580 --- /dev/null +++ b/docs/apidefinitions/network-broadcast-api.html @@ -0,0 +1,416 @@ + + + + + + + + + + + + + + + + + + +Network Broadcast Api | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

Used to broadcast transactions and blocks. These AppBase API methods are +still under development and subject to change.

+ +

Also see: Blockchain Ops

+ + +

network_broadcast_api.broadcast_block

+

Used to broadcast a block.

+
Query Parameters JSON
+
{
+  "block": {
+    "previous": "0000000000000000000000000000000000000000",
+    "timestamp": "1970-01-01T00:00:00",
+    "witness": "",
+    "transaction_merkle_root": "0000000000000000000000000000000000000000",
+    "extensions": [],
+    "witness_signature": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+    "transactions": []
+  }
+}
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"network_broadcast_api.broadcast_block", "params":{"block":{"previous":"0000000000000000000000000000000000000000","timestamp":"1970-01-01T00:00:00","witness":"","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactions":[]}}, "id":1}' https://api.steemit.com
+
+ +
+ + +

network_broadcast_api.broadcast_transaction

+

Used to broadcast a transaction.

+
Query Parameters JSON
+
{
+  "trx": {
+    "ref_block_num": 0,
+    "ref_block_prefix": 0,
+    "expiration": "1970-01-01T00:00:00",
+    "operations": [],
+    "extensions": [],
+    "signatures": []
+  },
+  "max_block_age": -1
+}
+
+
Expected Response JSON
+
{}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"network_broadcast_api.broadcast_transaction", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"vote_operation","value":{"voter":"steemit","author":"alice","permlink":"a-post-by-alice","weight":10000}}],"extensions":[],"signatures":[]},"max_block_age":50}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"network_broadcast_api.broadcast_transaction", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"pow_operation","value":{"worker_account":"cloop3","block_id":"00000449f7860b82b4fbe2f317c670e9f01d6d9a","nonce":3899,"work":{"worker":"STM7P5TDnA87Pj9T4mf6YHrhzjC1KbPZpNxLWCcVcHxNYXakpoT4F","input":"ae8e7c677119d22385f8c48026fee7aad7bba693bf788d7f27047f40b47738c0","signature":"1f38fe9a3f9989f84bd94aa5bbc88beaf09b67f825aa4450cf5105d111149ba6db560b582c7dbb026c7fc9c2eb5051815a72b17f6896ed59d3851d9a0f9883ca7a","work":"000e7b209d58f2e64b36e9bf12b999c6c7af168cc3fc41eb7f8a4bf796c174c3"},"props":{"account_creation_fee":{"amount":"100000","precision":3,"nai":"@@000000021"},"maximum_block_size":131072,"sbd_interest_rate":1000}}}],"extensions":[],"signatures":[]},"max_block_age":50}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/rc-api.html b/docs/apidefinitions/rc-api.html new file mode 100644 index 0000000000000000000000000000000000000000..10b7577fda624f0b4ce2519e8632058d18efe4a0 --- /dev/null +++ b/docs/apidefinitions/rc-api.html @@ -0,0 +1,640 @@ + + + + + + + + + + + + + + + + + + +Rc Api | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

Allows querying of various Resource Credit metrics. See: RC Bandwidth System, 0.20.2 Release Notes, Developer Guide: Resource Credit System

+ + +

rc_api.find_rc_accounts

+

Returns the available resource credits of accounts. Parameters: accounts:string array

+ + + + + + + + + + + + + + + + + + +
accounts (string) 
"steemit"Query the available resource credits for the account named “steemit”.
"alice"Query the available resource credits for the accounts named “alice” and “bob”.
+ +
Query Parameters JSON
+
{"accounts": []}
+
+
Expected Response JSON
+
{
+  "rc_accounts": [
+    {
+      "account": "",
+      "rc_manabar": {"current_mana": "0", "last_update_time": 0},
+      "max_rc_creation_adjustment": {
+        "amount": "0",
+        "precision": 6,
+        "nai": "@@000000037"
+      },
+      "max_rc": "0"
+    }
+  ]
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.find_rc_accounts", "params":{"accounts":["steemit"]}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.find_rc_accounts", "params":{"accounts":["alice","bob"]}, "id":1}' https://api.steemit.com
+
+ +
+ + +

rc_api.get_resource_params

+

Work in progress. See: #2980

+ +
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "resource_names": [
+    "resource_history_bytes",
+    "resource_new_accounts",
+    "resource_market_bytes",
+    "resource_state_bytes",
+    "resource_execution_time"
+  ],
+  "resource_params": {
+    "resource_history_bytes": {
+      "resource_dynamics_params": {
+        "resource_unit": 1,
+        "budget_per_time_unit": 347222,
+        "pool_eq": "216404314004",
+        "max_pool_size": "432808628007",
+        "decay_params": {
+          "decay_per_time_unit": 3613026481,
+          "decay_per_time_unit_denom_shift": 51
+        },
+        "min_decay": 0
+      },
+      "price_curve_params": {
+        "coeff_a": "12981647055416481792",
+        "coeff_b": 1690658703,
+        "shift": 49
+      }
+    },
+    "resource_new_accounts": {
+      "resource_dynamics_params": {
+        "resource_unit": 10000,
+        "budget_per_time_unit": 797,
+        "pool_eq": 157691079,
+        "max_pool_size": 157691079,
+        "decay_params": {
+          "decay_per_time_unit": 347321,
+          "decay_per_time_unit_denom_shift": 36
+        },
+        "min_decay": 0
+      },
+      "price_curve_params": {
+        "coeff_a": "16484671763857882971",
+        "coeff_b": 1231961,
+        "shift": 51
+      }
+    },
+    "resource_market_bytes": {
+      "resource_dynamics_params": {
+        "resource_unit": 10,
+        "budget_per_time_unit": 578704,
+        "pool_eq": "16030041350",
+        "max_pool_size": "32060082699",
+        "decay_params": {
+          "decay_per_time_unit": 2540365427,
+          "decay_per_time_unit_denom_shift": 46
+        },
+        "min_decay": 0
+      },
+      "price_curve_params": {
+        "coeff_a": "9231393461629499392",
+        "coeff_b": 125234698,
+        "shift": 53
+      }
+    },
+    "resource_state_bytes": {
+      "resource_dynamics_params": {
+        "resource_unit": 1,
+        "budget_per_time_unit": 231481481,
+        "pool_eq": "144269542669147",
+        "max_pool_size": "288539085338293",
+        "decay_params": {
+          "decay_per_time_unit": 3613026481,
+          "decay_per_time_unit_denom_shift": 51
+        },
+        "min_decay": 0
+      },
+      "price_curve_params": {
+        "coeff_a": "12981647055416481792",
+        "coeff_b": "1127105802103",
+        "shift": 49
+      }
+    },
+    "resource_execution_time": {
+      "resource_dynamics_params": {
+        "resource_unit": 1,
+        "budget_per_time_unit": 82191781,
+        "pool_eq": "51225569123068",
+        "max_pool_size": "102451138246135",
+        "decay_params": {
+          "decay_per_time_unit": 3613026481,
+          "decay_per_time_unit_denom_shift": 51
+        },
+        "min_decay": 0
+      },
+      "price_curve_params": {
+        "coeff_a": "12981647055416481792",
+        "coeff_b": "400199758774",
+        "shift": 49
+      }
+    }
+  },
+  "size_info": {
+    "resource_state_bytes": {
+      "authority_base_size": 40000,
+      "authority_account_member_size": 180000,
+      "authority_key_member_size": 350000,
+      "account_object_base_size": 4800000,
+      "account_authority_object_base_size": 400000,
+      "account_recovery_request_object_base_size": 320000,
+      "comment_object_base_size": 2010000,
+      "comment_object_permlink_char_size": 10000,
+      "comment_object_parent_permlink_char_size": 20000,
+      "comment_object_beneficiaries_member_size": 180000,
+      "comment_vote_object_base_size": 470000,
+      "convert_request_object_base_size": 480000,
+      "decline_voting_rights_request_object_base_size": 280000,
+      "escrow_object_base_size": 1190000,
+      "limit_order_object_base_size": 147440,
+      "savings_withdraw_object_byte_size": 14656,
+      "transaction_object_base_size": 6090,
+      "transaction_object_byte_size": 174,
+      "vesting_delegation_object_base_size": 600000,
+      "vesting_delegation_expiration_object_base_size": 440000,
+      "withdraw_vesting_route_object_base_size": 430000,
+      "witness_object_base_size": 2660000,
+      "witness_object_url_char_size": 10000,
+      "witness_vote_object_base_size": 400000,
+      "STATE_BYTES_SCALE": 10000
+    },
+    "resource_execution_time": {
+      "account_create_operation_exec_time": 57700,
+      "account_create_with_delegation_operation_exec_time": 57700,
+      "account_update_operation_exec_time": 14000,
+      "account_witness_proxy_operation_exec_time": 117000,
+      "account_witness_vote_operation_exec_time": 23000,
+      "cancel_transfer_from_savings_operation_exec_time": 11500,
+      "change_recovery_account_operation_exec_time": 12000,
+      "claim_account_operation_exec_time": 10000,
+      "claim_reward_balance_operation_exec_time": 50300,
+      "comment_operation_exec_time": 114100,
+      "comment_options_operation_exec_time": 13200,
+      "convert_operation_exec_time": 15700,
+      "create_claimed_account_operation_exec_time": 57700,
+      "custom_operation_exec_time": 228000,
+      "custom_json_operation_exec_time": 228000,
+      "custom_binary_operation_exec_time": 228000,
+      "decline_voting_rights_operation_exec_time": 5300,
+      "delegate_vesting_shares_operation_exec_time": 19900,
+      "delete_comment_operation_exec_time": 51100,
+      "escrow_approve_operation_exec_time": 9900,
+      "escrow_dispute_operation_exec_time": 11500,
+      "escrow_release_operation_exec_time": 17200,
+      "escrow_transfer_operation_exec_time": 19100,
+      "feed_publish_operation_exec_time": 6200,
+      "limit_order_cancel_operation_exec_time": 9600,
+      "limit_order_create_operation_exec_time": 31700,
+      "limit_order_create2_operation_exec_time": 31700,
+      "request_account_recovery_operation_exec_time": 54400,
+      "set_withdraw_vesting_route_operation_exec_time": 17900,
+      "transfer_from_savings_operation_exec_time": 17500,
+      "transfer_operation_exec_time": 9600,
+      "transfer_to_savings_operation_exec_time": 6400,
+      "transfer_to_vesting_operation_exec_time": 44400,
+      "vote_operation_exec_time": 26500,
+      "withdraw_vesting_operation_exec_time": 10400,
+      "witness_set_properties_operation_exec_time": 9500,
+      "witness_update_operation_exec_time": 9500
+    }
+  }
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.get_resource_params", "id":1}' https://api.steemit.com
+
+ +
+ + +

rc_api.get_resource_pool

+

Work in progress. See: #2563, PR#2678

+ +
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "resource_pool": {
+    "resource_history_bytes": {"pool": "200825644923"},
+    "resource_new_accounts": {"pool": 37393465},
+    "resource_market_bytes": {"pool": "15915722826"},
+    "resource_state_bytes": {"pool": "132151641791507"},
+    "resource_execution_time": {"pool": "47739958648192"}
+  }
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.get_resource_pool", "id":1}' https://api.steemit.com
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/tags-api.html b/docs/apidefinitions/tags-api.html new file mode 100644 index 0000000000000000000000000000000000000000..1e502a44420cfa68c1754d3199c8ca50ccfd6f3f --- /dev/null +++ b/docs/apidefinitions/tags-api.html @@ -0,0 +1,1159 @@ + + + + + + + + + + + + + + + + + + +Tags Api | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

Used to lookup information about tags, posts, and discussions. These AppBase API methods are still under development and subject to change.

+ + +

tags_api.get_active_votes

+

Returns all votes for the given post.

+
Query Parameters JSON
+
{"author": "", "permlink": ""}
+
+
Expected Response JSON
+
{"votes": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_active_votes", "params":{"author":"steemit", "permlink":"firstpost"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_active_votes", "params":{"author":"alice", "permlink":"a-post-by-alice"}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_comment_discussions_by_payout

+

Returns a list of discussions based on payout.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_comment_discussions_by_payout", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_comment_discussions_by_payout", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_content_replies

+

Returns a list of replies.

+
Query Parameters JSON
+
{"author": "", "permlink": ""}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_content_replies", "params":{"author":"steemit", "permlink":"firstpost"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_content_replies", "params":{"author":"alice", "permlink":"a-post-by-alice"}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussion

+

Returns the discussion given an author and permlink.

+
Query Parameters JSON
+
{"author": "", "permlink": ""}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "author": "",
+  "permlink": "",
+  "category": "",
+  "parent_author": "",
+  "parent_permlink": "",
+  "title": "",
+  "body": "",
+  "json_metadata": "",
+  "last_update": "1970-01-01T00:00:00",
+  "created": "1970-01-01T00:00:00",
+  "active": "1970-01-01T00:00:00",
+  "last_payout": "1970-01-01T00:00:00",
+  "depth": 0,
+  "children": 0,
+  "net_rshares": 0,
+  "abs_rshares": 0,
+  "vote_rshares": 0,
+  "children_abs_rshares": 0,
+  "cashout_time": "1970-01-01T00:00:00",
+  "max_cashout_time": "1970-01-01T00:00:00",
+  "total_vote_weight": 0,
+  "reward_weight": 0,
+  "total_payout_value": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "curator_payout_value": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "author_rewards": 0,
+  "net_votes": 0,
+  "root_author": "",
+  "root_permlink": "",
+  "max_accepted_payout": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "percent_steem_dollars": 0,
+  "allow_replies": false,
+  "allow_votes": false,
+  "allow_curation_rewards": false,
+  "beneficiaries": [],
+  "url": "",
+  "root_title": "",
+  "pending_payout_value": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "total_pending_payout_value": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000021"
+  },
+  "active_votes": [],
+  "replies": [],
+  "author_reputation": 0,
+  "promoted": {
+    "amount": "0",
+    "precision": 3,
+    "nai": "@@000000013"
+  },
+  "body_length": 0,
+  "reblogged_by": []
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussion", "params":{"author":"steemit", "permlink":"firstpost"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussion", "params":{"author":"alice", "permlink":"a-post-by-alice"}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_active

+

Returns a list of discussions based on active.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_active", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_active", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_author_before_date

+

Returns a list of discussions based on author before date.

+
Query Parameters JSON
+
{
+  "author": "",
+  "start_permlink": "",
+  "before_date": "1970-01-01T00:00:00",
+  "limit": 100
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_author_before_date", "params":{"author":"steemit","start_permlink":"firstpost","before_date":"2016-04-19T22:49:43","limit":1}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_blog

+

Returns a list of discussions by blog.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_blog", "params":{"tag":"steemit","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_blog", "params":{"tag":"alice","limit":10}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_cashout

+

Returns a list of discussions by cashout.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_cashout", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_cashout", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_children

+

Returns a list of discussions by children.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_children", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_children", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_comments

+

Returns a list of discussions by comments.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_comments", "params":{"start_author":"steemit","start_permlink":"firstpost","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_comments", "params":{"start_author":"alice","start_permlink":"a-post-by-alice","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_created

+

Returns a list of discussions by created.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_created", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_created", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_feed

+

Returns a list of discussions by feed.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_feed", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_feed", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_hot

+

Returns a list of discussions by hot.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_hot", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_hot", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_promoted

+

Returns a list of discussions by promoted.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_promoted", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_promoted", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + + +

Returns a list of discussions by trending.

+ +
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+ +
{"discussions": []}
+
+ + + +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_trending", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_trending", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_discussions_by_votes

+

Returns a list of discussions by votes.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_votes", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_votes", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_post_discussions_by_payout

+

Returns a list of post discussions by payout.

+
Query Parameters JSON
+
{
+  "tag": "",
+  "limit": 0,
+  "filter_tags": [],
+  "select_authors": [],
+  "select_tags": [],
+  "truncate_body": 0
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_post_discussions_by_payout", "params":{"tag":"steem","limit":1}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_post_discussions_by_payout", "params":{"tag":"photography","limit":10,"truncate_body":0}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_replies_by_last_update

+

Returns a list of replies by last update.

+
Query Parameters JSON
+
{
+  "start_parent_author": "",
+  "start_permlink": "",
+  "limit": 100
+}
+
+
Expected Response JSON
+
{"discussions": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_replies_by_last_update", "params":{"start_parent_author":"steemit","start_permlink":"firstpost","limit":1}, "id":1}' https://api.steemit.com
+
+ +
+ + +

tags_api.get_tags_used_by_author

+

Returns a list of tags used by an author.

+
Query Parameters JSON
+
{"author": ""}
+
+
Expected Response JSON
+
{"tags": []}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_tags_used_by_author", "params":{"author":"steemit"}, "id":1}' https://api.steemit.com
+
+ +
+ + + +

Returns the list of trending tags.

+ +
{"start_tag": "", "limit": 100}
+
+ +
{"tags": []}
+
+ + + +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_trending_tags", "params":{"start_tag":null,"limit":100}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_trending_tags", "params":{"start_tag":"steem","limit":10}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apidefinitions/witness-api.html b/docs/apidefinitions/witness-api.html new file mode 100644 index 0000000000000000000000000000000000000000..f210cb0717c3c73ce65ce27fb8ca9c50ecf15e3a --- /dev/null +++ b/docs/apidefinitions/witness-api.html @@ -0,0 +1,403 @@ + + + + + + + + + + + + + + + + + + +Witness Api | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ +

API removed in 0.20.6, see: #3029

+ + +

witness_api.get_account_bandwidth

+

Disabled since 0.20.6, see: #3029

+ +

Returns the available bandwidth of an account. See: Forum/Market Bandwidth

+ +
Query Parameters JSON
+
{"account": "", "type": "post"}
+
+
Expected Response JSON
+
{}
+
+ +
+ + +

witness_api.get_reserve_ratio

+

Disabled since 0.20.6, see: #3029

+ +

Returns the current reserve ratio.

+ +
Query Parameters JSON
+
{}
+
+
Expected Response JSON
+
{
+  "id": 0,
+  "average_block_size": 0,
+  "current_reserve_ratio": 1,
+  "max_virtual_bandwidth": "0"
+}
+
+ +
Example curl
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"witness_api.get_account_bandwidth", "params":{"account":"steemit","type":"forum"}, "id":1}' https://api.steemit.com
+
+ +
curl -s --data '{"jsonrpc":"2.0", "method":"witness_api.get_account_bandwidth", "params":{"account":"alice","type":"market"}, "id":1}' https://api.steemit.com
+
+ +
+ + +
+ + + + + + + + diff --git a/docs/apple-touch-icon.png b/docs/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..815caab2f2a8384f68ab7ece2bcd16217aabe47c Binary files /dev/null and b/docs/apple-touch-icon.png differ diff --git a/docs/css/css/fa-brands.css b/docs/css/css/fa-brands.css new file mode 100644 index 0000000000000000000000000000000000000000..7a11355a23dc7d2ad684306cf829830dd0b8d1d0 --- /dev/null +++ b/docs/css/css/fa-brands.css @@ -0,0 +1,13 @@ +/*! + * Font Awesome Free 5.0.10 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +@font-face { + font-family: 'Font Awesome 5 Brands'; + font-style: normal; + font-weight: normal; + src: url("../webfonts/fa-brands-400.eot"); + src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url("../webfonts/fa-brands-400.svg#fontawesome") format("svg"); } + +.fab { + font-family: 'Font Awesome 5 Brands'; } diff --git a/docs/css/css/fa-brands.min.css b/docs/css/css/fa-brands.min.css new file mode 100644 index 0000000000000000000000000000000000000000..15cc68274676eb1020c03423b949f397e469fc38 --- /dev/null +++ b/docs/css/css/fa-brands.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.0.10 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +@font-face{font-family:Font Awesome\ 5 Brands;font-style:normal;font-weight:400;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:Font Awesome\ 5 Brands} \ No newline at end of file diff --git a/docs/css/css/fa-regular.css b/docs/css/css/fa-regular.css new file mode 100644 index 0000000000000000000000000000000000000000..845ac418e08de1eb5742f9097132f654a6f062e7 --- /dev/null +++ b/docs/css/css/fa-regular.css @@ -0,0 +1,14 @@ +/*! + * Font Awesome Free 5.0.10 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +@font-face { + font-family: 'Font Awesome 5 Free'; + font-style: normal; + font-weight: 400; + src: url("../webfonts/fa-regular-400.eot"); + src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url("../webfonts/fa-regular-400.svg#fontawesome") format("svg"); } + +.far { + font-family: 'Font Awesome 5 Free'; + font-weight: 400; } diff --git a/docs/css/css/fa-regular.min.css b/docs/css/css/fa-regular.min.css new file mode 100644 index 0000000000000000000000000000000000000000..b0bc616acd06d15c568c0ee05ec0b8d1ee941486 --- /dev/null +++ b/docs/css/css/fa-regular.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.0.10 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +@font-face{font-family:Font Awesome\ 5 Free;font-style:normal;font-weight:400;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-family:Font Awesome\ 5 Free;font-weight:400} \ No newline at end of file diff --git a/docs/css/css/fa-solid.css b/docs/css/css/fa-solid.css new file mode 100644 index 0000000000000000000000000000000000000000..c0072d54c2775249561c6df6b5a0a057f97eb2ed --- /dev/null +++ b/docs/css/css/fa-solid.css @@ -0,0 +1,15 @@ +/*! + * Font Awesome Free 5.0.10 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +@font-face { + font-family: 'Font Awesome 5 Free'; + font-style: normal; + font-weight: 900; + src: url("../webfonts/fa-solid-900.eot"); + src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url("../webfonts/fa-solid-900.svg#fontawesome") format("svg"); } + +.fa, +.fas { + font-family: 'Font Awesome 5 Free'; + font-weight: 900; } diff --git a/docs/css/css/fa-solid.min.css b/docs/css/css/fa-solid.min.css new file mode 100644 index 0000000000000000000000000000000000000000..e861a9daf107564c3c5e136793b706a8ea654969 --- /dev/null +++ b/docs/css/css/fa-solid.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.0.10 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +@font-face{font-family:Font Awesome\ 5 Free;font-style:normal;font-weight:900;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.fas{font-family:Font Awesome\ 5 Free;font-weight:900} \ No newline at end of file diff --git a/docs/css/css/fontawesome-all.css b/docs/css/css/fontawesome-all.css new file mode 100644 index 0000000000000000000000000000000000000000..ec052ff5bd51e150daacc9192b2b98960e324f8a --- /dev/null +++ b/docs/css/css/fontawesome-all.css @@ -0,0 +1,2861 @@ +/*! + * Font Awesome Free 5.0.10 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa, +.fas, +.far, +.fal, +.fab { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + display: inline-block; + font-style: normal; + font-variant: normal; + text-rendering: auto; + line-height: 1; } + +.fa-lg { + font-size: 1.33333em; + line-height: 0.75em; + vertical-align: -.0667em; } + +.fa-xs { + font-size: .75em; } + +.fa-sm { + font-size: .875em; } + +.fa-1x { + font-size: 1em; } + +.fa-2x { + font-size: 2em; } + +.fa-3x { + font-size: 3em; } + +.fa-4x { + font-size: 4em; } + +.fa-5x { + font-size: 5em; } + +.fa-6x { + font-size: 6em; } + +.fa-7x { + font-size: 7em; } + +.fa-8x { + font-size: 8em; } + +.fa-9x { + font-size: 9em; } + +.fa-10x { + font-size: 10em; } + +.fa-fw { + text-align: center; + width: 1.25em; } + +.fa-ul { + list-style-type: none; + margin-left: 2.5em; + padding-left: 0; } + .fa-ul > li { + position: relative; } + +.fa-li { + left: -2em; + position: absolute; + text-align: center; + width: 2em; + line-height: inherit; } + +.fa-border { + border: solid 0.08em #eee; + border-radius: .1em; + padding: .2em .25em .15em; } + +.fa-pull-left { + float: left; } + +.fa-pull-right { + float: right; } + +.fa.fa-pull-left, +.fas.fa-pull-left, +.far.fa-pull-left, +.fal.fa-pull-left, +.fab.fa-pull-left { + margin-right: .3em; } + +.fa.fa-pull-right, +.fas.fa-pull-right, +.far.fa-pull-right, +.fal.fa-pull-right, +.fab.fa-pull-right { + margin-left: .3em; } + +.fa-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; } + +.fa-pulse { + -webkit-animation: fa-spin 1s infinite steps(8); + animation: fa-spin 1s infinite steps(8); } + +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); } } + +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); } } + +.fa-rotate-90 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); } + +.fa-rotate-180 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; + -webkit-transform: rotate(180deg); + transform: rotate(180deg); } + +.fa-rotate-270 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; + -webkit-transform: rotate(270deg); + transform: rotate(270deg); } + +.fa-flip-horizontal { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; + -webkit-transform: scale(-1, 1); + transform: scale(-1, 1); } + +.fa-flip-vertical { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; + -webkit-transform: scale(1, -1); + transform: scale(1, -1); } + +.fa-flip-horizontal.fa-flip-vertical { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; + -webkit-transform: scale(-1, -1); + transform: scale(-1, -1); } + +:root .fa-rotate-90, +:root .fa-rotate-180, +:root .fa-rotate-270, +:root .fa-flip-horizontal, +:root .fa-flip-vertical { + -webkit-filter: none; + filter: none; } + +.fa-stack { + display: inline-block; + height: 2em; + line-height: 2em; + position: relative; + vertical-align: middle; + width: 2em; } + +.fa-stack-1x, +.fa-stack-2x { + left: 0; + position: absolute; + text-align: center; + width: 100%; } + +.fa-stack-1x { + line-height: inherit; } + +.fa-stack-2x { + font-size: 2em; } + +.fa-inverse { + color: #fff; } + +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen +readers do not read off random characters that represent icons */ +.fa-500px:before { + content: "\f26e"; } + +.fa-accessible-icon:before { + content: "\f368"; } + +.fa-accusoft:before { + content: "\f369"; } + +.fa-address-book:before { + content: "\f2b9"; } + +.fa-address-card:before { + content: "\f2bb"; } + +.fa-adjust:before { + content: "\f042"; } + +.fa-adn:before { + content: "\f170"; } + +.fa-adversal:before { + content: "\f36a"; } + +.fa-affiliatetheme:before { + content: "\f36b"; } + +.fa-algolia:before { + content: "\f36c"; } + +.fa-align-center:before { + content: "\f037"; } + +.fa-align-justify:before { + content: "\f039"; } + +.fa-align-left:before { + content: "\f036"; } + +.fa-align-right:before { + content: "\f038"; } + +.fa-allergies:before { + content: "\f461"; } + +.fa-amazon:before { + content: "\f270"; } + +.fa-amazon-pay:before { + content: "\f42c"; } + +.fa-ambulance:before { + content: "\f0f9"; } + +.fa-american-sign-language-interpreting:before { + content: "\f2a3"; } + +.fa-amilia:before { + content: "\f36d"; } + +.fa-anchor:before { + content: "\f13d"; } + +.fa-android:before { + content: "\f17b"; } + +.fa-angellist:before { + content: "\f209"; } + +.fa-angle-double-down:before { + content: "\f103"; } + +.fa-angle-double-left:before { + content: "\f100"; } + +.fa-angle-double-right:before { + content: "\f101"; } + +.fa-angle-double-up:before { + content: "\f102"; } + +.fa-angle-down:before { + content: "\f107"; } + +.fa-angle-left:before { + content: "\f104"; } + +.fa-angle-right:before { + content: "\f105"; } + +.fa-angle-up:before { + content: "\f106"; } + +.fa-angrycreative:before { + content: "\f36e"; } + +.fa-angular:before { + content: "\f420"; } + +.fa-app-store:before { + content: "\f36f"; } + +.fa-app-store-ios:before { + content: "\f370"; } + +.fa-apper:before { + content: "\f371"; } + +.fa-apple:before { + content: "\f179"; } + +.fa-apple-pay:before { + content: "\f415"; } + +.fa-archive:before { + content: "\f187"; } + +.fa-arrow-alt-circle-down:before { + content: "\f358"; } + +.fa-arrow-alt-circle-left:before { + content: "\f359"; } + +.fa-arrow-alt-circle-right:before { + content: "\f35a"; } + +.fa-arrow-alt-circle-up:before { + content: "\f35b"; } + +.fa-arrow-circle-down:before { + content: "\f0ab"; } + +.fa-arrow-circle-left:before { + content: "\f0a8"; } + +.fa-arrow-circle-right:before { + content: "\f0a9"; } + +.fa-arrow-circle-up:before { + content: "\f0aa"; } + +.fa-arrow-down:before { + content: "\f063"; } + +.fa-arrow-left:before { + content: "\f060"; } + +.fa-arrow-right:before { + content: "\f061"; } + +.fa-arrow-up:before { + content: "\f062"; } + +.fa-arrows-alt:before { + content: "\f0b2"; } + +.fa-arrows-alt-h:before { + content: "\f337"; } + +.fa-arrows-alt-v:before { + content: "\f338"; } + +.fa-assistive-listening-systems:before { + content: "\f2a2"; } + +.fa-asterisk:before { + content: "\f069"; } + +.fa-asymmetrik:before { + content: "\f372"; } + +.fa-at:before { + content: "\f1fa"; } + +.fa-audible:before { + content: "\f373"; } + +.fa-audio-description:before { + content: "\f29e"; } + +.fa-autoprefixer:before { + content: "\f41c"; } + +.fa-avianex:before { + content: "\f374"; } + +.fa-aviato:before { + content: "\f421"; } + +.fa-aws:before { + content: "\f375"; } + +.fa-backward:before { + content: "\f04a"; } + +.fa-balance-scale:before { + content: "\f24e"; } + +.fa-ban:before { + content: "\f05e"; } + +.fa-band-aid:before { + content: "\f462"; } + +.fa-bandcamp:before { + content: "\f2d5"; } + +.fa-barcode:before { + content: "\f02a"; } + +.fa-bars:before { + content: "\f0c9"; } + +.fa-baseball-ball:before { + content: "\f433"; } + +.fa-basketball-ball:before { + content: "\f434"; } + +.fa-bath:before { + content: "\f2cd"; } + +.fa-battery-empty:before { + content: "\f244"; } + +.fa-battery-full:before { + content: "\f240"; } + +.fa-battery-half:before { + content: "\f242"; } + +.fa-battery-quarter:before { + content: "\f243"; } + +.fa-battery-three-quarters:before { + content: "\f241"; } + +.fa-bed:before { + content: "\f236"; } + +.fa-beer:before { + content: "\f0fc"; } + +.fa-behance:before { + content: "\f1b4"; } + +.fa-behance-square:before { + content: "\f1b5"; } + +.fa-bell:before { + content: "\f0f3"; } + +.fa-bell-slash:before { + content: "\f1f6"; } + +.fa-bicycle:before { + content: "\f206"; } + +.fa-bimobject:before { + content: "\f378"; } + +.fa-binoculars:before { + content: "\f1e5"; } + +.fa-birthday-cake:before { + content: "\f1fd"; } + +.fa-bitbucket:before { + content: "\f171"; } + +.fa-bitcoin:before { + content: "\f379"; } + +.fa-bity:before { + content: "\f37a"; } + +.fa-black-tie:before { + content: "\f27e"; } + +.fa-blackberry:before { + content: "\f37b"; } + +.fa-blind:before { + content: "\f29d"; } + +.fa-blogger:before { + content: "\f37c"; } + +.fa-blogger-b:before { + content: "\f37d"; } + +.fa-bluetooth:before { + content: "\f293"; } + +.fa-bluetooth-b:before { + content: "\f294"; } + +.fa-bold:before { + content: "\f032"; } + +.fa-bolt:before { + content: "\f0e7"; } + +.fa-bomb:before { + content: "\f1e2"; } + +.fa-book:before { + content: "\f02d"; } + +.fa-bookmark:before { + content: "\f02e"; } + +.fa-bowling-ball:before { + content: "\f436"; } + +.fa-box:before { + content: "\f466"; } + +.fa-box-open:before { + content: "\f49e"; } + +.fa-boxes:before { + content: "\f468"; } + +.fa-braille:before { + content: "\f2a1"; } + +.fa-briefcase:before { + content: "\f0b1"; } + +.fa-briefcase-medical:before { + content: "\f469"; } + +.fa-btc:before { + content: "\f15a"; } + +.fa-bug:before { + content: "\f188"; } + +.fa-building:before { + content: "\f1ad"; } + +.fa-bullhorn:before { + content: "\f0a1"; } + +.fa-bullseye:before { + content: "\f140"; } + +.fa-burn:before { + content: "\f46a"; } + +.fa-buromobelexperte:before { + content: "\f37f"; } + +.fa-bus:before { + content: "\f207"; } + +.fa-buysellads:before { + content: "\f20d"; } + +.fa-calculator:before { + content: "\f1ec"; } + +.fa-calendar:before { + content: "\f133"; } + +.fa-calendar-alt:before { + content: "\f073"; } + +.fa-calendar-check:before { + content: "\f274"; } + +.fa-calendar-minus:before { + content: "\f272"; } + +.fa-calendar-plus:before { + content: "\f271"; } + +.fa-calendar-times:before { + content: "\f273"; } + +.fa-camera:before { + content: "\f030"; } + +.fa-camera-retro:before { + content: "\f083"; } + +.fa-capsules:before { + content: "\f46b"; } + +.fa-car:before { + content: "\f1b9"; } + +.fa-caret-down:before { + content: "\f0d7"; } + +.fa-caret-left:before { + content: "\f0d9"; } + +.fa-caret-right:before { + content: "\f0da"; } + +.fa-caret-square-down:before { + content: "\f150"; } + +.fa-caret-square-left:before { + content: "\f191"; } + +.fa-caret-square-right:before { + content: "\f152"; } + +.fa-caret-square-up:before { + content: "\f151"; } + +.fa-caret-up:before { + content: "\f0d8"; } + +.fa-cart-arrow-down:before { + content: "\f218"; } + +.fa-cart-plus:before { + content: "\f217"; } + +.fa-cc-amazon-pay:before { + content: "\f42d"; } + +.fa-cc-amex:before { + content: "\f1f3"; } + +.fa-cc-apple-pay:before { + content: "\f416"; } + +.fa-cc-diners-club:before { + content: "\f24c"; } + +.fa-cc-discover:before { + content: "\f1f2"; } + +.fa-cc-jcb:before { + content: "\f24b"; } + +.fa-cc-mastercard:before { + content: "\f1f1"; } + +.fa-cc-paypal:before { + content: "\f1f4"; } + +.fa-cc-stripe:before { + content: "\f1f5"; } + +.fa-cc-visa:before { + content: "\f1f0"; } + +.fa-centercode:before { + content: "\f380"; } + +.fa-certificate:before { + content: "\f0a3"; } + +.fa-chart-area:before { + content: "\f1fe"; } + +.fa-chart-bar:before { + content: "\f080"; } + +.fa-chart-line:before { + content: "\f201"; } + +.fa-chart-pie:before { + content: "\f200"; } + +.fa-check:before { + content: "\f00c"; } + +.fa-check-circle:before { + content: "\f058"; } + +.fa-check-square:before { + content: "\f14a"; } + +.fa-chess:before { + content: "\f439"; } + +.fa-chess-bishop:before { + content: "\f43a"; } + +.fa-chess-board:before { + content: "\f43c"; } + +.fa-chess-king:before { + content: "\f43f"; } + +.fa-chess-knight:before { + content: "\f441"; } + +.fa-chess-pawn:before { + content: "\f443"; } + +.fa-chess-queen:before { + content: "\f445"; } + +.fa-chess-rook:before { + content: "\f447"; } + +.fa-chevron-circle-down:before { + content: "\f13a"; } + +.fa-chevron-circle-left:before { + content: "\f137"; } + +.fa-chevron-circle-right:before { + content: "\f138"; } + +.fa-chevron-circle-up:before { + content: "\f139"; } + +.fa-chevron-down:before { + content: "\f078"; } + +.fa-chevron-left:before { + content: "\f053"; } + +.fa-chevron-right:before { + content: "\f054"; } + +.fa-chevron-up:before { + content: "\f077"; } + +.fa-child:before { + content: "\f1ae"; } + +.fa-chrome:before { + content: "\f268"; } + +.fa-circle:before { + content: "\f111"; } + +.fa-circle-notch:before { + content: "\f1ce"; } + +.fa-clipboard:before { + content: "\f328"; } + +.fa-clipboard-check:before { + content: "\f46c"; } + +.fa-clipboard-list:before { + content: "\f46d"; } + +.fa-clock:before { + content: "\f017"; } + +.fa-clone:before { + content: "\f24d"; } + +.fa-closed-captioning:before { + content: "\f20a"; } + +.fa-cloud:before { + content: "\f0c2"; } + +.fa-cloud-download-alt:before { + content: "\f381"; } + +.fa-cloud-upload-alt:before { + content: "\f382"; } + +.fa-cloudscale:before { + content: "\f383"; } + +.fa-cloudsmith:before { + content: "\f384"; } + +.fa-cloudversify:before { + content: "\f385"; } + +.fa-code:before { + content: "\f121"; } + +.fa-code-branch:before { + content: "\f126"; } + +.fa-codepen:before { + content: "\f1cb"; } + +.fa-codiepie:before { + content: "\f284"; } + +.fa-coffee:before { + content: "\f0f4"; } + +.fa-cog:before { + content: "\f013"; } + +.fa-cogs:before { + content: "\f085"; } + +.fa-columns:before { + content: "\f0db"; } + +.fa-comment:before { + content: "\f075"; } + +.fa-comment-alt:before { + content: "\f27a"; } + +.fa-comment-dots:before { + content: "\f4ad"; } + +.fa-comment-slash:before { + content: "\f4b3"; } + +.fa-comments:before { + content: "\f086"; } + +.fa-compass:before { + content: "\f14e"; } + +.fa-compress:before { + content: "\f066"; } + +.fa-connectdevelop:before { + content: "\f20e"; } + +.fa-contao:before { + content: "\f26d"; } + +.fa-copy:before { + content: "\f0c5"; } + +.fa-copyright:before { + content: "\f1f9"; } + +.fa-couch:before { + content: "\f4b8"; } + +.fa-cpanel:before { + content: "\f388"; } + +.fa-creative-commons:before { + content: "\f25e"; } + +.fa-credit-card:before { + content: "\f09d"; } + +.fa-crop:before { + content: "\f125"; } + +.fa-crosshairs:before { + content: "\f05b"; } + +.fa-css3:before { + content: "\f13c"; } + +.fa-css3-alt:before { + content: "\f38b"; } + +.fa-cube:before { + content: "\f1b2"; } + +.fa-cubes:before { + content: "\f1b3"; } + +.fa-cut:before { + content: "\f0c4"; } + +.fa-cuttlefish:before { + content: "\f38c"; } + +.fa-d-and-d:before { + content: "\f38d"; } + +.fa-dashcube:before { + content: "\f210"; } + +.fa-database:before { + content: "\f1c0"; } + +.fa-deaf:before { + content: "\f2a4"; } + +.fa-delicious:before { + content: "\f1a5"; } + +.fa-deploydog:before { + content: "\f38e"; } + +.fa-deskpro:before { + content: "\f38f"; } + +.fa-desktop:before { + content: "\f108"; } + +.fa-deviantart:before { + content: "\f1bd"; } + +.fa-diagnoses:before { + content: "\f470"; } + +.fa-digg:before { + content: "\f1a6"; } + +.fa-digital-ocean:before { + content: "\f391"; } + +.fa-discord:before { + content: "\f392"; } + +.fa-discourse:before { + content: "\f393"; } + +.fa-dna:before { + content: "\f471"; } + +.fa-dochub:before { + content: "\f394"; } + +.fa-docker:before { + content: "\f395"; } + +.fa-dollar-sign:before { + content: "\f155"; } + +.fa-dolly:before { + content: "\f472"; } + +.fa-dolly-flatbed:before { + content: "\f474"; } + +.fa-donate:before { + content: "\f4b9"; } + +.fa-dot-circle:before { + content: "\f192"; } + +.fa-dove:before { + content: "\f4ba"; } + +.fa-download:before { + content: "\f019"; } + +.fa-draft2digital:before { + content: "\f396"; } + +.fa-dribbble:before { + content: "\f17d"; } + +.fa-dribbble-square:before { + content: "\f397"; } + +.fa-dropbox:before { + content: "\f16b"; } + +.fa-drupal:before { + content: "\f1a9"; } + +.fa-dyalog:before { + content: "\f399"; } + +.fa-earlybirds:before { + content: "\f39a"; } + +.fa-edge:before { + content: "\f282"; } + +.fa-edit:before { + content: "\f044"; } + +.fa-eject:before { + content: "\f052"; } + +.fa-elementor:before { + content: "\f430"; } + +.fa-ellipsis-h:before { + content: "\f141"; } + +.fa-ellipsis-v:before { + content: "\f142"; } + +.fa-ember:before { + content: "\f423"; } + +.fa-empire:before { + content: "\f1d1"; } + +.fa-envelope:before { + content: "\f0e0"; } + +.fa-envelope-open:before { + content: "\f2b6"; } + +.fa-envelope-square:before { + content: "\f199"; } + +.fa-envira:before { + content: "\f299"; } + +.fa-eraser:before { + content: "\f12d"; } + +.fa-erlang:before { + content: "\f39d"; } + +.fa-ethereum:before { + content: "\f42e"; } + +.fa-etsy:before { + content: "\f2d7"; } + +.fa-euro-sign:before { + content: "\f153"; } + +.fa-exchange-alt:before { + content: "\f362"; } + +.fa-exclamation:before { + content: "\f12a"; } + +.fa-exclamation-circle:before { + content: "\f06a"; } + +.fa-exclamation-triangle:before { + content: "\f071"; } + +.fa-expand:before { + content: "\f065"; } + +.fa-expand-arrows-alt:before { + content: "\f31e"; } + +.fa-expeditedssl:before { + content: "\f23e"; } + +.fa-external-link-alt:before { + content: "\f35d"; } + +.fa-external-link-square-alt:before { + content: "\f360"; } + +.fa-eye:before { + content: "\f06e"; } + +.fa-eye-dropper:before { + content: "\f1fb"; } + +.fa-eye-slash:before { + content: "\f070"; } + +.fa-facebook:before { + content: "\f09a"; } + +.fa-facebook-f:before { + content: "\f39e"; } + +.fa-facebook-messenger:before { + content: "\f39f"; } + +.fa-facebook-square:before { + content: "\f082"; } + +.fa-fast-backward:before { + content: "\f049"; } + +.fa-fast-forward:before { + content: "\f050"; } + +.fa-fax:before { + content: "\f1ac"; } + +.fa-female:before { + content: "\f182"; } + +.fa-fighter-jet:before { + content: "\f0fb"; } + +.fa-file:before { + content: "\f15b"; } + +.fa-file-alt:before { + content: "\f15c"; } + +.fa-file-archive:before { + content: "\f1c6"; } + +.fa-file-audio:before { + content: "\f1c7"; } + +.fa-file-code:before { + content: "\f1c9"; } + +.fa-file-excel:before { + content: "\f1c3"; } + +.fa-file-image:before { + content: "\f1c5"; } + +.fa-file-medical:before { + content: "\f477"; } + +.fa-file-medical-alt:before { + content: "\f478"; } + +.fa-file-pdf:before { + content: "\f1c1"; } + +.fa-file-powerpoint:before { + content: "\f1c4"; } + +.fa-file-video:before { + content: "\f1c8"; } + +.fa-file-word:before { + content: "\f1c2"; } + +.fa-film:before { + content: "\f008"; } + +.fa-filter:before { + content: "\f0b0"; } + +.fa-fire:before { + content: "\f06d"; } + +.fa-fire-extinguisher:before { + content: "\f134"; } + +.fa-firefox:before { + content: "\f269"; } + +.fa-first-aid:before { + content: "\f479"; } + +.fa-first-order:before { + content: "\f2b0"; } + +.fa-firstdraft:before { + content: "\f3a1"; } + +.fa-flag:before { + content: "\f024"; } + +.fa-flag-checkered:before { + content: "\f11e"; } + +.fa-flask:before { + content: "\f0c3"; } + +.fa-flickr:before { + content: "\f16e"; } + +.fa-flipboard:before { + content: "\f44d"; } + +.fa-fly:before { + content: "\f417"; } + +.fa-folder:before { + content: "\f07b"; } + +.fa-folder-open:before { + content: "\f07c"; } + +.fa-font:before { + content: "\f031"; } + +.fa-font-awesome:before { + content: "\f2b4"; } + +.fa-font-awesome-alt:before { + content: "\f35c"; } + +.fa-font-awesome-flag:before { + content: "\f425"; } + +.fa-fonticons:before { + content: "\f280"; } + +.fa-fonticons-fi:before { + content: "\f3a2"; } + +.fa-football-ball:before { + content: "\f44e"; } + +.fa-fort-awesome:before { + content: "\f286"; } + +.fa-fort-awesome-alt:before { + content: "\f3a3"; } + +.fa-forumbee:before { + content: "\f211"; } + +.fa-forward:before { + content: "\f04e"; } + +.fa-foursquare:before { + content: "\f180"; } + +.fa-free-code-camp:before { + content: "\f2c5"; } + +.fa-freebsd:before { + content: "\f3a4"; } + +.fa-frown:before { + content: "\f119"; } + +.fa-futbol:before { + content: "\f1e3"; } + +.fa-gamepad:before { + content: "\f11b"; } + +.fa-gavel:before { + content: "\f0e3"; } + +.fa-gem:before { + content: "\f3a5"; } + +.fa-genderless:before { + content: "\f22d"; } + +.fa-get-pocket:before { + content: "\f265"; } + +.fa-gg:before { + content: "\f260"; } + +.fa-gg-circle:before { + content: "\f261"; } + +.fa-gift:before { + content: "\f06b"; } + +.fa-git:before { + content: "\f1d3"; } + +.fa-git-square:before { + content: "\f1d2"; } + +.fa-github:before { + content: "\f09b"; } + +.fa-github-alt:before { + content: "\f113"; } + +.fa-github-square:before { + content: "\f092"; } + +.fa-gitkraken:before { + content: "\f3a6"; } + +.fa-gitlab:before { + content: "\f296"; } + +.fa-gitter:before { + content: "\f426"; } + +.fa-glass-martini:before { + content: "\f000"; } + +.fa-glide:before { + content: "\f2a5"; } + +.fa-glide-g:before { + content: "\f2a6"; } + +.fa-globe:before { + content: "\f0ac"; } + +.fa-gofore:before { + content: "\f3a7"; } + +.fa-golf-ball:before { + content: "\f450"; } + +.fa-goodreads:before { + content: "\f3a8"; } + +.fa-goodreads-g:before { + content: "\f3a9"; } + +.fa-google:before { + content: "\f1a0"; } + +.fa-google-drive:before { + content: "\f3aa"; } + +.fa-google-play:before { + content: "\f3ab"; } + +.fa-google-plus:before { + content: "\f2b3"; } + +.fa-google-plus-g:before { + content: "\f0d5"; } + +.fa-google-plus-square:before { + content: "\f0d4"; } + +.fa-google-wallet:before { + content: "\f1ee"; } + +.fa-graduation-cap:before { + content: "\f19d"; } + +.fa-gratipay:before { + content: "\f184"; } + +.fa-grav:before { + content: "\f2d6"; } + +.fa-gripfire:before { + content: "\f3ac"; } + +.fa-grunt:before { + content: "\f3ad"; } + +.fa-gulp:before { + content: "\f3ae"; } + +.fa-h-square:before { + content: "\f0fd"; } + +.fa-hacker-news:before { + content: "\f1d4"; } + +.fa-hacker-news-square:before { + content: "\f3af"; } + +.fa-hand-holding:before { + content: "\f4bd"; } + +.fa-hand-holding-heart:before { + content: "\f4be"; } + +.fa-hand-holding-usd:before { + content: "\f4c0"; } + +.fa-hand-lizard:before { + content: "\f258"; } + +.fa-hand-paper:before { + content: "\f256"; } + +.fa-hand-peace:before { + content: "\f25b"; } + +.fa-hand-point-down:before { + content: "\f0a7"; } + +.fa-hand-point-left:before { + content: "\f0a5"; } + +.fa-hand-point-right:before { + content: "\f0a4"; } + +.fa-hand-point-up:before { + content: "\f0a6"; } + +.fa-hand-pointer:before { + content: "\f25a"; } + +.fa-hand-rock:before { + content: "\f255"; } + +.fa-hand-scissors:before { + content: "\f257"; } + +.fa-hand-spock:before { + content: "\f259"; } + +.fa-hands:before { + content: "\f4c2"; } + +.fa-hands-helping:before { + content: "\f4c4"; } + +.fa-handshake:before { + content: "\f2b5"; } + +.fa-hashtag:before { + content: "\f292"; } + +.fa-hdd:before { + content: "\f0a0"; } + +.fa-heading:before { + content: "\f1dc"; } + +.fa-headphones:before { + content: "\f025"; } + +.fa-heart:before { + content: "\f004"; } + +.fa-heartbeat:before { + content: "\f21e"; } + +.fa-hips:before { + content: "\f452"; } + +.fa-hire-a-helper:before { + content: "\f3b0"; } + +.fa-history:before { + content: "\f1da"; } + +.fa-hockey-puck:before { + content: "\f453"; } + +.fa-home:before { + content: "\f015"; } + +.fa-hooli:before { + content: "\f427"; } + +.fa-hospital:before { + content: "\f0f8"; } + +.fa-hospital-alt:before { + content: "\f47d"; } + +.fa-hospital-symbol:before { + content: "\f47e"; } + +.fa-hotjar:before { + content: "\f3b1"; } + +.fa-hourglass:before { + content: "\f254"; } + +.fa-hourglass-end:before { + content: "\f253"; } + +.fa-hourglass-half:before { + content: "\f252"; } + +.fa-hourglass-start:before { + content: "\f251"; } + +.fa-houzz:before { + content: "\f27c"; } + +.fa-html5:before { + content: "\f13b"; } + +.fa-hubspot:before { + content: "\f3b2"; } + +.fa-i-cursor:before { + content: "\f246"; } + +.fa-id-badge:before { + content: "\f2c1"; } + +.fa-id-card:before { + content: "\f2c2"; } + +.fa-id-card-alt:before { + content: "\f47f"; } + +.fa-image:before { + content: "\f03e"; } + +.fa-images:before { + content: "\f302"; } + +.fa-imdb:before { + content: "\f2d8"; } + +.fa-inbox:before { + content: "\f01c"; } + +.fa-indent:before { + content: "\f03c"; } + +.fa-industry:before { + content: "\f275"; } + +.fa-info:before { + content: "\f129"; } + +.fa-info-circle:before { + content: "\f05a"; } + +.fa-instagram:before { + content: "\f16d"; } + +.fa-internet-explorer:before { + content: "\f26b"; } + +.fa-ioxhost:before { + content: "\f208"; } + +.fa-italic:before { + content: "\f033"; } + +.fa-itunes:before { + content: "\f3b4"; } + +.fa-itunes-note:before { + content: "\f3b5"; } + +.fa-java:before { + content: "\f4e4"; } + +.fa-jenkins:before { + content: "\f3b6"; } + +.fa-joget:before { + content: "\f3b7"; } + +.fa-joomla:before { + content: "\f1aa"; } + +.fa-js:before { + content: "\f3b8"; } + +.fa-js-square:before { + content: "\f3b9"; } + +.fa-jsfiddle:before { + content: "\f1cc"; } + +.fa-key:before { + content: "\f084"; } + +.fa-keyboard:before { + content: "\f11c"; } + +.fa-keycdn:before { + content: "\f3ba"; } + +.fa-kickstarter:before { + content: "\f3bb"; } + +.fa-kickstarter-k:before { + content: "\f3bc"; } + +.fa-korvue:before { + content: "\f42f"; } + +.fa-language:before { + content: "\f1ab"; } + +.fa-laptop:before { + content: "\f109"; } + +.fa-laravel:before { + content: "\f3bd"; } + +.fa-lastfm:before { + content: "\f202"; } + +.fa-lastfm-square:before { + content: "\f203"; } + +.fa-leaf:before { + content: "\f06c"; } + +.fa-leanpub:before { + content: "\f212"; } + +.fa-lemon:before { + content: "\f094"; } + +.fa-less:before { + content: "\f41d"; } + +.fa-level-down-alt:before { + content: "\f3be"; } + +.fa-level-up-alt:before { + content: "\f3bf"; } + +.fa-life-ring:before { + content: "\f1cd"; } + +.fa-lightbulb:before { + content: "\f0eb"; } + +.fa-line:before { + content: "\f3c0"; } + +.fa-link:before { + content: "\f0c1"; } + +.fa-linkedin:before { + content: "\f08c"; } + +.fa-linkedin-in:before { + content: "\f0e1"; } + +.fa-linode:before { + content: "\f2b8"; } + +.fa-linux:before { + content: "\f17c"; } + +.fa-lira-sign:before { + content: "\f195"; } + +.fa-list:before { + content: "\f03a"; } + +.fa-list-alt:before { + content: "\f022"; } + +.fa-list-ol:before { + content: "\f0cb"; } + +.fa-list-ul:before { + content: "\f0ca"; } + +.fa-location-arrow:before { + content: "\f124"; } + +.fa-lock:before { + content: "\f023"; } + +.fa-lock-open:before { + content: "\f3c1"; } + +.fa-long-arrow-alt-down:before { + content: "\f309"; } + +.fa-long-arrow-alt-left:before { + content: "\f30a"; } + +.fa-long-arrow-alt-right:before { + content: "\f30b"; } + +.fa-long-arrow-alt-up:before { + content: "\f30c"; } + +.fa-low-vision:before { + content: "\f2a8"; } + +.fa-lyft:before { + content: "\f3c3"; } + +.fa-magento:before { + content: "\f3c4"; } + +.fa-magic:before { + content: "\f0d0"; } + +.fa-magnet:before { + content: "\f076"; } + +.fa-male:before { + content: "\f183"; } + +.fa-map:before { + content: "\f279"; } + +.fa-map-marker:before { + content: "\f041"; } + +.fa-map-marker-alt:before { + content: "\f3c5"; } + +.fa-map-pin:before { + content: "\f276"; } + +.fa-map-signs:before { + content: "\f277"; } + +.fa-mars:before { + content: "\f222"; } + +.fa-mars-double:before { + content: "\f227"; } + +.fa-mars-stroke:before { + content: "\f229"; } + +.fa-mars-stroke-h:before { + content: "\f22b"; } + +.fa-mars-stroke-v:before { + content: "\f22a"; } + +.fa-maxcdn:before { + content: "\f136"; } + +.fa-medapps:before { + content: "\f3c6"; } + +.fa-medium:before { + content: "\f23a"; } + +.fa-medium-m:before { + content: "\f3c7"; } + +.fa-medkit:before { + content: "\f0fa"; } + +.fa-medrt:before { + content: "\f3c8"; } + +.fa-meetup:before { + content: "\f2e0"; } + +.fa-meh:before { + content: "\f11a"; } + +.fa-mercury:before { + content: "\f223"; } + +.fa-microchip:before { + content: "\f2db"; } + +.fa-microphone:before { + content: "\f130"; } + +.fa-microphone-slash:before { + content: "\f131"; } + +.fa-microsoft:before { + content: "\f3ca"; } + +.fa-minus:before { + content: "\f068"; } + +.fa-minus-circle:before { + content: "\f056"; } + +.fa-minus-square:before { + content: "\f146"; } + +.fa-mix:before { + content: "\f3cb"; } + +.fa-mixcloud:before { + content: "\f289"; } + +.fa-mizuni:before { + content: "\f3cc"; } + +.fa-mobile:before { + content: "\f10b"; } + +.fa-mobile-alt:before { + content: "\f3cd"; } + +.fa-modx:before { + content: "\f285"; } + +.fa-monero:before { + content: "\f3d0"; } + +.fa-money-bill-alt:before { + content: "\f3d1"; } + +.fa-moon:before { + content: "\f186"; } + +.fa-motorcycle:before { + content: "\f21c"; } + +.fa-mouse-pointer:before { + content: "\f245"; } + +.fa-music:before { + content: "\f001"; } + +.fa-napster:before { + content: "\f3d2"; } + +.fa-neuter:before { + content: "\f22c"; } + +.fa-newspaper:before { + content: "\f1ea"; } + +.fa-nintendo-switch:before { + content: "\f418"; } + +.fa-node:before { + content: "\f419"; } + +.fa-node-js:before { + content: "\f3d3"; } + +.fa-notes-medical:before { + content: "\f481"; } + +.fa-npm:before { + content: "\f3d4"; } + +.fa-ns8:before { + content: "\f3d5"; } + +.fa-nutritionix:before { + content: "\f3d6"; } + +.fa-object-group:before { + content: "\f247"; } + +.fa-object-ungroup:before { + content: "\f248"; } + +.fa-odnoklassniki:before { + content: "\f263"; } + +.fa-odnoklassniki-square:before { + content: "\f264"; } + +.fa-opencart:before { + content: "\f23d"; } + +.fa-openid:before { + content: "\f19b"; } + +.fa-opera:before { + content: "\f26a"; } + +.fa-optin-monster:before { + content: "\f23c"; } + +.fa-osi:before { + content: "\f41a"; } + +.fa-outdent:before { + content: "\f03b"; } + +.fa-page4:before { + content: "\f3d7"; } + +.fa-pagelines:before { + content: "\f18c"; } + +.fa-paint-brush:before { + content: "\f1fc"; } + +.fa-palfed:before { + content: "\f3d8"; } + +.fa-pallet:before { + content: "\f482"; } + +.fa-paper-plane:before { + content: "\f1d8"; } + +.fa-paperclip:before { + content: "\f0c6"; } + +.fa-parachute-box:before { + content: "\f4cd"; } + +.fa-paragraph:before { + content: "\f1dd"; } + +.fa-paste:before { + content: "\f0ea"; } + +.fa-patreon:before { + content: "\f3d9"; } + +.fa-pause:before { + content: "\f04c"; } + +.fa-pause-circle:before { + content: "\f28b"; } + +.fa-paw:before { + content: "\f1b0"; } + +.fa-paypal:before { + content: "\f1ed"; } + +.fa-pen-square:before { + content: "\f14b"; } + +.fa-pencil-alt:before { + content: "\f303"; } + +.fa-people-carry:before { + content: "\f4ce"; } + +.fa-percent:before { + content: "\f295"; } + +.fa-periscope:before { + content: "\f3da"; } + +.fa-phabricator:before { + content: "\f3db"; } + +.fa-phoenix-framework:before { + content: "\f3dc"; } + +.fa-phone:before { + content: "\f095"; } + +.fa-phone-slash:before { + content: "\f3dd"; } + +.fa-phone-square:before { + content: "\f098"; } + +.fa-phone-volume:before { + content: "\f2a0"; } + +.fa-php:before { + content: "\f457"; } + +.fa-pied-piper:before { + content: "\f2ae"; } + +.fa-pied-piper-alt:before { + content: "\f1a8"; } + +.fa-pied-piper-hat:before { + content: "\f4e5"; } + +.fa-pied-piper-pp:before { + content: "\f1a7"; } + +.fa-piggy-bank:before { + content: "\f4d3"; } + +.fa-pills:before { + content: "\f484"; } + +.fa-pinterest:before { + content: "\f0d2"; } + +.fa-pinterest-p:before { + content: "\f231"; } + +.fa-pinterest-square:before { + content: "\f0d3"; } + +.fa-plane:before { + content: "\f072"; } + +.fa-play:before { + content: "\f04b"; } + +.fa-play-circle:before { + content: "\f144"; } + +.fa-playstation:before { + content: "\f3df"; } + +.fa-plug:before { + content: "\f1e6"; } + +.fa-plus:before { + content: "\f067"; } + +.fa-plus-circle:before { + content: "\f055"; } + +.fa-plus-square:before { + content: "\f0fe"; } + +.fa-podcast:before { + content: "\f2ce"; } + +.fa-poo:before { + content: "\f2fe"; } + +.fa-pound-sign:before { + content: "\f154"; } + +.fa-power-off:before { + content: "\f011"; } + +.fa-prescription-bottle:before { + content: "\f485"; } + +.fa-prescription-bottle-alt:before { + content: "\f486"; } + +.fa-print:before { + content: "\f02f"; } + +.fa-procedures:before { + content: "\f487"; } + +.fa-product-hunt:before { + content: "\f288"; } + +.fa-pushed:before { + content: "\f3e1"; } + +.fa-puzzle-piece:before { + content: "\f12e"; } + +.fa-python:before { + content: "\f3e2"; } + +.fa-qq:before { + content: "\f1d6"; } + +.fa-qrcode:before { + content: "\f029"; } + +.fa-question:before { + content: "\f128"; } + +.fa-question-circle:before { + content: "\f059"; } + +.fa-quidditch:before { + content: "\f458"; } + +.fa-quinscape:before { + content: "\f459"; } + +.fa-quora:before { + content: "\f2c4"; } + +.fa-quote-left:before { + content: "\f10d"; } + +.fa-quote-right:before { + content: "\f10e"; } + +.fa-random:before { + content: "\f074"; } + +.fa-ravelry:before { + content: "\f2d9"; } + +.fa-react:before { + content: "\f41b"; } + +.fa-readme:before { + content: "\f4d5"; } + +.fa-rebel:before { + content: "\f1d0"; } + +.fa-recycle:before { + content: "\f1b8"; } + +.fa-red-river:before { + content: "\f3e3"; } + +.fa-reddit:before { + content: "\f1a1"; } + +.fa-reddit-alien:before { + content: "\f281"; } + +.fa-reddit-square:before { + content: "\f1a2"; } + +.fa-redo:before { + content: "\f01e"; } + +.fa-redo-alt:before { + content: "\f2f9"; } + +.fa-registered:before { + content: "\f25d"; } + +.fa-rendact:before { + content: "\f3e4"; } + +.fa-renren:before { + content: "\f18b"; } + +.fa-reply:before { + content: "\f3e5"; } + +.fa-reply-all:before { + content: "\f122"; } + +.fa-replyd:before { + content: "\f3e6"; } + +.fa-resolving:before { + content: "\f3e7"; } + +.fa-retweet:before { + content: "\f079"; } + +.fa-ribbon:before { + content: "\f4d6"; } + +.fa-road:before { + content: "\f018"; } + +.fa-rocket:before { + content: "\f135"; } + +.fa-rocketchat:before { + content: "\f3e8"; } + +.fa-rockrms:before { + content: "\f3e9"; } + +.fa-rss:before { + content: "\f09e"; } + +.fa-rss-square:before { + content: "\f143"; } + +.fa-ruble-sign:before { + content: "\f158"; } + +.fa-rupee-sign:before { + content: "\f156"; } + +.fa-safari:before { + content: "\f267"; } + +.fa-sass:before { + content: "\f41e"; } + +.fa-save:before { + content: "\f0c7"; } + +.fa-schlix:before { + content: "\f3ea"; } + +.fa-scribd:before { + content: "\f28a"; } + +.fa-search:before { + content: "\f002"; } + +.fa-search-minus:before { + content: "\f010"; } + +.fa-search-plus:before { + content: "\f00e"; } + +.fa-searchengin:before { + content: "\f3eb"; } + +.fa-seedling:before { + content: "\f4d8"; } + +.fa-sellcast:before { + content: "\f2da"; } + +.fa-sellsy:before { + content: "\f213"; } + +.fa-server:before { + content: "\f233"; } + +.fa-servicestack:before { + content: "\f3ec"; } + +.fa-share:before { + content: "\f064"; } + +.fa-share-alt:before { + content: "\f1e0"; } + +.fa-share-alt-square:before { + content: "\f1e1"; } + +.fa-share-square:before { + content: "\f14d"; } + +.fa-shekel-sign:before { + content: "\f20b"; } + +.fa-shield-alt:before { + content: "\f3ed"; } + +.fa-ship:before { + content: "\f21a"; } + +.fa-shipping-fast:before { + content: "\f48b"; } + +.fa-shirtsinbulk:before { + content: "\f214"; } + +.fa-shopping-bag:before { + content: "\f290"; } + +.fa-shopping-basket:before { + content: "\f291"; } + +.fa-shopping-cart:before { + content: "\f07a"; } + +.fa-shower:before { + content: "\f2cc"; } + +.fa-sign:before { + content: "\f4d9"; } + +.fa-sign-in-alt:before { + content: "\f2f6"; } + +.fa-sign-language:before { + content: "\f2a7"; } + +.fa-sign-out-alt:before { + content: "\f2f5"; } + +.fa-signal:before { + content: "\f012"; } + +.fa-simplybuilt:before { + content: "\f215"; } + +.fa-sistrix:before { + content: "\f3ee"; } + +.fa-sitemap:before { + content: "\f0e8"; } + +.fa-skyatlas:before { + content: "\f216"; } + +.fa-skype:before { + content: "\f17e"; } + +.fa-slack:before { + content: "\f198"; } + +.fa-slack-hash:before { + content: "\f3ef"; } + +.fa-sliders-h:before { + content: "\f1de"; } + +.fa-slideshare:before { + content: "\f1e7"; } + +.fa-smile:before { + content: "\f118"; } + +.fa-smoking:before { + content: "\f48d"; } + +.fa-snapchat:before { + content: "\f2ab"; } + +.fa-snapchat-ghost:before { + content: "\f2ac"; } + +.fa-snapchat-square:before { + content: "\f2ad"; } + +.fa-snowflake:before { + content: "\f2dc"; } + +.fa-sort:before { + content: "\f0dc"; } + +.fa-sort-alpha-down:before { + content: "\f15d"; } + +.fa-sort-alpha-up:before { + content: "\f15e"; } + +.fa-sort-amount-down:before { + content: "\f160"; } + +.fa-sort-amount-up:before { + content: "\f161"; } + +.fa-sort-down:before { + content: "\f0dd"; } + +.fa-sort-numeric-down:before { + content: "\f162"; } + +.fa-sort-numeric-up:before { + content: "\f163"; } + +.fa-sort-up:before { + content: "\f0de"; } + +.fa-soundcloud:before { + content: "\f1be"; } + +.fa-space-shuttle:before { + content: "\f197"; } + +.fa-speakap:before { + content: "\f3f3"; } + +.fa-spinner:before { + content: "\f110"; } + +.fa-spotify:before { + content: "\f1bc"; } + +.fa-square:before { + content: "\f0c8"; } + +.fa-square-full:before { + content: "\f45c"; } + +.fa-stack-exchange:before { + content: "\f18d"; } + +.fa-stack-overflow:before { + content: "\f16c"; } + +.fa-star:before { + content: "\f005"; } + +.fa-star-half:before { + content: "\f089"; } + +.fa-staylinked:before { + content: "\f3f5"; } + +.fa-steam:before { + content: "\f1b6"; } + +.fa-steam-square:before { + content: "\f1b7"; } + +.fa-steam-symbol:before { + content: "\f3f6"; } + +.fa-step-backward:before { + content: "\f048"; } + +.fa-step-forward:before { + content: "\f051"; } + +.fa-stethoscope:before { + content: "\f0f1"; } + +.fa-sticker-mule:before { + content: "\f3f7"; } + +.fa-sticky-note:before { + content: "\f249"; } + +.fa-stop:before { + content: "\f04d"; } + +.fa-stop-circle:before { + content: "\f28d"; } + +.fa-stopwatch:before { + content: "\f2f2"; } + +.fa-strava:before { + content: "\f428"; } + +.fa-street-view:before { + content: "\f21d"; } + +.fa-strikethrough:before { + content: "\f0cc"; } + +.fa-stripe:before { + content: "\f429"; } + +.fa-stripe-s:before { + content: "\f42a"; } + +.fa-studiovinari:before { + content: "\f3f8"; } + +.fa-stumbleupon:before { + content: "\f1a4"; } + +.fa-stumbleupon-circle:before { + content: "\f1a3"; } + +.fa-subscript:before { + content: "\f12c"; } + +.fa-subway:before { + content: "\f239"; } + +.fa-suitcase:before { + content: "\f0f2"; } + +.fa-sun:before { + content: "\f185"; } + +.fa-superpowers:before { + content: "\f2dd"; } + +.fa-superscript:before { + content: "\f12b"; } + +.fa-supple:before { + content: "\f3f9"; } + +.fa-sync:before { + content: "\f021"; } + +.fa-sync-alt:before { + content: "\f2f1"; } + +.fa-syringe:before { + content: "\f48e"; } + +.fa-table:before { + content: "\f0ce"; } + +.fa-table-tennis:before { + content: "\f45d"; } + +.fa-tablet:before { + content: "\f10a"; } + +.fa-tablet-alt:before { + content: "\f3fa"; } + +.fa-tablets:before { + content: "\f490"; } + +.fa-tachometer-alt:before { + content: "\f3fd"; } + +.fa-tag:before { + content: "\f02b"; } + +.fa-tags:before { + content: "\f02c"; } + +.fa-tape:before { + content: "\f4db"; } + +.fa-tasks:before { + content: "\f0ae"; } + +.fa-taxi:before { + content: "\f1ba"; } + +.fa-telegram:before { + content: "\f2c6"; } + +.fa-telegram-plane:before { + content: "\f3fe"; } + +.fa-tencent-weibo:before { + content: "\f1d5"; } + +.fa-terminal:before { + content: "\f120"; } + +.fa-text-height:before { + content: "\f034"; } + +.fa-text-width:before { + content: "\f035"; } + +.fa-th:before { + content: "\f00a"; } + +.fa-th-large:before { + content: "\f009"; } + +.fa-th-list:before { + content: "\f00b"; } + +.fa-themeisle:before { + content: "\f2b2"; } + +.fa-thermometer:before { + content: "\f491"; } + +.fa-thermometer-empty:before { + content: "\f2cb"; } + +.fa-thermometer-full:before { + content: "\f2c7"; } + +.fa-thermometer-half:before { + content: "\f2c9"; } + +.fa-thermometer-quarter:before { + content: "\f2ca"; } + +.fa-thermometer-three-quarters:before { + content: "\f2c8"; } + +.fa-thumbs-down:before { + content: "\f165"; } + +.fa-thumbs-up:before { + content: "\f164"; } + +.fa-thumbtack:before { + content: "\f08d"; } + +.fa-ticket-alt:before { + content: "\f3ff"; } + +.fa-times:before { + content: "\f00d"; } + +.fa-times-circle:before { + content: "\f057"; } + +.fa-tint:before { + content: "\f043"; } + +.fa-toggle-off:before { + content: "\f204"; } + +.fa-toggle-on:before { + content: "\f205"; } + +.fa-trademark:before { + content: "\f25c"; } + +.fa-train:before { + content: "\f238"; } + +.fa-transgender:before { + content: "\f224"; } + +.fa-transgender-alt:before { + content: "\f225"; } + +.fa-trash:before { + content: "\f1f8"; } + +.fa-trash-alt:before { + content: "\f2ed"; } + +.fa-tree:before { + content: "\f1bb"; } + +.fa-trello:before { + content: "\f181"; } + +.fa-tripadvisor:before { + content: "\f262"; } + +.fa-trophy:before { + content: "\f091"; } + +.fa-truck:before { + content: "\f0d1"; } + +.fa-truck-loading:before { + content: "\f4de"; } + +.fa-truck-moving:before { + content: "\f4df"; } + +.fa-tty:before { + content: "\f1e4"; } + +.fa-tumblr:before { + content: "\f173"; } + +.fa-tumblr-square:before { + content: "\f174"; } + +.fa-tv:before { + content: "\f26c"; } + +.fa-twitch:before { + content: "\f1e8"; } + +.fa-twitter:before { + content: "\f099"; } + +.fa-twitter-square:before { + content: "\f081"; } + +.fa-typo3:before { + content: "\f42b"; } + +.fa-uber:before { + content: "\f402"; } + +.fa-uikit:before { + content: "\f403"; } + +.fa-umbrella:before { + content: "\f0e9"; } + +.fa-underline:before { + content: "\f0cd"; } + +.fa-undo:before { + content: "\f0e2"; } + +.fa-undo-alt:before { + content: "\f2ea"; } + +.fa-uniregistry:before { + content: "\f404"; } + +.fa-universal-access:before { + content: "\f29a"; } + +.fa-university:before { + content: "\f19c"; } + +.fa-unlink:before { + content: "\f127"; } + +.fa-unlock:before { + content: "\f09c"; } + +.fa-unlock-alt:before { + content: "\f13e"; } + +.fa-untappd:before { + content: "\f405"; } + +.fa-upload:before { + content: "\f093"; } + +.fa-usb:before { + content: "\f287"; } + +.fa-user:before { + content: "\f007"; } + +.fa-user-circle:before { + content: "\f2bd"; } + +.fa-user-md:before { + content: "\f0f0"; } + +.fa-user-plus:before { + content: "\f234"; } + +.fa-user-secret:before { + content: "\f21b"; } + +.fa-user-times:before { + content: "\f235"; } + +.fa-users:before { + content: "\f0c0"; } + +.fa-ussunnah:before { + content: "\f407"; } + +.fa-utensil-spoon:before { + content: "\f2e5"; } + +.fa-utensils:before { + content: "\f2e7"; } + +.fa-vaadin:before { + content: "\f408"; } + +.fa-venus:before { + content: "\f221"; } + +.fa-venus-double:before { + content: "\f226"; } + +.fa-venus-mars:before { + content: "\f228"; } + +.fa-viacoin:before { + content: "\f237"; } + +.fa-viadeo:before { + content: "\f2a9"; } + +.fa-viadeo-square:before { + content: "\f2aa"; } + +.fa-vial:before { + content: "\f492"; } + +.fa-vials:before { + content: "\f493"; } + +.fa-viber:before { + content: "\f409"; } + +.fa-video:before { + content: "\f03d"; } + +.fa-video-slash:before { + content: "\f4e2"; } + +.fa-vimeo:before { + content: "\f40a"; } + +.fa-vimeo-square:before { + content: "\f194"; } + +.fa-vimeo-v:before { + content: "\f27d"; } + +.fa-vine:before { + content: "\f1ca"; } + +.fa-vk:before { + content: "\f189"; } + +.fa-vnv:before { + content: "\f40b"; } + +.fa-volleyball-ball:before { + content: "\f45f"; } + +.fa-volume-down:before { + content: "\f027"; } + +.fa-volume-off:before { + content: "\f026"; } + +.fa-volume-up:before { + content: "\f028"; } + +.fa-vuejs:before { + content: "\f41f"; } + +.fa-warehouse:before { + content: "\f494"; } + +.fa-weibo:before { + content: "\f18a"; } + +.fa-weight:before { + content: "\f496"; } + +.fa-weixin:before { + content: "\f1d7"; } + +.fa-whatsapp:before { + content: "\f232"; } + +.fa-whatsapp-square:before { + content: "\f40c"; } + +.fa-wheelchair:before { + content: "\f193"; } + +.fa-whmcs:before { + content: "\f40d"; } + +.fa-wifi:before { + content: "\f1eb"; } + +.fa-wikipedia-w:before { + content: "\f266"; } + +.fa-window-close:before { + content: "\f410"; } + +.fa-window-maximize:before { + content: "\f2d0"; } + +.fa-window-minimize:before { + content: "\f2d1"; } + +.fa-window-restore:before { + content: "\f2d2"; } + +.fa-windows:before { + content: "\f17a"; } + +.fa-wine-glass:before { + content: "\f4e3"; } + +.fa-won-sign:before { + content: "\f159"; } + +.fa-wordpress:before { + content: "\f19a"; } + +.fa-wordpress-simple:before { + content: "\f411"; } + +.fa-wpbeginner:before { + content: "\f297"; } + +.fa-wpexplorer:before { + content: "\f2de"; } + +.fa-wpforms:before { + content: "\f298"; } + +.fa-wrench:before { + content: "\f0ad"; } + +.fa-x-ray:before { + content: "\f497"; } + +.fa-xbox:before { + content: "\f412"; } + +.fa-xing:before { + content: "\f168"; } + +.fa-xing-square:before { + content: "\f169"; } + +.fa-y-combinator:before { + content: "\f23b"; } + +.fa-yahoo:before { + content: "\f19e"; } + +.fa-yandex:before { + content: "\f413"; } + +.fa-yandex-international:before { + content: "\f414"; } + +.fa-yelp:before { + content: "\f1e9"; } + +.fa-yen-sign:before { + content: "\f157"; } + +.fa-yoast:before { + content: "\f2b1"; } + +.fa-youtube:before { + content: "\f167"; } + +.fa-youtube-square:before { + content: "\f431"; } + +.sr-only { + border: 0; + clip: rect(0, 0, 0, 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; } + +.sr-only-focusable:active, .sr-only-focusable:focus { + clip: auto; + height: auto; + margin: 0; + overflow: visible; + position: static; + width: auto; } +@font-face { + font-family: 'Font Awesome 5 Brands'; + font-style: normal; + font-weight: normal; + src: url("../webfonts/fa-brands-400.eot"); + src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url("../webfonts/fa-brands-400.svg#fontawesome") format("svg"); } + +.fab { + font-family: 'Font Awesome 5 Brands'; } +@font-face { + font-family: 'Font Awesome 5 Free'; + font-style: normal; + font-weight: 400; + src: url("../webfonts/fa-regular-400.eot"); + src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url("../webfonts/fa-regular-400.svg#fontawesome") format("svg"); } + +.far { + font-family: 'Font Awesome 5 Free'; + font-weight: 400; } +@font-face { + font-family: 'Font Awesome 5 Free'; + font-style: normal; + font-weight: 900; + src: url("../webfonts/fa-solid-900.eot"); + src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url("../webfonts/fa-solid-900.svg#fontawesome") format("svg"); } + +.fa, +.fas { + font-family: 'Font Awesome 5 Free'; + font-weight: 900; } diff --git a/docs/css/css/fontawesome-all.min.css b/docs/css/css/fontawesome-all.min.css new file mode 100644 index 0000000000000000000000000000000000000000..0c0e4e00d5dc2e1a0326bb6ca469dc8e6ff617f6 --- /dev/null +++ b/docs/css/css/fontawesome-all.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.0.10 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:a 2s infinite linear}.fa-pulse{animation:a 1s infinite steps(8)}@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-aws:before{content:"\f375"}.fa-backward:before{content:"\f04a"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blind:before{content:"\f29d"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-btc:before{content:"\f15a"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-certificate:before{content:"\f0a3"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-square:before{content:"\f14a"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-credit-card:before{content:"\f09d"}.fa-crop:before{content:"\f125"}.fa-crosshairs:before{content:"\f05b"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-deviantart:before{content:"\f1bd"}.fa-diagnoses:before{content:"\f470"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drupal:before{content:"\f1a9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-excel:before{content:"\f1c3"}.fa-file-image:before{content:"\f1c5"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fire:before{content:"\f06d"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-firstdraft:before{content:"\f3a1"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frown:before{content:"\f119"}.fa-futbol:before{content:"\f1e3"}.fa-gamepad:before{content:"\f11b"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-gift:before{content:"\f06b"}.fa-git:before{content:"\f1d3"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-martini:before{content:"\f000"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hashtag:before{content:"\f292"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-heart:before{content:"\f004"}.fa-heartbeat:before{content:"\f21e"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-houzz:before{content:"\f27c"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-internet-explorer:before{content:"\f26b"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jenkins:before{content:"\f3b6"}.fa-joget:before{content:"\f3b7"}.fa-joomla:before{content:"\f1aa"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-key:before{content:"\f084"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-korvue:before{content:"\f42f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-male:before{content:"\f183"}.fa-map:before{content:"\f279"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-maxcdn:before{content:"\f136"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-meh:before{content:"\f11a"}.fa-mercury:before{content:"\f223"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-moon:before{content:"\f186"}.fa-motorcycle:before{content:"\f21c"}.fa-mouse-pointer:before{content:"\f245"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-paint-brush:before{content:"\f1fc"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-people-carry:before{content:"\f4ce"}.fa-percent:before{content:"\f295"}.fa-periscope:before{content:"\f3da"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phone:before{content:"\f095"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-plane:before{content:"\f072"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poo:before{content:"\f2fe"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-random:before{content:"\f074"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-rendact:before{content:"\f3e4"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-resolving:before{content:"\f3e7"}.fa-retweet:before{content:"\f079"}.fa-ribbon:before{content:"\f4d6"}.fa-road:before{content:"\f018"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-rupee-sign:before{content:"\f156"}.fa-safari:before{content:"\f267"}.fa-sass:before{content:"\f41e"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-scribd:before{content:"\f28a"}.fa-search:before{content:"\f002"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shower:before{content:"\f2cc"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smoking:before{content:"\f48d"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowflake:before{content:"\f2dc"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-spinner:before{content:"\f110"}.fa-spotify:before{content:"\f1bc"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-star:before{content:"\f005"}.fa-star-half:before{content:"\f089"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-strava:before{content:"\f428"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-trademark:before{content:"\f25c"}.fa-train:before{content:"\f238"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-moving:before{content:"\f4df"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-circle:before{content:"\f2bd"}.fa-user-md:before{content:"\f0f0"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vuejs:before{content:"\f41f"}.fa-warehouse:before{content:"\f494"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-glass:before{content:"\f4e3"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:Font Awesome\ 5 Brands;font-style:normal;font-weight:400;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:Font Awesome\ 5 Brands}@font-face{font-family:Font Awesome\ 5 Free;font-style:normal;font-weight:400;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-weight:400}@font-face{font-family:Font Awesome\ 5 Free;font-style:normal;font-weight:900;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:Font Awesome\ 5 Free}.fa,.fas{font-weight:900} \ No newline at end of file diff --git a/docs/css/css/fontawesome.css b/docs/css/css/fontawesome.css new file mode 100644 index 0000000000000000000000000000000000000000..d58b1b2412039f436b0a1c67a341b11035ce1f47 --- /dev/null +++ b/docs/css/css/fontawesome.css @@ -0,0 +1,2831 @@ +/*! + * Font Awesome Free 5.0.10 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa, +.fas, +.far, +.fal, +.fab { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + display: inline-block; + font-style: normal; + font-variant: normal; + text-rendering: auto; + line-height: 1; } + +.fa-lg { + font-size: 1.33333em; + line-height: 0.75em; + vertical-align: -.0667em; } + +.fa-xs { + font-size: .75em; } + +.fa-sm { + font-size: .875em; } + +.fa-1x { + font-size: 1em; } + +.fa-2x { + font-size: 2em; } + +.fa-3x { + font-size: 3em; } + +.fa-4x { + font-size: 4em; } + +.fa-5x { + font-size: 5em; } + +.fa-6x { + font-size: 6em; } + +.fa-7x { + font-size: 7em; } + +.fa-8x { + font-size: 8em; } + +.fa-9x { + font-size: 9em; } + +.fa-10x { + font-size: 10em; } + +.fa-fw { + text-align: center; + width: 1.25em; } + +.fa-ul { + list-style-type: none; + margin-left: 2.5em; + padding-left: 0; } + .fa-ul > li { + position: relative; } + +.fa-li { + left: -2em; + position: absolute; + text-align: center; + width: 2em; + line-height: inherit; } + +.fa-border { + border: solid 0.08em #eee; + border-radius: .1em; + padding: .2em .25em .15em; } + +.fa-pull-left { + float: left; } + +.fa-pull-right { + float: right; } + +.fa.fa-pull-left, +.fas.fa-pull-left, +.far.fa-pull-left, +.fal.fa-pull-left, +.fab.fa-pull-left { + margin-right: .3em; } + +.fa.fa-pull-right, +.fas.fa-pull-right, +.far.fa-pull-right, +.fal.fa-pull-right, +.fab.fa-pull-right { + margin-left: .3em; } + +.fa-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; } + +.fa-pulse { + -webkit-animation: fa-spin 1s infinite steps(8); + animation: fa-spin 1s infinite steps(8); } + +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); } } + +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); } } + +.fa-rotate-90 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); } + +.fa-rotate-180 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; + -webkit-transform: rotate(180deg); + transform: rotate(180deg); } + +.fa-rotate-270 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; + -webkit-transform: rotate(270deg); + transform: rotate(270deg); } + +.fa-flip-horizontal { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; + -webkit-transform: scale(-1, 1); + transform: scale(-1, 1); } + +.fa-flip-vertical { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; + -webkit-transform: scale(1, -1); + transform: scale(1, -1); } + +.fa-flip-horizontal.fa-flip-vertical { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; + -webkit-transform: scale(-1, -1); + transform: scale(-1, -1); } + +:root .fa-rotate-90, +:root .fa-rotate-180, +:root .fa-rotate-270, +:root .fa-flip-horizontal, +:root .fa-flip-vertical { + -webkit-filter: none; + filter: none; } + +.fa-stack { + display: inline-block; + height: 2em; + line-height: 2em; + position: relative; + vertical-align: middle; + width: 2em; } + +.fa-stack-1x, +.fa-stack-2x { + left: 0; + position: absolute; + text-align: center; + width: 100%; } + +.fa-stack-1x { + line-height: inherit; } + +.fa-stack-2x { + font-size: 2em; } + +.fa-inverse { + color: #fff; } + +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen +readers do not read off random characters that represent icons */ +.fa-500px:before { + content: "\f26e"; } + +.fa-accessible-icon:before { + content: "\f368"; } + +.fa-accusoft:before { + content: "\f369"; } + +.fa-address-book:before { + content: "\f2b9"; } + +.fa-address-card:before { + content: "\f2bb"; } + +.fa-adjust:before { + content: "\f042"; } + +.fa-adn:before { + content: "\f170"; } + +.fa-adversal:before { + content: "\f36a"; } + +.fa-affiliatetheme:before { + content: "\f36b"; } + +.fa-algolia:before { + content: "\f36c"; } + +.fa-align-center:before { + content: "\f037"; } + +.fa-align-justify:before { + content: "\f039"; } + +.fa-align-left:before { + content: "\f036"; } + +.fa-align-right:before { + content: "\f038"; } + +.fa-allergies:before { + content: "\f461"; } + +.fa-amazon:before { + content: "\f270"; } + +.fa-amazon-pay:before { + content: "\f42c"; } + +.fa-ambulance:before { + content: "\f0f9"; } + +.fa-american-sign-language-interpreting:before { + content: "\f2a3"; } + +.fa-amilia:before { + content: "\f36d"; } + +.fa-anchor:before { + content: "\f13d"; } + +.fa-android:before { + content: "\f17b"; } + +.fa-angellist:before { + content: "\f209"; } + +.fa-angle-double-down:before { + content: "\f103"; } + +.fa-angle-double-left:before { + content: "\f100"; } + +.fa-angle-double-right:before { + content: "\f101"; } + +.fa-angle-double-up:before { + content: "\f102"; } + +.fa-angle-down:before { + content: "\f107"; } + +.fa-angle-left:before { + content: "\f104"; } + +.fa-angle-right:before { + content: "\f105"; } + +.fa-angle-up:before { + content: "\f106"; } + +.fa-angrycreative:before { + content: "\f36e"; } + +.fa-angular:before { + content: "\f420"; } + +.fa-app-store:before { + content: "\f36f"; } + +.fa-app-store-ios:before { + content: "\f370"; } + +.fa-apper:before { + content: "\f371"; } + +.fa-apple:before { + content: "\f179"; } + +.fa-apple-pay:before { + content: "\f415"; } + +.fa-archive:before { + content: "\f187"; } + +.fa-arrow-alt-circle-down:before { + content: "\f358"; } + +.fa-arrow-alt-circle-left:before { + content: "\f359"; } + +.fa-arrow-alt-circle-right:before { + content: "\f35a"; } + +.fa-arrow-alt-circle-up:before { + content: "\f35b"; } + +.fa-arrow-circle-down:before { + content: "\f0ab"; } + +.fa-arrow-circle-left:before { + content: "\f0a8"; } + +.fa-arrow-circle-right:before { + content: "\f0a9"; } + +.fa-arrow-circle-up:before { + content: "\f0aa"; } + +.fa-arrow-down:before { + content: "\f063"; } + +.fa-arrow-left:before { + content: "\f060"; } + +.fa-arrow-right:before { + content: "\f061"; } + +.fa-arrow-up:before { + content: "\f062"; } + +.fa-arrows-alt:before { + content: "\f0b2"; } + +.fa-arrows-alt-h:before { + content: "\f337"; } + +.fa-arrows-alt-v:before { + content: "\f338"; } + +.fa-assistive-listening-systems:before { + content: "\f2a2"; } + +.fa-asterisk:before { + content: "\f069"; } + +.fa-asymmetrik:before { + content: "\f372"; } + +.fa-at:before { + content: "\f1fa"; } + +.fa-audible:before { + content: "\f373"; } + +.fa-audio-description:before { + content: "\f29e"; } + +.fa-autoprefixer:before { + content: "\f41c"; } + +.fa-avianex:before { + content: "\f374"; } + +.fa-aviato:before { + content: "\f421"; } + +.fa-aws:before { + content: "\f375"; } + +.fa-backward:before { + content: "\f04a"; } + +.fa-balance-scale:before { + content: "\f24e"; } + +.fa-ban:before { + content: "\f05e"; } + +.fa-band-aid:before { + content: "\f462"; } + +.fa-bandcamp:before { + content: "\f2d5"; } + +.fa-barcode:before { + content: "\f02a"; } + +.fa-bars:before { + content: "\f0c9"; } + +.fa-baseball-ball:before { + content: "\f433"; } + +.fa-basketball-ball:before { + content: "\f434"; } + +.fa-bath:before { + content: "\f2cd"; } + +.fa-battery-empty:before { + content: "\f244"; } + +.fa-battery-full:before { + content: "\f240"; } + +.fa-battery-half:before { + content: "\f242"; } + +.fa-battery-quarter:before { + content: "\f243"; } + +.fa-battery-three-quarters:before { + content: "\f241"; } + +.fa-bed:before { + content: "\f236"; } + +.fa-beer:before { + content: "\f0fc"; } + +.fa-behance:before { + content: "\f1b4"; } + +.fa-behance-square:before { + content: "\f1b5"; } + +.fa-bell:before { + content: "\f0f3"; } + +.fa-bell-slash:before { + content: "\f1f6"; } + +.fa-bicycle:before { + content: "\f206"; } + +.fa-bimobject:before { + content: "\f378"; } + +.fa-binoculars:before { + content: "\f1e5"; } + +.fa-birthday-cake:before { + content: "\f1fd"; } + +.fa-bitbucket:before { + content: "\f171"; } + +.fa-bitcoin:before { + content: "\f379"; } + +.fa-bity:before { + content: "\f37a"; } + +.fa-black-tie:before { + content: "\f27e"; } + +.fa-blackberry:before { + content: "\f37b"; } + +.fa-blind:before { + content: "\f29d"; } + +.fa-blogger:before { + content: "\f37c"; } + +.fa-blogger-b:before { + content: "\f37d"; } + +.fa-bluetooth:before { + content: "\f293"; } + +.fa-bluetooth-b:before { + content: "\f294"; } + +.fa-bold:before { + content: "\f032"; } + +.fa-bolt:before { + content: "\f0e7"; } + +.fa-bomb:before { + content: "\f1e2"; } + +.fa-book:before { + content: "\f02d"; } + +.fa-bookmark:before { + content: "\f02e"; } + +.fa-bowling-ball:before { + content: "\f436"; } + +.fa-box:before { + content: "\f466"; } + +.fa-box-open:before { + content: "\f49e"; } + +.fa-boxes:before { + content: "\f468"; } + +.fa-braille:before { + content: "\f2a1"; } + +.fa-briefcase:before { + content: "\f0b1"; } + +.fa-briefcase-medical:before { + content: "\f469"; } + +.fa-btc:before { + content: "\f15a"; } + +.fa-bug:before { + content: "\f188"; } + +.fa-building:before { + content: "\f1ad"; } + +.fa-bullhorn:before { + content: "\f0a1"; } + +.fa-bullseye:before { + content: "\f140"; } + +.fa-burn:before { + content: "\f46a"; } + +.fa-buromobelexperte:before { + content: "\f37f"; } + +.fa-bus:before { + content: "\f207"; } + +.fa-buysellads:before { + content: "\f20d"; } + +.fa-calculator:before { + content: "\f1ec"; } + +.fa-calendar:before { + content: "\f133"; } + +.fa-calendar-alt:before { + content: "\f073"; } + +.fa-calendar-check:before { + content: "\f274"; } + +.fa-calendar-minus:before { + content: "\f272"; } + +.fa-calendar-plus:before { + content: "\f271"; } + +.fa-calendar-times:before { + content: "\f273"; } + +.fa-camera:before { + content: "\f030"; } + +.fa-camera-retro:before { + content: "\f083"; } + +.fa-capsules:before { + content: "\f46b"; } + +.fa-car:before { + content: "\f1b9"; } + +.fa-caret-down:before { + content: "\f0d7"; } + +.fa-caret-left:before { + content: "\f0d9"; } + +.fa-caret-right:before { + content: "\f0da"; } + +.fa-caret-square-down:before { + content: "\f150"; } + +.fa-caret-square-left:before { + content: "\f191"; } + +.fa-caret-square-right:before { + content: "\f152"; } + +.fa-caret-square-up:before { + content: "\f151"; } + +.fa-caret-up:before { + content: "\f0d8"; } + +.fa-cart-arrow-down:before { + content: "\f218"; } + +.fa-cart-plus:before { + content: "\f217"; } + +.fa-cc-amazon-pay:before { + content: "\f42d"; } + +.fa-cc-amex:before { + content: "\f1f3"; } + +.fa-cc-apple-pay:before { + content: "\f416"; } + +.fa-cc-diners-club:before { + content: "\f24c"; } + +.fa-cc-discover:before { + content: "\f1f2"; } + +.fa-cc-jcb:before { + content: "\f24b"; } + +.fa-cc-mastercard:before { + content: "\f1f1"; } + +.fa-cc-paypal:before { + content: "\f1f4"; } + +.fa-cc-stripe:before { + content: "\f1f5"; } + +.fa-cc-visa:before { + content: "\f1f0"; } + +.fa-centercode:before { + content: "\f380"; } + +.fa-certificate:before { + content: "\f0a3"; } + +.fa-chart-area:before { + content: "\f1fe"; } + +.fa-chart-bar:before { + content: "\f080"; } + +.fa-chart-line:before { + content: "\f201"; } + +.fa-chart-pie:before { + content: "\f200"; } + +.fa-check:before { + content: "\f00c"; } + +.fa-check-circle:before { + content: "\f058"; } + +.fa-check-square:before { + content: "\f14a"; } + +.fa-chess:before { + content: "\f439"; } + +.fa-chess-bishop:before { + content: "\f43a"; } + +.fa-chess-board:before { + content: "\f43c"; } + +.fa-chess-king:before { + content: "\f43f"; } + +.fa-chess-knight:before { + content: "\f441"; } + +.fa-chess-pawn:before { + content: "\f443"; } + +.fa-chess-queen:before { + content: "\f445"; } + +.fa-chess-rook:before { + content: "\f447"; } + +.fa-chevron-circle-down:before { + content: "\f13a"; } + +.fa-chevron-circle-left:before { + content: "\f137"; } + +.fa-chevron-circle-right:before { + content: "\f138"; } + +.fa-chevron-circle-up:before { + content: "\f139"; } + +.fa-chevron-down:before { + content: "\f078"; } + +.fa-chevron-left:before { + content: "\f053"; } + +.fa-chevron-right:before { + content: "\f054"; } + +.fa-chevron-up:before { + content: "\f077"; } + +.fa-child:before { + content: "\f1ae"; } + +.fa-chrome:before { + content: "\f268"; } + +.fa-circle:before { + content: "\f111"; } + +.fa-circle-notch:before { + content: "\f1ce"; } + +.fa-clipboard:before { + content: "\f328"; } + +.fa-clipboard-check:before { + content: "\f46c"; } + +.fa-clipboard-list:before { + content: "\f46d"; } + +.fa-clock:before { + content: "\f017"; } + +.fa-clone:before { + content: "\f24d"; } + +.fa-closed-captioning:before { + content: "\f20a"; } + +.fa-cloud:before { + content: "\f0c2"; } + +.fa-cloud-download-alt:before { + content: "\f381"; } + +.fa-cloud-upload-alt:before { + content: "\f382"; } + +.fa-cloudscale:before { + content: "\f383"; } + +.fa-cloudsmith:before { + content: "\f384"; } + +.fa-cloudversify:before { + content: "\f385"; } + +.fa-code:before { + content: "\f121"; } + +.fa-code-branch:before { + content: "\f126"; } + +.fa-codepen:before { + content: "\f1cb"; } + +.fa-codiepie:before { + content: "\f284"; } + +.fa-coffee:before { + content: "\f0f4"; } + +.fa-cog:before { + content: "\f013"; } + +.fa-cogs:before { + content: "\f085"; } + +.fa-columns:before { + content: "\f0db"; } + +.fa-comment:before { + content: "\f075"; } + +.fa-comment-alt:before { + content: "\f27a"; } + +.fa-comment-dots:before { + content: "\f4ad"; } + +.fa-comment-slash:before { + content: "\f4b3"; } + +.fa-comments:before { + content: "\f086"; } + +.fa-compass:before { + content: "\f14e"; } + +.fa-compress:before { + content: "\f066"; } + +.fa-connectdevelop:before { + content: "\f20e"; } + +.fa-contao:before { + content: "\f26d"; } + +.fa-copy:before { + content: "\f0c5"; } + +.fa-copyright:before { + content: "\f1f9"; } + +.fa-couch:before { + content: "\f4b8"; } + +.fa-cpanel:before { + content: "\f388"; } + +.fa-creative-commons:before { + content: "\f25e"; } + +.fa-credit-card:before { + content: "\f09d"; } + +.fa-crop:before { + content: "\f125"; } + +.fa-crosshairs:before { + content: "\f05b"; } + +.fa-css3:before { + content: "\f13c"; } + +.fa-css3-alt:before { + content: "\f38b"; } + +.fa-cube:before { + content: "\f1b2"; } + +.fa-cubes:before { + content: "\f1b3"; } + +.fa-cut:before { + content: "\f0c4"; } + +.fa-cuttlefish:before { + content: "\f38c"; } + +.fa-d-and-d:before { + content: "\f38d"; } + +.fa-dashcube:before { + content: "\f210"; } + +.fa-database:before { + content: "\f1c0"; } + +.fa-deaf:before { + content: "\f2a4"; } + +.fa-delicious:before { + content: "\f1a5"; } + +.fa-deploydog:before { + content: "\f38e"; } + +.fa-deskpro:before { + content: "\f38f"; } + +.fa-desktop:before { + content: "\f108"; } + +.fa-deviantart:before { + content: "\f1bd"; } + +.fa-diagnoses:before { + content: "\f470"; } + +.fa-digg:before { + content: "\f1a6"; } + +.fa-digital-ocean:before { + content: "\f391"; } + +.fa-discord:before { + content: "\f392"; } + +.fa-discourse:before { + content: "\f393"; } + +.fa-dna:before { + content: "\f471"; } + +.fa-dochub:before { + content: "\f394"; } + +.fa-docker:before { + content: "\f395"; } + +.fa-dollar-sign:before { + content: "\f155"; } + +.fa-dolly:before { + content: "\f472"; } + +.fa-dolly-flatbed:before { + content: "\f474"; } + +.fa-donate:before { + content: "\f4b9"; } + +.fa-dot-circle:before { + content: "\f192"; } + +.fa-dove:before { + content: "\f4ba"; } + +.fa-download:before { + content: "\f019"; } + +.fa-draft2digital:before { + content: "\f396"; } + +.fa-dribbble:before { + content: "\f17d"; } + +.fa-dribbble-square:before { + content: "\f397"; } + +.fa-dropbox:before { + content: "\f16b"; } + +.fa-drupal:before { + content: "\f1a9"; } + +.fa-dyalog:before { + content: "\f399"; } + +.fa-earlybirds:before { + content: "\f39a"; } + +.fa-edge:before { + content: "\f282"; } + +.fa-edit:before { + content: "\f044"; } + +.fa-eject:before { + content: "\f052"; } + +.fa-elementor:before { + content: "\f430"; } + +.fa-ellipsis-h:before { + content: "\f141"; } + +.fa-ellipsis-v:before { + content: "\f142"; } + +.fa-ember:before { + content: "\f423"; } + +.fa-empire:before { + content: "\f1d1"; } + +.fa-envelope:before { + content: "\f0e0"; } + +.fa-envelope-open:before { + content: "\f2b6"; } + +.fa-envelope-square:before { + content: "\f199"; } + +.fa-envira:before { + content: "\f299"; } + +.fa-eraser:before { + content: "\f12d"; } + +.fa-erlang:before { + content: "\f39d"; } + +.fa-ethereum:before { + content: "\f42e"; } + +.fa-etsy:before { + content: "\f2d7"; } + +.fa-euro-sign:before { + content: "\f153"; } + +.fa-exchange-alt:before { + content: "\f362"; } + +.fa-exclamation:before { + content: "\f12a"; } + +.fa-exclamation-circle:before { + content: "\f06a"; } + +.fa-exclamation-triangle:before { + content: "\f071"; } + +.fa-expand:before { + content: "\f065"; } + +.fa-expand-arrows-alt:before { + content: "\f31e"; } + +.fa-expeditedssl:before { + content: "\f23e"; } + +.fa-external-link-alt:before { + content: "\f35d"; } + +.fa-external-link-square-alt:before { + content: "\f360"; } + +.fa-eye:before { + content: "\f06e"; } + +.fa-eye-dropper:before { + content: "\f1fb"; } + +.fa-eye-slash:before { + content: "\f070"; } + +.fa-facebook:before { + content: "\f09a"; } + +.fa-facebook-f:before { + content: "\f39e"; } + +.fa-facebook-messenger:before { + content: "\f39f"; } + +.fa-facebook-square:before { + content: "\f082"; } + +.fa-fast-backward:before { + content: "\f049"; } + +.fa-fast-forward:before { + content: "\f050"; } + +.fa-fax:before { + content: "\f1ac"; } + +.fa-female:before { + content: "\f182"; } + +.fa-fighter-jet:before { + content: "\f0fb"; } + +.fa-file:before { + content: "\f15b"; } + +.fa-file-alt:before { + content: "\f15c"; } + +.fa-file-archive:before { + content: "\f1c6"; } + +.fa-file-audio:before { + content: "\f1c7"; } + +.fa-file-code:before { + content: "\f1c9"; } + +.fa-file-excel:before { + content: "\f1c3"; } + +.fa-file-image:before { + content: "\f1c5"; } + +.fa-file-medical:before { + content: "\f477"; } + +.fa-file-medical-alt:before { + content: "\f478"; } + +.fa-file-pdf:before { + content: "\f1c1"; } + +.fa-file-powerpoint:before { + content: "\f1c4"; } + +.fa-file-video:before { + content: "\f1c8"; } + +.fa-file-word:before { + content: "\f1c2"; } + +.fa-film:before { + content: "\f008"; } + +.fa-filter:before { + content: "\f0b0"; } + +.fa-fire:before { + content: "\f06d"; } + +.fa-fire-extinguisher:before { + content: "\f134"; } + +.fa-firefox:before { + content: "\f269"; } + +.fa-first-aid:before { + content: "\f479"; } + +.fa-first-order:before { + content: "\f2b0"; } + +.fa-firstdraft:before { + content: "\f3a1"; } + +.fa-flag:before { + content: "\f024"; } + +.fa-flag-checkered:before { + content: "\f11e"; } + +.fa-flask:before { + content: "\f0c3"; } + +.fa-flickr:before { + content: "\f16e"; } + +.fa-flipboard:before { + content: "\f44d"; } + +.fa-fly:before { + content: "\f417"; } + +.fa-folder:before { + content: "\f07b"; } + +.fa-folder-open:before { + content: "\f07c"; } + +.fa-font:before { + content: "\f031"; } + +.fa-font-awesome:before { + content: "\f2b4"; } + +.fa-font-awesome-alt:before { + content: "\f35c"; } + +.fa-font-awesome-flag:before { + content: "\f425"; } + +.fa-fonticons:before { + content: "\f280"; } + +.fa-fonticons-fi:before { + content: "\f3a2"; } + +.fa-football-ball:before { + content: "\f44e"; } + +.fa-fort-awesome:before { + content: "\f286"; } + +.fa-fort-awesome-alt:before { + content: "\f3a3"; } + +.fa-forumbee:before { + content: "\f211"; } + +.fa-forward:before { + content: "\f04e"; } + +.fa-foursquare:before { + content: "\f180"; } + +.fa-free-code-camp:before { + content: "\f2c5"; } + +.fa-freebsd:before { + content: "\f3a4"; } + +.fa-frown:before { + content: "\f119"; } + +.fa-futbol:before { + content: "\f1e3"; } + +.fa-gamepad:before { + content: "\f11b"; } + +.fa-gavel:before { + content: "\f0e3"; } + +.fa-gem:before { + content: "\f3a5"; } + +.fa-genderless:before { + content: "\f22d"; } + +.fa-get-pocket:before { + content: "\f265"; } + +.fa-gg:before { + content: "\f260"; } + +.fa-gg-circle:before { + content: "\f261"; } + +.fa-gift:before { + content: "\f06b"; } + +.fa-git:before { + content: "\f1d3"; } + +.fa-git-square:before { + content: "\f1d2"; } + +.fa-github:before { + content: "\f09b"; } + +.fa-github-alt:before { + content: "\f113"; } + +.fa-github-square:before { + content: "\f092"; } + +.fa-gitkraken:before { + content: "\f3a6"; } + +.fa-gitlab:before { + content: "\f296"; } + +.fa-gitter:before { + content: "\f426"; } + +.fa-glass-martini:before { + content: "\f000"; } + +.fa-glide:before { + content: "\f2a5"; } + +.fa-glide-g:before { + content: "\f2a6"; } + +.fa-globe:before { + content: "\f0ac"; } + +.fa-gofore:before { + content: "\f3a7"; } + +.fa-golf-ball:before { + content: "\f450"; } + +.fa-goodreads:before { + content: "\f3a8"; } + +.fa-goodreads-g:before { + content: "\f3a9"; } + +.fa-google:before { + content: "\f1a0"; } + +.fa-google-drive:before { + content: "\f3aa"; } + +.fa-google-play:before { + content: "\f3ab"; } + +.fa-google-plus:before { + content: "\f2b3"; } + +.fa-google-plus-g:before { + content: "\f0d5"; } + +.fa-google-plus-square:before { + content: "\f0d4"; } + +.fa-google-wallet:before { + content: "\f1ee"; } + +.fa-graduation-cap:before { + content: "\f19d"; } + +.fa-gratipay:before { + content: "\f184"; } + +.fa-grav:before { + content: "\f2d6"; } + +.fa-gripfire:before { + content: "\f3ac"; } + +.fa-grunt:before { + content: "\f3ad"; } + +.fa-gulp:before { + content: "\f3ae"; } + +.fa-h-square:before { + content: "\f0fd"; } + +.fa-hacker-news:before { + content: "\f1d4"; } + +.fa-hacker-news-square:before { + content: "\f3af"; } + +.fa-hand-holding:before { + content: "\f4bd"; } + +.fa-hand-holding-heart:before { + content: "\f4be"; } + +.fa-hand-holding-usd:before { + content: "\f4c0"; } + +.fa-hand-lizard:before { + content: "\f258"; } + +.fa-hand-paper:before { + content: "\f256"; } + +.fa-hand-peace:before { + content: "\f25b"; } + +.fa-hand-point-down:before { + content: "\f0a7"; } + +.fa-hand-point-left:before { + content: "\f0a5"; } + +.fa-hand-point-right:before { + content: "\f0a4"; } + +.fa-hand-point-up:before { + content: "\f0a6"; } + +.fa-hand-pointer:before { + content: "\f25a"; } + +.fa-hand-rock:before { + content: "\f255"; } + +.fa-hand-scissors:before { + content: "\f257"; } + +.fa-hand-spock:before { + content: "\f259"; } + +.fa-hands:before { + content: "\f4c2"; } + +.fa-hands-helping:before { + content: "\f4c4"; } + +.fa-handshake:before { + content: "\f2b5"; } + +.fa-hashtag:before { + content: "\f292"; } + +.fa-hdd:before { + content: "\f0a0"; } + +.fa-heading:before { + content: "\f1dc"; } + +.fa-headphones:before { + content: "\f025"; } + +.fa-heart:before { + content: "\f004"; } + +.fa-heartbeat:before { + content: "\f21e"; } + +.fa-hips:before { + content: "\f452"; } + +.fa-hire-a-helper:before { + content: "\f3b0"; } + +.fa-history:before { + content: "\f1da"; } + +.fa-hockey-puck:before { + content: "\f453"; } + +.fa-home:before { + content: "\f015"; } + +.fa-hooli:before { + content: "\f427"; } + +.fa-hospital:before { + content: "\f0f8"; } + +.fa-hospital-alt:before { + content: "\f47d"; } + +.fa-hospital-symbol:before { + content: "\f47e"; } + +.fa-hotjar:before { + content: "\f3b1"; } + +.fa-hourglass:before { + content: "\f254"; } + +.fa-hourglass-end:before { + content: "\f253"; } + +.fa-hourglass-half:before { + content: "\f252"; } + +.fa-hourglass-start:before { + content: "\f251"; } + +.fa-houzz:before { + content: "\f27c"; } + +.fa-html5:before { + content: "\f13b"; } + +.fa-hubspot:before { + content: "\f3b2"; } + +.fa-i-cursor:before { + content: "\f246"; } + +.fa-id-badge:before { + content: "\f2c1"; } + +.fa-id-card:before { + content: "\f2c2"; } + +.fa-id-card-alt:before { + content: "\f47f"; } + +.fa-image:before { + content: "\f03e"; } + +.fa-images:before { + content: "\f302"; } + +.fa-imdb:before { + content: "\f2d8"; } + +.fa-inbox:before { + content: "\f01c"; } + +.fa-indent:before { + content: "\f03c"; } + +.fa-industry:before { + content: "\f275"; } + +.fa-info:before { + content: "\f129"; } + +.fa-info-circle:before { + content: "\f05a"; } + +.fa-instagram:before { + content: "\f16d"; } + +.fa-internet-explorer:before { + content: "\f26b"; } + +.fa-ioxhost:before { + content: "\f208"; } + +.fa-italic:before { + content: "\f033"; } + +.fa-itunes:before { + content: "\f3b4"; } + +.fa-itunes-note:before { + content: "\f3b5"; } + +.fa-java:before { + content: "\f4e4"; } + +.fa-jenkins:before { + content: "\f3b6"; } + +.fa-joget:before { + content: "\f3b7"; } + +.fa-joomla:before { + content: "\f1aa"; } + +.fa-js:before { + content: "\f3b8"; } + +.fa-js-square:before { + content: "\f3b9"; } + +.fa-jsfiddle:before { + content: "\f1cc"; } + +.fa-key:before { + content: "\f084"; } + +.fa-keyboard:before { + content: "\f11c"; } + +.fa-keycdn:before { + content: "\f3ba"; } + +.fa-kickstarter:before { + content: "\f3bb"; } + +.fa-kickstarter-k:before { + content: "\f3bc"; } + +.fa-korvue:before { + content: "\f42f"; } + +.fa-language:before { + content: "\f1ab"; } + +.fa-laptop:before { + content: "\f109"; } + +.fa-laravel:before { + content: "\f3bd"; } + +.fa-lastfm:before { + content: "\f202"; } + +.fa-lastfm-square:before { + content: "\f203"; } + +.fa-leaf:before { + content: "\f06c"; } + +.fa-leanpub:before { + content: "\f212"; } + +.fa-lemon:before { + content: "\f094"; } + +.fa-less:before { + content: "\f41d"; } + +.fa-level-down-alt:before { + content: "\f3be"; } + +.fa-level-up-alt:before { + content: "\f3bf"; } + +.fa-life-ring:before { + content: "\f1cd"; } + +.fa-lightbulb:before { + content: "\f0eb"; } + +.fa-line:before { + content: "\f3c0"; } + +.fa-link:before { + content: "\f0c1"; } + +.fa-linkedin:before { + content: "\f08c"; } + +.fa-linkedin-in:before { + content: "\f0e1"; } + +.fa-linode:before { + content: "\f2b8"; } + +.fa-linux:before { + content: "\f17c"; } + +.fa-lira-sign:before { + content: "\f195"; } + +.fa-list:before { + content: "\f03a"; } + +.fa-list-alt:before { + content: "\f022"; } + +.fa-list-ol:before { + content: "\f0cb"; } + +.fa-list-ul:before { + content: "\f0ca"; } + +.fa-location-arrow:before { + content: "\f124"; } + +.fa-lock:before { + content: "\f023"; } + +.fa-lock-open:before { + content: "\f3c1"; } + +.fa-long-arrow-alt-down:before { + content: "\f309"; } + +.fa-long-arrow-alt-left:before { + content: "\f30a"; } + +.fa-long-arrow-alt-right:before { + content: "\f30b"; } + +.fa-long-arrow-alt-up:before { + content: "\f30c"; } + +.fa-low-vision:before { + content: "\f2a8"; } + +.fa-lyft:before { + content: "\f3c3"; } + +.fa-magento:before { + content: "\f3c4"; } + +.fa-magic:before { + content: "\f0d0"; } + +.fa-magnet:before { + content: "\f076"; } + +.fa-male:before { + content: "\f183"; } + +.fa-map:before { + content: "\f279"; } + +.fa-map-marker:before { + content: "\f041"; } + +.fa-map-marker-alt:before { + content: "\f3c5"; } + +.fa-map-pin:before { + content: "\f276"; } + +.fa-map-signs:before { + content: "\f277"; } + +.fa-mars:before { + content: "\f222"; } + +.fa-mars-double:before { + content: "\f227"; } + +.fa-mars-stroke:before { + content: "\f229"; } + +.fa-mars-stroke-h:before { + content: "\f22b"; } + +.fa-mars-stroke-v:before { + content: "\f22a"; } + +.fa-maxcdn:before { + content: "\f136"; } + +.fa-medapps:before { + content: "\f3c6"; } + +.fa-medium:before { + content: "\f23a"; } + +.fa-medium-m:before { + content: "\f3c7"; } + +.fa-medkit:before { + content: "\f0fa"; } + +.fa-medrt:before { + content: "\f3c8"; } + +.fa-meetup:before { + content: "\f2e0"; } + +.fa-meh:before { + content: "\f11a"; } + +.fa-mercury:before { + content: "\f223"; } + +.fa-microchip:before { + content: "\f2db"; } + +.fa-microphone:before { + content: "\f130"; } + +.fa-microphone-slash:before { + content: "\f131"; } + +.fa-microsoft:before { + content: "\f3ca"; } + +.fa-minus:before { + content: "\f068"; } + +.fa-minus-circle:before { + content: "\f056"; } + +.fa-minus-square:before { + content: "\f146"; } + +.fa-mix:before { + content: "\f3cb"; } + +.fa-mixcloud:before { + content: "\f289"; } + +.fa-mizuni:before { + content: "\f3cc"; } + +.fa-mobile:before { + content: "\f10b"; } + +.fa-mobile-alt:before { + content: "\f3cd"; } + +.fa-modx:before { + content: "\f285"; } + +.fa-monero:before { + content: "\f3d0"; } + +.fa-money-bill-alt:before { + content: "\f3d1"; } + +.fa-moon:before { + content: "\f186"; } + +.fa-motorcycle:before { + content: "\f21c"; } + +.fa-mouse-pointer:before { + content: "\f245"; } + +.fa-music:before { + content: "\f001"; } + +.fa-napster:before { + content: "\f3d2"; } + +.fa-neuter:before { + content: "\f22c"; } + +.fa-newspaper:before { + content: "\f1ea"; } + +.fa-nintendo-switch:before { + content: "\f418"; } + +.fa-node:before { + content: "\f419"; } + +.fa-node-js:before { + content: "\f3d3"; } + +.fa-notes-medical:before { + content: "\f481"; } + +.fa-npm:before { + content: "\f3d4"; } + +.fa-ns8:before { + content: "\f3d5"; } + +.fa-nutritionix:before { + content: "\f3d6"; } + +.fa-object-group:before { + content: "\f247"; } + +.fa-object-ungroup:before { + content: "\f248"; } + +.fa-odnoklassniki:before { + content: "\f263"; } + +.fa-odnoklassniki-square:before { + content: "\f264"; } + +.fa-opencart:before { + content: "\f23d"; } + +.fa-openid:before { + content: "\f19b"; } + +.fa-opera:before { + content: "\f26a"; } + +.fa-optin-monster:before { + content: "\f23c"; } + +.fa-osi:before { + content: "\f41a"; } + +.fa-outdent:before { + content: "\f03b"; } + +.fa-page4:before { + content: "\f3d7"; } + +.fa-pagelines:before { + content: "\f18c"; } + +.fa-paint-brush:before { + content: "\f1fc"; } + +.fa-palfed:before { + content: "\f3d8"; } + +.fa-pallet:before { + content: "\f482"; } + +.fa-paper-plane:before { + content: "\f1d8"; } + +.fa-paperclip:before { + content: "\f0c6"; } + +.fa-parachute-box:before { + content: "\f4cd"; } + +.fa-paragraph:before { + content: "\f1dd"; } + +.fa-paste:before { + content: "\f0ea"; } + +.fa-patreon:before { + content: "\f3d9"; } + +.fa-pause:before { + content: "\f04c"; } + +.fa-pause-circle:before { + content: "\f28b"; } + +.fa-paw:before { + content: "\f1b0"; } + +.fa-paypal:before { + content: "\f1ed"; } + +.fa-pen-square:before { + content: "\f14b"; } + +.fa-pencil-alt:before { + content: "\f303"; } + +.fa-people-carry:before { + content: "\f4ce"; } + +.fa-percent:before { + content: "\f295"; } + +.fa-periscope:before { + content: "\f3da"; } + +.fa-phabricator:before { + content: "\f3db"; } + +.fa-phoenix-framework:before { + content: "\f3dc"; } + +.fa-phone:before { + content: "\f095"; } + +.fa-phone-slash:before { + content: "\f3dd"; } + +.fa-phone-square:before { + content: "\f098"; } + +.fa-phone-volume:before { + content: "\f2a0"; } + +.fa-php:before { + content: "\f457"; } + +.fa-pied-piper:before { + content: "\f2ae"; } + +.fa-pied-piper-alt:before { + content: "\f1a8"; } + +.fa-pied-piper-hat:before { + content: "\f4e5"; } + +.fa-pied-piper-pp:before { + content: "\f1a7"; } + +.fa-piggy-bank:before { + content: "\f4d3"; } + +.fa-pills:before { + content: "\f484"; } + +.fa-pinterest:before { + content: "\f0d2"; } + +.fa-pinterest-p:before { + content: "\f231"; } + +.fa-pinterest-square:before { + content: "\f0d3"; } + +.fa-plane:before { + content: "\f072"; } + +.fa-play:before { + content: "\f04b"; } + +.fa-play-circle:before { + content: "\f144"; } + +.fa-playstation:before { + content: "\f3df"; } + +.fa-plug:before { + content: "\f1e6"; } + +.fa-plus:before { + content: "\f067"; } + +.fa-plus-circle:before { + content: "\f055"; } + +.fa-plus-square:before { + content: "\f0fe"; } + +.fa-podcast:before { + content: "\f2ce"; } + +.fa-poo:before { + content: "\f2fe"; } + +.fa-pound-sign:before { + content: "\f154"; } + +.fa-power-off:before { + content: "\f011"; } + +.fa-prescription-bottle:before { + content: "\f485"; } + +.fa-prescription-bottle-alt:before { + content: "\f486"; } + +.fa-print:before { + content: "\f02f"; } + +.fa-procedures:before { + content: "\f487"; } + +.fa-product-hunt:before { + content: "\f288"; } + +.fa-pushed:before { + content: "\f3e1"; } + +.fa-puzzle-piece:before { + content: "\f12e"; } + +.fa-python:before { + content: "\f3e2"; } + +.fa-qq:before { + content: "\f1d6"; } + +.fa-qrcode:before { + content: "\f029"; } + +.fa-question:before { + content: "\f128"; } + +.fa-question-circle:before { + content: "\f059"; } + +.fa-quidditch:before { + content: "\f458"; } + +.fa-quinscape:before { + content: "\f459"; } + +.fa-quora:before { + content: "\f2c4"; } + +.fa-quote-left:before { + content: "\f10d"; } + +.fa-quote-right:before { + content: "\f10e"; } + +.fa-random:before { + content: "\f074"; } + +.fa-ravelry:before { + content: "\f2d9"; } + +.fa-react:before { + content: "\f41b"; } + +.fa-readme:before { + content: "\f4d5"; } + +.fa-rebel:before { + content: "\f1d0"; } + +.fa-recycle:before { + content: "\f1b8"; } + +.fa-red-river:before { + content: "\f3e3"; } + +.fa-reddit:before { + content: "\f1a1"; } + +.fa-reddit-alien:before { + content: "\f281"; } + +.fa-reddit-square:before { + content: "\f1a2"; } + +.fa-redo:before { + content: "\f01e"; } + +.fa-redo-alt:before { + content: "\f2f9"; } + +.fa-registered:before { + content: "\f25d"; } + +.fa-rendact:before { + content: "\f3e4"; } + +.fa-renren:before { + content: "\f18b"; } + +.fa-reply:before { + content: "\f3e5"; } + +.fa-reply-all:before { + content: "\f122"; } + +.fa-replyd:before { + content: "\f3e6"; } + +.fa-resolving:before { + content: "\f3e7"; } + +.fa-retweet:before { + content: "\f079"; } + +.fa-ribbon:before { + content: "\f4d6"; } + +.fa-road:before { + content: "\f018"; } + +.fa-rocket:before { + content: "\f135"; } + +.fa-rocketchat:before { + content: "\f3e8"; } + +.fa-rockrms:before { + content: "\f3e9"; } + +.fa-rss:before { + content: "\f09e"; } + +.fa-rss-square:before { + content: "\f143"; } + +.fa-ruble-sign:before { + content: "\f158"; } + +.fa-rupee-sign:before { + content: "\f156"; } + +.fa-safari:before { + content: "\f267"; } + +.fa-sass:before { + content: "\f41e"; } + +.fa-save:before { + content: "\f0c7"; } + +.fa-schlix:before { + content: "\f3ea"; } + +.fa-scribd:before { + content: "\f28a"; } + +.fa-search:before { + content: "\f002"; } + +.fa-search-minus:before { + content: "\f010"; } + +.fa-search-plus:before { + content: "\f00e"; } + +.fa-searchengin:before { + content: "\f3eb"; } + +.fa-seedling:before { + content: "\f4d8"; } + +.fa-sellcast:before { + content: "\f2da"; } + +.fa-sellsy:before { + content: "\f213"; } + +.fa-server:before { + content: "\f233"; } + +.fa-servicestack:before { + content: "\f3ec"; } + +.fa-share:before { + content: "\f064"; } + +.fa-share-alt:before { + content: "\f1e0"; } + +.fa-share-alt-square:before { + content: "\f1e1"; } + +.fa-share-square:before { + content: "\f14d"; } + +.fa-shekel-sign:before { + content: "\f20b"; } + +.fa-shield-alt:before { + content: "\f3ed"; } + +.fa-ship:before { + content: "\f21a"; } + +.fa-shipping-fast:before { + content: "\f48b"; } + +.fa-shirtsinbulk:before { + content: "\f214"; } + +.fa-shopping-bag:before { + content: "\f290"; } + +.fa-shopping-basket:before { + content: "\f291"; } + +.fa-shopping-cart:before { + content: "\f07a"; } + +.fa-shower:before { + content: "\f2cc"; } + +.fa-sign:before { + content: "\f4d9"; } + +.fa-sign-in-alt:before { + content: "\f2f6"; } + +.fa-sign-language:before { + content: "\f2a7"; } + +.fa-sign-out-alt:before { + content: "\f2f5"; } + +.fa-signal:before { + content: "\f012"; } + +.fa-simplybuilt:before { + content: "\f215"; } + +.fa-sistrix:before { + content: "\f3ee"; } + +.fa-sitemap:before { + content: "\f0e8"; } + +.fa-skyatlas:before { + content: "\f216"; } + +.fa-skype:before { + content: "\f17e"; } + +.fa-slack:before { + content: "\f198"; } + +.fa-slack-hash:before { + content: "\f3ef"; } + +.fa-sliders-h:before { + content: "\f1de"; } + +.fa-slideshare:before { + content: "\f1e7"; } + +.fa-smile:before { + content: "\f118"; } + +.fa-smoking:before { + content: "\f48d"; } + +.fa-snapchat:before { + content: "\f2ab"; } + +.fa-snapchat-ghost:before { + content: "\f2ac"; } + +.fa-snapchat-square:before { + content: "\f2ad"; } + +.fa-snowflake:before { + content: "\f2dc"; } + +.fa-sort:before { + content: "\f0dc"; } + +.fa-sort-alpha-down:before { + content: "\f15d"; } + +.fa-sort-alpha-up:before { + content: "\f15e"; } + +.fa-sort-amount-down:before { + content: "\f160"; } + +.fa-sort-amount-up:before { + content: "\f161"; } + +.fa-sort-down:before { + content: "\f0dd"; } + +.fa-sort-numeric-down:before { + content: "\f162"; } + +.fa-sort-numeric-up:before { + content: "\f163"; } + +.fa-sort-up:before { + content: "\f0de"; } + +.fa-soundcloud:before { + content: "\f1be"; } + +.fa-space-shuttle:before { + content: "\f197"; } + +.fa-speakap:before { + content: "\f3f3"; } + +.fa-spinner:before { + content: "\f110"; } + +.fa-spotify:before { + content: "\f1bc"; } + +.fa-square:before { + content: "\f0c8"; } + +.fa-square-full:before { + content: "\f45c"; } + +.fa-stack-exchange:before { + content: "\f18d"; } + +.fa-stack-overflow:before { + content: "\f16c"; } + +.fa-star:before { + content: "\f005"; } + +.fa-star-half:before { + content: "\f089"; } + +.fa-staylinked:before { + content: "\f3f5"; } + +.fa-steam:before { + content: "\f1b6"; } + +.fa-steam-square:before { + content: "\f1b7"; } + +.fa-steam-symbol:before { + content: "\f3f6"; } + +.fa-step-backward:before { + content: "\f048"; } + +.fa-step-forward:before { + content: "\f051"; } + +.fa-stethoscope:before { + content: "\f0f1"; } + +.fa-sticker-mule:before { + content: "\f3f7"; } + +.fa-sticky-note:before { + content: "\f249"; } + +.fa-stop:before { + content: "\f04d"; } + +.fa-stop-circle:before { + content: "\f28d"; } + +.fa-stopwatch:before { + content: "\f2f2"; } + +.fa-strava:before { + content: "\f428"; } + +.fa-street-view:before { + content: "\f21d"; } + +.fa-strikethrough:before { + content: "\f0cc"; } + +.fa-stripe:before { + content: "\f429"; } + +.fa-stripe-s:before { + content: "\f42a"; } + +.fa-studiovinari:before { + content: "\f3f8"; } + +.fa-stumbleupon:before { + content: "\f1a4"; } + +.fa-stumbleupon-circle:before { + content: "\f1a3"; } + +.fa-subscript:before { + content: "\f12c"; } + +.fa-subway:before { + content: "\f239"; } + +.fa-suitcase:before { + content: "\f0f2"; } + +.fa-sun:before { + content: "\f185"; } + +.fa-superpowers:before { + content: "\f2dd"; } + +.fa-superscript:before { + content: "\f12b"; } + +.fa-supple:before { + content: "\f3f9"; } + +.fa-sync:before { + content: "\f021"; } + +.fa-sync-alt:before { + content: "\f2f1"; } + +.fa-syringe:before { + content: "\f48e"; } + +.fa-table:before { + content: "\f0ce"; } + +.fa-table-tennis:before { + content: "\f45d"; } + +.fa-tablet:before { + content: "\f10a"; } + +.fa-tablet-alt:before { + content: "\f3fa"; } + +.fa-tablets:before { + content: "\f490"; } + +.fa-tachometer-alt:before { + content: "\f3fd"; } + +.fa-tag:before { + content: "\f02b"; } + +.fa-tags:before { + content: "\f02c"; } + +.fa-tape:before { + content: "\f4db"; } + +.fa-tasks:before { + content: "\f0ae"; } + +.fa-taxi:before { + content: "\f1ba"; } + +.fa-telegram:before { + content: "\f2c6"; } + +.fa-telegram-plane:before { + content: "\f3fe"; } + +.fa-tencent-weibo:before { + content: "\f1d5"; } + +.fa-terminal:before { + content: "\f120"; } + +.fa-text-height:before { + content: "\f034"; } + +.fa-text-width:before { + content: "\f035"; } + +.fa-th:before { + content: "\f00a"; } + +.fa-th-large:before { + content: "\f009"; } + +.fa-th-list:before { + content: "\f00b"; } + +.fa-themeisle:before { + content: "\f2b2"; } + +.fa-thermometer:before { + content: "\f491"; } + +.fa-thermometer-empty:before { + content: "\f2cb"; } + +.fa-thermometer-full:before { + content: "\f2c7"; } + +.fa-thermometer-half:before { + content: "\f2c9"; } + +.fa-thermometer-quarter:before { + content: "\f2ca"; } + +.fa-thermometer-three-quarters:before { + content: "\f2c8"; } + +.fa-thumbs-down:before { + content: "\f165"; } + +.fa-thumbs-up:before { + content: "\f164"; } + +.fa-thumbtack:before { + content: "\f08d"; } + +.fa-ticket-alt:before { + content: "\f3ff"; } + +.fa-times:before { + content: "\f00d"; } + +.fa-times-circle:before { + content: "\f057"; } + +.fa-tint:before { + content: "\f043"; } + +.fa-toggle-off:before { + content: "\f204"; } + +.fa-toggle-on:before { + content: "\f205"; } + +.fa-trademark:before { + content: "\f25c"; } + +.fa-train:before { + content: "\f238"; } + +.fa-transgender:before { + content: "\f224"; } + +.fa-transgender-alt:before { + content: "\f225"; } + +.fa-trash:before { + content: "\f1f8"; } + +.fa-trash-alt:before { + content: "\f2ed"; } + +.fa-tree:before { + content: "\f1bb"; } + +.fa-trello:before { + content: "\f181"; } + +.fa-tripadvisor:before { + content: "\f262"; } + +.fa-trophy:before { + content: "\f091"; } + +.fa-truck:before { + content: "\f0d1"; } + +.fa-truck-loading:before { + content: "\f4de"; } + +.fa-truck-moving:before { + content: "\f4df"; } + +.fa-tty:before { + content: "\f1e4"; } + +.fa-tumblr:before { + content: "\f173"; } + +.fa-tumblr-square:before { + content: "\f174"; } + +.fa-tv:before { + content: "\f26c"; } + +.fa-twitch:before { + content: "\f1e8"; } + +.fa-twitter:before { + content: "\f099"; } + +.fa-twitter-square:before { + content: "\f081"; } + +.fa-typo3:before { + content: "\f42b"; } + +.fa-uber:before { + content: "\f402"; } + +.fa-uikit:before { + content: "\f403"; } + +.fa-umbrella:before { + content: "\f0e9"; } + +.fa-underline:before { + content: "\f0cd"; } + +.fa-undo:before { + content: "\f0e2"; } + +.fa-undo-alt:before { + content: "\f2ea"; } + +.fa-uniregistry:before { + content: "\f404"; } + +.fa-universal-access:before { + content: "\f29a"; } + +.fa-university:before { + content: "\f19c"; } + +.fa-unlink:before { + content: "\f127"; } + +.fa-unlock:before { + content: "\f09c"; } + +.fa-unlock-alt:before { + content: "\f13e"; } + +.fa-untappd:before { + content: "\f405"; } + +.fa-upload:before { + content: "\f093"; } + +.fa-usb:before { + content: "\f287"; } + +.fa-user:before { + content: "\f007"; } + +.fa-user-circle:before { + content: "\f2bd"; } + +.fa-user-md:before { + content: "\f0f0"; } + +.fa-user-plus:before { + content: "\f234"; } + +.fa-user-secret:before { + content: "\f21b"; } + +.fa-user-times:before { + content: "\f235"; } + +.fa-users:before { + content: "\f0c0"; } + +.fa-ussunnah:before { + content: "\f407"; } + +.fa-utensil-spoon:before { + content: "\f2e5"; } + +.fa-utensils:before { + content: "\f2e7"; } + +.fa-vaadin:before { + content: "\f408"; } + +.fa-venus:before { + content: "\f221"; } + +.fa-venus-double:before { + content: "\f226"; } + +.fa-venus-mars:before { + content: "\f228"; } + +.fa-viacoin:before { + content: "\f237"; } + +.fa-viadeo:before { + content: "\f2a9"; } + +.fa-viadeo-square:before { + content: "\f2aa"; } + +.fa-vial:before { + content: "\f492"; } + +.fa-vials:before { + content: "\f493"; } + +.fa-viber:before { + content: "\f409"; } + +.fa-video:before { + content: "\f03d"; } + +.fa-video-slash:before { + content: "\f4e2"; } + +.fa-vimeo:before { + content: "\f40a"; } + +.fa-vimeo-square:before { + content: "\f194"; } + +.fa-vimeo-v:before { + content: "\f27d"; } + +.fa-vine:before { + content: "\f1ca"; } + +.fa-vk:before { + content: "\f189"; } + +.fa-vnv:before { + content: "\f40b"; } + +.fa-volleyball-ball:before { + content: "\f45f"; } + +.fa-volume-down:before { + content: "\f027"; } + +.fa-volume-off:before { + content: "\f026"; } + +.fa-volume-up:before { + content: "\f028"; } + +.fa-vuejs:before { + content: "\f41f"; } + +.fa-warehouse:before { + content: "\f494"; } + +.fa-weibo:before { + content: "\f18a"; } + +.fa-weight:before { + content: "\f496"; } + +.fa-weixin:before { + content: "\f1d7"; } + +.fa-whatsapp:before { + content: "\f232"; } + +.fa-whatsapp-square:before { + content: "\f40c"; } + +.fa-wheelchair:before { + content: "\f193"; } + +.fa-whmcs:before { + content: "\f40d"; } + +.fa-wifi:before { + content: "\f1eb"; } + +.fa-wikipedia-w:before { + content: "\f266"; } + +.fa-window-close:before { + content: "\f410"; } + +.fa-window-maximize:before { + content: "\f2d0"; } + +.fa-window-minimize:before { + content: "\f2d1"; } + +.fa-window-restore:before { + content: "\f2d2"; } + +.fa-windows:before { + content: "\f17a"; } + +.fa-wine-glass:before { + content: "\f4e3"; } + +.fa-won-sign:before { + content: "\f159"; } + +.fa-wordpress:before { + content: "\f19a"; } + +.fa-wordpress-simple:before { + content: "\f411"; } + +.fa-wpbeginner:before { + content: "\f297"; } + +.fa-wpexplorer:before { + content: "\f2de"; } + +.fa-wpforms:before { + content: "\f298"; } + +.fa-wrench:before { + content: "\f0ad"; } + +.fa-x-ray:before { + content: "\f497"; } + +.fa-xbox:before { + content: "\f412"; } + +.fa-xing:before { + content: "\f168"; } + +.fa-xing-square:before { + content: "\f169"; } + +.fa-y-combinator:before { + content: "\f23b"; } + +.fa-yahoo:before { + content: "\f19e"; } + +.fa-yandex:before { + content: "\f413"; } + +.fa-yandex-international:before { + content: "\f414"; } + +.fa-yelp:before { + content: "\f1e9"; } + +.fa-yen-sign:before { + content: "\f157"; } + +.fa-yoast:before { + content: "\f2b1"; } + +.fa-youtube:before { + content: "\f167"; } + +.fa-youtube-square:before { + content: "\f431"; } + +.sr-only { + border: 0; + clip: rect(0, 0, 0, 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; } + +.sr-only-focusable:active, .sr-only-focusable:focus { + clip: auto; + height: auto; + margin: 0; + overflow: visible; + position: static; + width: auto; } diff --git a/docs/css/css/fontawesome.min.css b/docs/css/css/fontawesome.min.css new file mode 100644 index 0000000000000000000000000000000000000000..0db07bdb330142dc5d0f5bc8ee6376f955622293 --- /dev/null +++ b/docs/css/css/fontawesome.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.0.10 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:a 2s infinite linear}.fa-pulse{animation:a 1s infinite steps(8)}@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-aws:before{content:"\f375"}.fa-backward:before{content:"\f04a"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blind:before{content:"\f29d"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-btc:before{content:"\f15a"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-certificate:before{content:"\f0a3"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-square:before{content:"\f14a"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-credit-card:before{content:"\f09d"}.fa-crop:before{content:"\f125"}.fa-crosshairs:before{content:"\f05b"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-deviantart:before{content:"\f1bd"}.fa-diagnoses:before{content:"\f470"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drupal:before{content:"\f1a9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-excel:before{content:"\f1c3"}.fa-file-image:before{content:"\f1c5"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fire:before{content:"\f06d"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-firstdraft:before{content:"\f3a1"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frown:before{content:"\f119"}.fa-futbol:before{content:"\f1e3"}.fa-gamepad:before{content:"\f11b"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-gift:before{content:"\f06b"}.fa-git:before{content:"\f1d3"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-martini:before{content:"\f000"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hashtag:before{content:"\f292"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-heart:before{content:"\f004"}.fa-heartbeat:before{content:"\f21e"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-houzz:before{content:"\f27c"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-internet-explorer:before{content:"\f26b"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jenkins:before{content:"\f3b6"}.fa-joget:before{content:"\f3b7"}.fa-joomla:before{content:"\f1aa"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-key:before{content:"\f084"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-korvue:before{content:"\f42f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-male:before{content:"\f183"}.fa-map:before{content:"\f279"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-maxcdn:before{content:"\f136"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-meh:before{content:"\f11a"}.fa-mercury:before{content:"\f223"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-moon:before{content:"\f186"}.fa-motorcycle:before{content:"\f21c"}.fa-mouse-pointer:before{content:"\f245"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-paint-brush:before{content:"\f1fc"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-people-carry:before{content:"\f4ce"}.fa-percent:before{content:"\f295"}.fa-periscope:before{content:"\f3da"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phone:before{content:"\f095"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-plane:before{content:"\f072"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poo:before{content:"\f2fe"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-random:before{content:"\f074"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-rendact:before{content:"\f3e4"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-resolving:before{content:"\f3e7"}.fa-retweet:before{content:"\f079"}.fa-ribbon:before{content:"\f4d6"}.fa-road:before{content:"\f018"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-rupee-sign:before{content:"\f156"}.fa-safari:before{content:"\f267"}.fa-sass:before{content:"\f41e"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-scribd:before{content:"\f28a"}.fa-search:before{content:"\f002"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shower:before{content:"\f2cc"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smoking:before{content:"\f48d"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowflake:before{content:"\f2dc"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-spinner:before{content:"\f110"}.fa-spotify:before{content:"\f1bc"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-star:before{content:"\f005"}.fa-star-half:before{content:"\f089"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-strava:before{content:"\f428"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-trademark:before{content:"\f25c"}.fa-train:before{content:"\f238"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-moving:before{content:"\f4df"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-circle:before{content:"\f2bd"}.fa-user-md:before{content:"\f0f0"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vuejs:before{content:"\f41f"}.fa-warehouse:before{content:"\f494"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-glass:before{content:"\f4e3"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto} \ No newline at end of file diff --git a/docs/css/style.css b/docs/css/style.css new file mode 100644 index 0000000000000000000000000000000000000000..0417d01f792f79754f0de01ca089a259499fbef8 --- /dev/null +++ b/docs/css/style.css @@ -0,0 +1,1099 @@ +html, body { + padding: 0; + margin: 0; } + +body, .main { + box-sizing: border-box; + min-height: 100vh; } + +html { + font-size: 62.5%; + color: #474a54; + background: #232323; + height: 100vh; } + +@media (max-width: 700px) { + .sidebar, header > form { + display: none; } + + .sidebar h6 { + font-size: 1.4em; } + + .sidebar a { + padding: 10px 0; } + + body .main { + margin: 45px 0 0 0; } } +body { + font-size: 1.6rem; + line-height: 1.6; + font-weight: 400; + font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; + -webkit-font-smoothing: antialiased; + -webkit-tap-highlight-color: transparent; + background: #fcfcfc; } + body.nav-open { + overflow: hidden; } + body.nav-open .sidebar, + body.nav-open header > form { + display: block; } + body.nav-open header { + bottom: 0; } + +table { + border: 1px solid #E1E1E1; + margin: 0 0 20px 0; + border-collapse: collapse; } + +th, td { + border: 1px solid #ccc; + padding: 10px; + font-size: .9em; + text-align: left; } + +th { + background: #f7f7f7; } + +h1, h2, h3, h4, h5, h6 { + margin-top: 0; + font-weight: 300; } + +h1 { + font-size: 4.0rem; + line-height: 1.2; + letter-spacing: 0rem; } + +h2 { + font-size: 3.6rem; + line-height: 1.25; + letter-spacing: 0rem; } + +h3 { + font-size: 3.0rem; + line-height: 1.3; + letter-spacing: 0rem; + font-weight: 900; } + +h4 { + font-size: 2.4rem; + line-height: 1.35; + letter-spacing: 0rem; + margin: 0 0 5px 0; } + +h5 { + font-size: 1.8rem; + line-height: 1.5; + letter-spacing: 0rem; + margin-bottom: 4px; + font-weight: bold; + font-weight: 500; } + +p { + margin-top: 0; } + +h3 a { + text-decoration: none; + color: #474a54; } + +h3 a:hover { + text-decoration: none; + color: #474a54; } + +a { + color: #4BA2F2; + text-decoration: none; + transition: 0.3s all ease-in-out; } + +a:hover, a:focus { + color: #1A5099; + text-decoration: underline; } + +pre { + white-space: pre-wrap; + font-size: 1em; + margin: 22px 0; + word-wrap: break-word; } + +dl { + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; + padding: 0 0 20px 0; + margin: 0 0 20px 0; } + +dl dt { + width: 30%; + float: left; + font-weight: bold; + position: relative; + top: 20px; } + +dl dd { + margin-left: 30%; + padding-left: 15px; + margin-top: 20px; } + +dl dd + dd { + margin-top: 0; } + +dl dd:after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; } + +.sidebar h6 { + text-transform: uppercase; + line-height: 1em; + font-size: 1.5rem; + letter-spacing: 1px; + font-weight: 900; + color: #474a54; } + +.sidebar { + padding: 20px 20px 0 20px; + white-space: nowrap; + overflow-y: auto; } + .sidebar section { + padding: 10px 0; } + .sidebar ul { + padding: 0 0 0 10px; + margin: 0; + list-style: none; } + .sidebar h6 { + padding: 0; + margin: 0 0 5px 0; } + .sidebar a { + color: #364149; + text-decoration: none; + font-size: .90em; + display: block; + width: 100%; + text-overflow: ellipsis; + overflow: hidden; + padding: 2px 0; + transition: 0.3s color ease-in-out; } + .sidebar a.active { + color: #2196F3; + text-decoration: none; } + .sidebar a:hover, .sidebar a:focus { + color: #2196F3; } + +.endpoint { + font-size: 10px; + padding: 0 2px; + position: relative; } + +h3 .endpoint { + padding: 4px 6px; + font-size: 19px; } + +.endpoint.put { + color: #7E57C2; } + .endpoint.put:after { + content: "PUT"; } + +.endpoint.delete { + color: #FF7043; } + .endpoint.delete:after { + content: "DELETE"; } + +.endpoint.get { + color: #66BB6A; } + .endpoint.get:after { + content: "GET"; } + +.endpoint.post { + color: #42A5F5; } + .endpoint.post:after { + content: "POST"; } + +.main { + margin: 0 0 0 210px; + border-left: 1px solid #eee; } + .main h6 { + font-size: 1.01em; + padding: 0 0 6px 0; + margin: 0; } + .main .description { + color: #aaa; + margin-top: -11px; } + .main .overview { + color: #aaa; + background: #fefefe; } + @media (max-width: 700px) { + .main { + margin: 0; } } + +hr { + border: 0; + border-top: 1px solid #ddd; + margin: 20px 0; } + +.error, .warning, .info, .success { + border-left: 5px solid #FD0; + padding: 10px 15px; + margin-left: -20px; + margin-right: -15px; + background-color: #FAFAFA; + border-radius: 2px; } + +.info { + border-color: #56ADEC; } + +.error { + border-color: #F20; } + +.success { + border-color: #6c0; } + +.doc-content { + width: 100%; + border: 0; + -moz-border-image: -moz-linear-gradient(left, #eee 0%, #eee 50%, #333333 50%); + -webkit-border-image: -webkit-linear-gradient(left, #eee 0%, #eee 50%, #333333 50%); + border-image-slice: 1; + padding: 30px 0; + background: -webkit-linear-gradient(left, #ffffff 0%, #ffffff 50%, #27313E 50%); + /* Chrome10+,Safari5.1+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#232323',GradientType=1 ); + /* IE6-9 */ } + +.doc-content:after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; } + +.doc-content:last-child { + border: 0; } + +.left-docs { + width: 50%; + float: left; + padding: 0 50px; + -webkit-box-sizing: border-box; + /* Safari/Chrome, other WebKit */ + -moz-box-sizing: border-box; + /* Firefox, other Gecko */ + box-sizing: border-box; + /* Opera/IE 8+ */ } + .left-docs pre { + border: 0px; + box-shadow: 0 0 0 1px #eee; + border-radius: 3px; + padding: 10px; } + +.right-code { + width: 50%; + float: left; + padding: 0 50px; + -webkit-box-sizing: border-box; + /* Safari/Chrome, other WebKit */ + -moz-box-sizing: border-box; + /* Firefox, other Gecko */ + box-sizing: border-box; + /* Opera/IE 8+ */ } + .right-code code { + color: whitesmoke; } + .right-code pre { + background: white; + background: #3E4956; + padding: 10px; + border-radius: 5px; } + .right-code .code-viewer .languages li a:hover { + border-color: #555; } + .right-code p { + color: white; } + +.code-viewer .languages { + padding: 0; + margin: 0 0 5px 0; + list-style: none; + font-size: .9em; } + .code-viewer .languages li { + display: inline-block; } + .code-viewer .languages li a { + display: block; + padding: 5px 10px; + z-index: 100; + border: 1px solid transparent; } + .code-viewer .languages li a:hover { + border-color: #eee; + border-radius: 5px; } + .code-viewer .languages li a.active:hover { + border-color: transparent; } +.code-viewer a { + text-decoration: none; + color: #aaa; } + .code-viewer a:hover { + color: #222; } +.code-viewer pre { + margin: 0 0 20px 0; } + +.code-viewer a.active, .code-viewer a.active:hover, .right-code .code-viewer a.active:hover { + color: #4BA2EE; } + +.right-code .code-viewer a:hover { + color: #fff; } + +@media (max-width: 700px) { + .main { + border-left: none; } } +@media (max-width: 1000px) { + .right-code { + float: none; + width: 100%; + background: white; + background: #232323; + padding: 30px 30px 10px; } + + .left-docs { + float: none; + width: 100%; + padding: 0 24px; } + + .doc-content { + background: #fff; + padding-bottom: 0; + border-image: none; + -moz-border-image: none; + -webkit-border-image: none; + border-color: #eee; } } +header { + max-height: 100vh; + position: fixed; + top: 0; + left: 0; + right: 0; + overflow-x: hidden; + z-index: 1; + background-color: #f5f5f5; + border-top: 4px solid #2196F3; } + header h1 { + height: 107px; + box-sizing: border-box; + background-color: #3E4956; + margin: 0; + font-size: 1.7rem; + line-height: 0.8; + letter-spacing: 0; + font-weight: 600; + text-indent: 0; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + align-items: center; + border-bottom: 1px solid rgba(0, 0, 0, 0.075); } + header h1 img { + height: 36px; + margin: 0 18px; } + header .open-nav { + background-image: url(/images/menu.svg); + background-color: transparent; + background-repeat: no-repeat; + background-size: 50%; + background-position: center; + padding-right: 0px; + border: 0; + border-radius: 2px; + cursor: pointer; + height: 60px; + width: 60px; } + header .open-nav:focus { + outline: none; + background-color: rgba(0, 0, 0, 0.05); } + header .open-nav:hover { + background-color: rgba(0, 0, 0, 0.1); } + @media (min-width: 700px) { + header { + background-color: transparent; + width: 210px; + right: auto; + bottom: auto; } + header .open-nav { + display: none; } + header h1 { + box-shadow: inset -10px 0 10px -10px rgba(0, 0, 0, 0.1); } } + +#search-input { + -webkit-appearance: none; + display: block; + margin: 0; + padding: 10px 20px; + width: 100%; + box-sizing: border-box; + border: 0; + border-bottom: 1px solid rgba(0, 0, 0, 0.075); + font-size: 1.5rem; + font-weight: 600; + line-height: 1.8; } + #search-input:focus { + outline: none; + border-left: 5px solid #4BA2F2; + padding-left: 15px; } + +.search-page { + max-width: 800px; + margin: 0 0 0 50px; + padding: 50px 20px 0 20px; } + +#search-results { + margin: 0; + padding: 0; } + #search-results li { + list-style: none; + margin: 0; + padding: 0; } + #search-results li h4 { + font-size: 2rem; } + #search-results li p { + line-height: 1.5; } + +.copyright { + text-align: center; + font-size: .6em; + margin: 30px 0 0 0; } + +.logo-link { + color: #ffffff; + font-weight: 600; + font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; + pointer-events: none; + cursor: default; } + +.glossary dt { + top: 0px; } + +blockquote { + background: #EEEEEE; + padding: 5px; } + +code .hll { + background-color: #ffffcc; } + +code .c { + color: #aaaaaa; + font-style: italic; } + +/* Comment */ +code .err { + color: #F00000; + background-color: #F0A0A0; } + +/* Error */ +code .k { + color: #0000aa; } + +/* Keyword */ +code .cm { + color: #aaaaaa; + font-style: italic; } + +/* Comment.Multiline */ +code .cp { + color: #4c8317; } + +/* Comment.Preproc */ +code .c1 { + color: #aaaaaa; + font-style: italic; } + +/* Comment.Single */ +code .cs { + color: #0000aa; + font-style: italic; } + +/* Comment.Special */ +code .gd { + color: #aa0000; } + +/* Generic.Deleted */ +code .ge { + font-style: italic; } + +/* Generic.Emph */ +code .gr { + color: #aa0000; } + +/* Generic.Error */ +code .gh { + color: #000080; + font-weight: bold; } + +/* Generic.Heading */ +code .gi { + color: #00aa00; } + +/* Generic.Inserted */ +code .go { + color: #888888; } + +/* Generic.Output */ +code .gp { + color: #555555; } + +/* Generic.Prompt */ +code .gs { + font-weight: bold; } + +/* Generic.Strong */ +code .gu { + color: #800080; + font-weight: bold; } + +/* Generic.Subheading */ +code .gt { + color: #aa0000; } + +/* Generic.Traceback */ +code .kc { + color: #0000aa; } + +/* Keyword.Constant */ +code .kd { + color: #0000aa; } + +/* Keyword.Declaration */ +code .kn { + color: #0000aa; } + +/* Keyword.Namespace */ +code .kp { + color: #0000aa; } + +/* Keyword.Pseudo */ +code .kr { + color: #0000aa; } + +/* Keyword.Reserved */ +code .kt { + color: #00aaaa; } + +/* Keyword.Type */ +code .m { + color: #009999; } + +/* Literal.Number */ +code .s { + color: #aa5500; } + +/* Literal.String */ +code .na { + color: #1e90ff; } + +/* Name.Attribute */ +code .nb { + color: #00aaaa; } + +/* Name.Builtin */ +code .nc { + color: #00aa00; + text-decoration: underline; } + +/* Name.Class */ +code .no { + color: #aa0000; } + +/* Name.Constant */ +code .nd { + color: #888888; } + +/* Name.Decorator */ +code .ni { + color: #800000; + font-weight: bold; } + +/* Name.Entity */ +code .nf { + color: #00aa00; } + +/* Name.Function */ +code .nn { + color: #00aaaa; + text-decoration: underline; } + +/* Name.Namespace */ +code .nt { + color: #1e90ff; + font-weight: bold; } + +/* Name.Tag */ +code .nv { + color: #aa0000; } + +/* Name.Variable */ +code .ow { + color: #0000aa; } + +/* Operator.Word */ +code .w { + color: #bbbbbb; } + +/* Text.Whitespace */ +code .mf { + color: #009999; } + +/* Literal.Number.Float */ +code .mh { + color: #009999; } + +/* Literal.Number.Hex */ +code .mi { + color: #009999; } + +/* Literal.Number.Integer */ +code .mo { + color: #009999; } + +/* Literal.Number.Oct */ +code .sb { + color: #aa5500; } + +/* Literal.String.Backtick */ +code .sc { + color: #aa5500; } + +/* Literal.String.Char */ +code .sd { + color: #aa5500; } + +/* Literal.String.Doc */ +code .s2 { + color: #aa5500; } + +/* Literal.String.Double */ +code .se { + color: #aa5500; } + +/* Literal.String.Escape */ +code .sh { + color: #aa5500; } + +/* Literal.String.Heredoc */ +code .si { + color: #aa5500; } + +/* Literal.String.Interpol */ +code .sx { + color: #aa5500; } + +/* Literal.String.Other */ +code .sr { + color: #009999; } + +/* Literal.String.Regex */ +code .s1 { + color: #aa5500; } + +/* Literal.String.Single */ +code .ss { + color: #0000aa; } + +/* Literal.String.Symbol */ +code .bp { + color: #00aaaa; } + +/* Name.Builtin.Pseudo */ +code .vc { + color: #aa0000; } + +/* Name.Variable.Class */ +code .vg { + color: #aa0000; } + +/* Name.Variable.Global */ +code .vi { + color: #aa0000; } + +/* Name.Variable.Instance */ +code .il { + color: #009999; } + +/* Literal.Number.Integer.Long */ +.right-code code .hll { + background-color: #49483e; } + +.right-code code .c { + color: #75715e; } + +/* Comment */ +.right-code code .err { + color: #960050; + background-color: #1e0010; } + +/* Error */ +.right-code code .k { + color: #66d9ef; } + +/* Keyword */ +.right-code code .l { + color: #ae81ff; } + +/* Literal */ +.right-code code .n { + color: #f8f8f2; } + +/* Name */ +.right-code code .o { + color: #f92672; } + +/* Operator */ +.right-code code .p { + color: #f8f8f2; } + +/* Punctuation */ +.right-code code .cm { + color: #75715e; } + +/* Comment.Multiline */ +.right-code code .cp { + color: #75715e; } + +/* Comment.Preproc */ +.right-code code .c1 { + color: #75715e; } + +/* Comment.Single */ +.right-code code .cs { + color: #75715e; } + +/* Comment.Special */ +.right-code code .ge { + font-style: italic; } + +/* Generic.Emph */ +.right-code code .gs { + font-weight: bold; } + +/* Generic.Strong */ +.right-code code .kc { + color: #66d9ef; } + +/* Keyword.Constant */ +.right-code code .kd { + color: #66d9ef; } + +/* Keyword.Declaration */ +.right-code code .kn { + color: #f92672; } + +/* Keyword.Namespace */ +.right-code code .kp { + color: #66d9ef; } + +/* Keyword.Pseudo */ +.right-code code .kr { + color: #66d9ef; } + +/* Keyword.Reserved */ +.right-code code .kt { + color: #66d9ef; } + +/* Keyword.Type */ +.right-code code .ld { + color: #e6db74; } + +/* Literal.Date */ +.right-code code .m { + color: #ae81ff; } + +/* Literal.Number */ +.right-code code .s { + color: #e6db74; } + +/* Literal.String */ +.right-code code .na { + color: #a6e22e; } + +/* Name.Attribute */ +.right-code code .nb { + color: #f8f8f2; } + +/* Name.Builtin */ +.right-code code .nc { + color: #a6e22e; } + +/* Name.Class */ +.right-code code .no { + color: #66d9ef; } + +/* Name.Constant */ +.right-code code .nd { + color: #a6e22e; } + +/* Name.Decorator */ +.right-code code .ni { + color: #f8f8f2; } + +/* Name.Entity */ +.right-code code .ne { + color: #a6e22e; } + +/* Name.Exception */ +.right-code code .nf { + color: #a6e22e; } + +/* Name.Function */ +.right-code code .nl { + color: #f8f8f2; } + +/* Name.Label */ +.right-code code .nn { + color: #f8f8f2; } + +/* Name.Namespace */ +.right-code code .nx { + color: #a6e22e; } + +/* Name.Other */ +.right-code code .py { + color: #f8f8f2; } + +/* Name.Property */ +.right-code code .nt { + color: #f92672; } + +/* Name.Tag */ +.right-code code .nv { + color: #f8f8f2; } + +/* Name.Variable */ +.right-code code .ow { + color: #f92672; } + +/* Operator.Word */ +.right-code code .w { + color: #f8f8f2; } + +/* Text.Whitespace */ +.right-code code .mf { + color: #ae81ff; } + +/* Literal.Number.Float */ +.right-code code .mh { + color: #ae81ff; } + +/* Literal.Number.Hex */ +.right-code code .mi { + color: #ae81ff; } + +/* Literal.Number.Integer */ +.right-code code .mo { + color: #ae81ff; } + +/* Literal.Number.Oct */ +.right-code code .sb { + color: #e6db74; } + +/* Literal.String.Backtick */ +.right-code code .sc { + color: #e6db74; } + +/* Literal.String.Char */ +.right-code code .sd { + color: #e6db74; } + +/* Literal.String.Doc */ +.right-code code .s2 { + color: #e6db74; } + +/* Literal.String.Double */ +.right-code code .se { + color: #ae81ff; } + +/* Literal.String.Escape */ +.right-code code .sh { + color: #e6db74; } + +/* Literal.String.Heredoc */ +.right-code code .si { + color: #e6db74; } + +/* Literal.String.Interpol */ +.right-code code .sx { + color: #e6db74; } + +/* Literal.String.Other */ +.right-code code .sr { + color: #e6db74; } + +/* Literal.String.Regex */ +.right-code code .s1 { + color: #e6db74; } + +/* Literal.String.Single */ +.right-code code .ss { + color: #e6db74; } + +/* Literal.String.Symbol */ +.right-code code .bp { + color: #f8f8f2; } + +/* Name.Builtin.Pseudo */ +.right-code code .vc { + color: #f8f8f2; } + +/* Name.Variable.Class */ +.right-code code .vg { + color: #f8f8f2; } + +/* Name.Variable.Global */ +.right-code code .vi { + color: #f8f8f2; } + +/* Name.Variable.Instance */ +.right-code code .il { + color: #ae81ff; } + +/* Literal.Number.Integer.Long */ +/* Generic Heading & Diff Header */ +.right-code code .gu { + color: #75715e; } + +/* Generic.Subheading & Diff Unified/Comment? */ +.right-code code .gd { + color: #f92672; } + +/* Generic.Deleted & Diff Deleted */ +.right-code code .gi { + color: #a6e22e; } + +/* Generic.Inserted & Diff Inserted */ +.highlight { + padding: 5px; + background: #23323E; } + +pre { + color: white; } + +.row { + position: relative; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; } + +.right-code { + margin-top: 110px; } + +.left-docs { + border-top: 1px solid #eeeeee; } + .left-docs h3:first-child { + padding-top: 40px; } + +.left-docs img { + max-width: 100%; } + +section.doc-content.introductionwelcome > .left-docs { + border-top: none !important; } + +.main:focus, .doc-content:focus { + outline: none; } + +/*.hero { + text-align: left; + padding: 0 50px; + height: 110px; + border-bottom: 1px solid #eee; + position: relative; + display: flex; + align-items: center; + justify-content: space-between; + &__img { + + } + &__h1 { + margin-bottom: 0; + } +}*/ +header h1 { + height: 60px; } + +.hero { + padding: 50px 24px 40px; + border-bottom: 1px solid #eee; } + .hero__img { + display: block; + max-width: 100%; } + .hero__h1 { + font-size: 2em; } + +@media (min-width: 700px) { + .hero { + padding: 0px 50px; + height: 63px; + display: flex; + align-items: center; } + .hero__img { + display: none; } + .hero__h1 { + margin-bottom: 0; } } +@media (min-width: 1000px) { + .hero { + text-align: left; + padding: 0 50px; + height: 111px; + position: relative; + justify-content: space-between; } + .hero__img { + display: block; + max-width: 100%; } + + header h1 { + height: 107px; } } +.footer { + background-color: #3E4956; + border-top: 1px solid #eeeeee; + display: flex; + justify-content: center; + padding: 10px; } + .footer a:hover, + .footer a:visited { + color: #4BA2F2; } + +.main-nav-section .title { + cursor: pointer; + width: 100%; + text-align: left; + border: none; + outline: none; + transition: 0.4s; } +.main-nav-section.show-content .content { + display: block; } +.main-nav-section .content { + display: none; + overflow: hidden; } + +.active, .accordion:hover { + /*background-color: #ccc;*/ } + +.top-of-tutorial-repo-link { + text-transform: lowercase; } + .top-of-tutorial-repo-link .first-word { + text-transform: capitalize; } + +.warn.deprecated { + background: #FD0; + font-weight: bold; + font-size: small; + display: inline-block; + margin-left: 5px; + padding: 5px; + position: relative; + top: -3px; } + +.danger { + background: #dc3545; + color: #fff; + font-weight: bold; + padding: 5px; } + +.danger.removed { + font-size: small; + display: inline-block; + margin-left: 5px; + position: relative; + top: -3px; } diff --git a/docs/css/webfonts/fa-brands-400.eot b/docs/css/webfonts/fa-brands-400.eot new file mode 100644 index 0000000000000000000000000000000000000000..9d49a59a67978299f3b162e805bdeaf7f9c8a627 Binary files /dev/null and b/docs/css/webfonts/fa-brands-400.eot differ diff --git a/docs/css/webfonts/fa-brands-400.svg b/docs/css/webfonts/fa-brands-400.svg new file mode 100644 index 0000000000000000000000000000000000000000..bf573a1af139103b1d86baa6ee62e628438ae212 --- /dev/null +++ b/docs/css/webfonts/fa-brands-400.svg @@ -0,0 +1,1017 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/css/webfonts/fa-brands-400.ttf b/docs/css/webfonts/fa-brands-400.ttf new file mode 100644 index 0000000000000000000000000000000000000000..374f8ee9146f6d40e34e273cb62f5bc25578cbec Binary files /dev/null and b/docs/css/webfonts/fa-brands-400.ttf differ diff --git a/docs/css/webfonts/fa-brands-400.woff b/docs/css/webfonts/fa-brands-400.woff new file mode 100644 index 0000000000000000000000000000000000000000..c7d31eb1e8136e41f5872f77909f932a77d337f6 Binary files /dev/null and b/docs/css/webfonts/fa-brands-400.woff differ diff --git a/docs/css/webfonts/fa-brands-400.woff2 b/docs/css/webfonts/fa-brands-400.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..1ced125fe9e548eadd31788120aa2d4e09942813 Binary files /dev/null and b/docs/css/webfonts/fa-brands-400.woff2 differ diff --git a/docs/css/webfonts/fa-regular-400.eot b/docs/css/webfonts/fa-regular-400.eot new file mode 100644 index 0000000000000000000000000000000000000000..3ba8c46bf13e1767c93e9f8ff807aadfbe20e2f1 Binary files /dev/null and b/docs/css/webfonts/fa-regular-400.eot differ diff --git a/docs/css/webfonts/fa-regular-400.svg b/docs/css/webfonts/fa-regular-400.svg new file mode 100644 index 0000000000000000000000000000000000000000..74db206ca881b5569be1975933cc6c9f5141ffa8 --- /dev/null +++ b/docs/css/webfonts/fa-regular-400.svg @@ -0,0 +1,366 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/css/webfonts/fa-regular-400.ttf b/docs/css/webfonts/fa-regular-400.ttf new file mode 100644 index 0000000000000000000000000000000000000000..7412d88352a946a464b329e8ea0677e6b3b840d1 Binary files /dev/null and b/docs/css/webfonts/fa-regular-400.ttf differ diff --git a/docs/css/webfonts/fa-regular-400.woff b/docs/css/webfonts/fa-regular-400.woff new file mode 100644 index 0000000000000000000000000000000000000000..797a15cbfb9878496b3c4dd8f80c21083825d9f0 Binary files /dev/null and b/docs/css/webfonts/fa-regular-400.woff differ diff --git a/docs/css/webfonts/fa-regular-400.woff2 b/docs/css/webfonts/fa-regular-400.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b75da04b548ece53a99f94fabe7c02c539e0169c Binary files /dev/null and b/docs/css/webfonts/fa-regular-400.woff2 differ diff --git a/docs/css/webfonts/fa-solid-900.eot b/docs/css/webfonts/fa-solid-900.eot new file mode 100644 index 0000000000000000000000000000000000000000..3c5350af8e72aced6e6409e184bb46420efc39c5 Binary files /dev/null and b/docs/css/webfonts/fa-solid-900.eot differ diff --git a/docs/css/webfonts/fa-solid-900.svg b/docs/css/webfonts/fa-solid-900.svg new file mode 100644 index 0000000000000000000000000000000000000000..3e9cbaea9dcc4ebabf8d5d35c9203de06c98e67f --- /dev/null +++ b/docs/css/webfonts/fa-solid-900.svg @@ -0,0 +1,1644 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/css/webfonts/fa-solid-900.ttf b/docs/css/webfonts/fa-solid-900.ttf new file mode 100644 index 0000000000000000000000000000000000000000..9f268151e6f282e84ddc4fb35f879dbf34e1a60d Binary files /dev/null and b/docs/css/webfonts/fa-solid-900.ttf differ diff --git a/docs/css/webfonts/fa-solid-900.woff b/docs/css/webfonts/fa-solid-900.woff new file mode 100644 index 0000000000000000000000000000000000000000..66d6e9e428706f82279e0cca7215d667c2b74afe Binary files /dev/null and b/docs/css/webfonts/fa-solid-900.woff differ diff --git a/docs/css/webfonts/fa-solid-900.woff2 b/docs/css/webfonts/fa-solid-900.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..84cadecde7c63f41cf3bea37d4556829cc2117ab Binary files /dev/null and b/docs/css/webfonts/fa-solid-900.woff2 differ diff --git a/docs/favicon.png b/docs/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..d7a866ad4fdbe3891514924731327d3a88cdb337 Binary files /dev/null and b/docs/favicon.png differ diff --git a/docs/glossary/api.html b/docs/glossary/api.html new file mode 100644 index 0000000000000000000000000000000000000000..e1818b81b01f8cacadb09dca42483fdb195f1256 --- /dev/null +++ b/docs/glossary/api.html @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + +API | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ + +
+ + + + + + + + diff --git a/docs/glossary/chain_basics.html b/docs/glossary/chain_basics.html new file mode 100644 index 0000000000000000000000000000000000000000..da3fa117dfab9f9a83bdb2c0f7675b192105bc5d --- /dev/null +++ b/docs/glossary/chain_basics.html @@ -0,0 +1,341 @@ + + + + + + + + + + + + + + + + + + +Chain Basics | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ + + + + + + + + + + + + +
TermDefinition
BlockchainDecentralized ledger and consensus protocol
SteemName of the blockchain and platform
+ +
+ + + + + + + + diff --git a/docs/glossary/governance.html b/docs/glossary/governance.html new file mode 100644 index 0000000000000000000000000000000000000000..b308deb877c9f6c3c7a5c1776408cb832ca94235 --- /dev/null +++ b/docs/glossary/governance.html @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + +Governance | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ + +
+ + + + + + + + diff --git a/docs/glossary/index.html b/docs/glossary/index.html new file mode 100644 index 0000000000000000000000000000000000000000..e854f4b2d48e2261d81b8a7a69f6a1aa039ee0a1 --- /dev/null +++ b/docs/glossary/index.html @@ -0,0 +1,659 @@ + + + + + + + + + + + + + + + + + + +Index | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal - Glossary

+ + + +
+
+
+
+ +

Chain Basics

+ +
+
Blockchain
+
Decentralized ledger and consensus protocol
+
+ +
+
Steem
+
Name of the blockchain and platform
+
+ +
+
Bandwidth
+
formerly the limit of data each account can send/use (replaced by Resource Credits)
+
+ +
+
Resource Credits
+
is the limit of data each account can utilize resources on the blockchain (also known as RC)
+
+ +
+
VESTS
+
Vests is underlying token that STEEM is derived from, and are share in Steem Power
+
+ +
+
STEEM
+
Currency of the blockchain, liquid version of Steem Power
+
+ +
+
SBD
+
Steem Backed Dollar, $1 worth of STEEM
+
+ +
+
Steem Power
+
Locked version of STEEM which gives account influence on the platform
+
+ +
+
Transaction
+
Operations/Activity/Write requests to the blockchain
+
+ +
+
Block
+
Bundle of transactions to be included in blockchain
+
+ +
+
Block Header
+
Information about block, root and witness who signed, etc.
+
+ +
+
Price feed
+
Feed that is maintained by witnesses to ensure SBD/STEEM price stability
+
+ +
+
Account
+
User account on Steem blockchain
+
+ +
+
Authority
+
Each Account has multiple authority and keys to manager different permissions on the platform
+
+ +
+
Owner
+
Owner authority/permission of account
+
+ +
+
Public Key
+
Public key of account's certain authority
+
+ +
+
Private Key
+
Private key to sign a transaction with account's authority, should be kept secret because it grants access to account
+
+ +
+
Wif
+
Wallet Import Format/Private key, should be kept secret because it grants access to account
+
+ +
+
Active key
+
The active key is used to make transfers and place orders in the internal market
+
+ +
+
Posting key
+
The posting key is used for posting and voting
+
+ +
+
Owner key
+
The owner key is the master key for the account and is required to change the other keys
+
+ +
+
Vote
+
Voting a content
+
+ +
+
Reputation
+
Account's reputation on platform
+
+ +
+
Markdown language
+
Easy to read and write, plain text format language commonly used to create Steemit articles
+
+ + + +
+
Mainnet
+
The 'production' Steem blockchain network wherein real STEEM is held and actual transactions take place.
+
+ +
+
Delegation
+
The assignment of a portion your Steem Power for use to another account (cannot be spent, can be reclaimed)
+
+ +
+
PowerUp
+
Convert STEEM to Steem Power and vice-versa with PowerDown
+
+ +
+ +

Governance

+ +
+
DPOS
+
Delegated Proof of Stake
+
+ +
+
Node
+
Servers running blockchain software
+
+ +
+
Witness
+
Witness is a position/role for the people who are chosen by community (delegate trust) to support platform and run consensus protocol to ensure security and validity of transactions/blocks on the blockchain
+
+ +
+
Hardfork
+
Process to release protocol/blockchain consensus upgrades
+
+ +
+
Softfork
+
Process to release protocol/blockchain software improvements
+
+ +
+
Witness Vote
+
Voting/electing witnesses with account's stake
+
+ +
+ +

Transactions

+ +
+
Transaction
+
Operations submitted to the blockchain
+
+ +
+
Pending Transaction
+
Transaction that is pending and to be included to the blockchain
+
+ +
+
Transaction Hex
+
Hash of the transaction
+
+ +
+
Signatures
+
Transaction signature signed by account with private key
+
+ +
+
Broadcast Transaction
+
Event where signed transaction is broadcasted to the network, so that witnesses could validate and include in block
+
+ +
+
Virtual operation
+
Operations that are derived from blockchain activity, but aren't actually stored as operations themselves (ex. curation and author rewards). They happen based on consensus from the blockchain based on other normal operations
+
+ +
+ +

API

+ + + +
+
Hot
+
Posts/Disccussions that are highly valued with shorter time interval update
+
+ +
+
Feed
+
Posts/Disccussions from followers of particular account
+
+ +
+
Active
+
Posts/Disscussions that are still actively being engaged
+
+ +
+
New
+
Newly created posts
+
+ +
+
Cashout
+
Posts which was paid out recently
+
+ + + +
+
Pending Payout
+
Estimated pending payout for blog posts/comments
+
+ +
+
Tags
+
Tags, categories, hashtags each post is assigned to.
+
+ + + +
+
Following
+
Account that is being followed
+
+ +
+
Follower
+
Account that is following the user
+
+ +
+
State
+
State of blockchain for path - accounts/tags/filters/posts
+
+ +
+
Dynamic Global Properties
+
Current blockchain global properties which is being in each block
+
+ +
+
Median Price
+
Median Price feed provided by all witnesses
+
+ +
+
Curator
+
A steem user who upvotes a post by using their daily voting power to assign value to a post that they believe has good quality content and should be seen and the author rewarded
+
+ +
+
Curation reward
+
The reward given to a curator, which is their portion of the 50% allocated to all curators that have upvoted a post
+
+ +
+
Resteem
+
(Reblog) re-posting another authors' post in your blog feed for your followers list
+
+ +
+ +

Market

+ +
+
Conversion Requests
+
Request submitted for Converting SBD to STEEM
+
+ +
+
Order Book
+
Internal market order book to exchange SBD<->STEEM
+
+ +
+
SMT
+
Smart Media Tokens
+
+ +
+ +
+
+
+ +
+ + + + + + + + diff --git a/docs/glossary/market.html b/docs/glossary/market.html new file mode 100644 index 0000000000000000000000000000000000000000..c5f6a0eff16cf79485281008ad276dba712ad06f --- /dev/null +++ b/docs/glossary/market.html @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + +Market | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ + +
+ + + + + + + + diff --git a/docs/glossary/transactions.html b/docs/glossary/transactions.html new file mode 100644 index 0000000000000000000000000000000000000000..ba28268707780d2b83ca73c8c55046daebdbe226 --- /dev/null +++ b/docs/glossary/transactions.html @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + +Transactions | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ + +
+ + + + + + + + diff --git a/docs/images/emblem.svg b/docs/images/emblem.svg new file mode 100644 index 0000000000000000000000000000000000000000..4b5903b91b5e160b2737139181f2d371e549a2a1 --- /dev/null +++ b/docs/images/emblem.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/docs/images/hero.png b/docs/images/hero.png new file mode 100644 index 0000000000000000000000000000000000000000..7557cefeab258a2d3564bbee8c648b3fc6bc41e7 Binary files /dev/null and b/docs/images/hero.png differ diff --git a/docs/images/logo.svg b/docs/images/logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..18a98e278062db80b1c54e3e7f7172bf4b3c2eb8 --- /dev/null +++ b/docs/images/logo.svg @@ -0,0 +1,9 @@ + + + + + diff --git a/docs/images/logo_white.svg b/docs/images/logo_white.svg new file mode 100644 index 0000000000000000000000000000000000000000..3cdde1100eba777ba46a2cbe976bae103b82713a --- /dev/null +++ b/docs/images/logo_white.svg @@ -0,0 +1,12 @@ + + + Layer 1 + + + + + \ No newline at end of file diff --git a/docs/images/logotype_white.svg b/docs/images/logotype_white.svg new file mode 100644 index 0000000000000000000000000000000000000000..656c992035b42e1dd9ba7439708a9a61acfe40f9 --- /dev/null +++ b/docs/images/logotype_white.svg @@ -0,0 +1,17 @@ + + + + steem-icon-typo copy + Created with Sketch. + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/images/look.svg b/docs/images/look.svg new file mode 100644 index 0000000000000000000000000000000000000000..3f937433c76ec1e1358975df638a66d505828422 --- /dev/null +++ b/docs/images/look.svg @@ -0,0 +1,23 @@ + + + + + + + + + + diff --git a/docs/images/menu.svg b/docs/images/menu.svg new file mode 100644 index 0000000000000000000000000000000000000000..f468dc479f256d1284d3c47efc9d558a79174b00 --- /dev/null +++ b/docs/images/menu.svg @@ -0,0 +1,4 @@ + + + + diff --git a/docs/images/npm-logo.svg b/docs/images/npm-logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..13c790014e11a966fb5fe7155010f22422d34d7b --- /dev/null +++ b/docs/images/npm-logo.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/images/services-jussi/kitematic-example.png b/docs/images/services-jussi/kitematic-example.png new file mode 100644 index 0000000000000000000000000000000000000000..31f2381ef92d521075aeb37a92ac68158c89c5a3 Binary files /dev/null and b/docs/images/services-jussi/kitematic-example.png differ diff --git a/docs/images/steemdev.png b/docs/images/steemdev.png new file mode 100644 index 0000000000000000000000000000000000000000..6515bb5dcdec77da10d0c698e115dbcb6853bae1 Binary files /dev/null and b/docs/images/steemdev.png differ diff --git a/docs/images/tutorials-recipes/jussi-multiplexer/network-diagram.png b/docs/images/tutorials-recipes/jussi-multiplexer/network-diagram.png new file mode 100644 index 0000000000000000000000000000000000000000..a847899dd7b0cafcd0bfda976d14990255326ad6 Binary files /dev/null and b/docs/images/tutorials-recipes/jussi-multiplexer/network-diagram.png differ diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000000000000000000000000000000000000..b67ca6f294a988da2eab232e27c102e9d85aaced --- /dev/null +++ b/docs/index.html @@ -0,0 +1,395 @@ + + + + + + + + + + + + + + + + + + +API Docs | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+ + + + + + + + +
+
+

+ + Welcome to Steem + + +

+ + +

Welcome to the Steem Developer Portal!

+ +

This site is designed to aid those interested in developing applications on the Steem blockchain.

+ +

If you don’t know about Steem yet, visit steem.com.

+ +

The code for this site is on github. If you’d like to see a specific improvement +you can either submit a pull request or file an issue. Please follow our +contribution guidelines

+ +

Site Resources

+ +

The quickstart section has some general information on working with nodes, and testnets.

+ +

Our tutorials section will take you through the basics of interacting with Steem apis in Javascript, Python, and Ruby.

+ +

More detailed API specs are available in the APPBASE API section. Those apis are under development, so please read +notes at the top of each section.

+ +

You can find community resources, libraries, and more ‘human’ ways to get help and education in the communities section.

+ +

The glossary has Steem specific terms that will help you understand documentation, whitepapers, and the speech of other steemians.

+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + diff --git a/docs/introduction/welcome.html b/docs/introduction/welcome.html new file mode 100644 index 0000000000000000000000000000000000000000..def478a3c9942be3abc8644b5cfd49a3be9953ec --- /dev/null +++ b/docs/introduction/welcome.html @@ -0,0 +1,350 @@ + + + + + + + + + + + + + + + + + + +Welcome to Steem | Steem Developer + + + + + + + + + + + + + + + +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + + + + + + + + + +
+
+
+

Steem Developer Portal

+ + + +
+

Welcome to the Steem Developer Portal!

+ +

This site is designed to aid those interested in developing applications on the Steem blockchain.

+ +

If you don’t know about Steem yet, visit steem.com.

+ +

The code for this site is on github. If you’d like to see a specific improvement +you can either submit a pull request or file an issue. Please follow our +contribution guidelines

+ +

Site Resources

+ +

The quickstart section has some general information on working with nodes, and testnets.

+ +

Our tutorials section will take you through the basics of interacting with Steem apis in Javascript, Python, and Ruby.

+ +

More detailed API specs are available in the APPBASE API section. Those apis are under development, so please read +notes at the top of each section.

+ +

You can find community resources, libraries, and more ‘human’ ways to get help and education in the communities section.

+ +

The glossary has Steem specific terms that will help you understand documentation, whitepapers, and the speech of other steemians.

+ + +
+ + + + + + + + diff --git a/docs/js/adjust.js b/docs/js/adjust.js new file mode 100644 index 0000000000000000000000000000000000000000..7cdb3b798ed61a77fd69190e4b31dfc5a425a769 --- /dev/null +++ b/docs/js/adjust.js @@ -0,0 +1,35 @@ + +function DynamicAlign() { + var $window = $(window); + var windowsize = $window.width(); + if (windowsize > 1000) { + $('section.right-code > p.static-right-section-title').each(function () { + // compute right side + var $text = $(this)[0].innerHTML.replace(/\./g, '').replace(/\s+/g, '-').toLowerCase(); + var $section_id_name = $(this).parent().parent()[0].id; + var $right_position = $(this).position().top - $(this).parent().parent().offset().top; + // compute left side & match difference + var $left_item = $("#" + $section_id_name + " .left-docs" + " h3#" + $text); + if ($left_item) { + var $left_parent = $left_item.parent().parent().offset().top; + var $left_height = $left_item.position().top; + var $left_position = $left_height - $left_parent; + var $difference = $left_position - $right_position; + if ($difference<0) { + $left_item.css('margin-top', Math.abs($difference)); + } else { + $(this).css('margin-top', $difference); + } + + } + }); + } +}; + +window.onload = DynamicAlign; +window.onresize = DynamicAlign; + + + + + diff --git a/docs/js/lunr.min.js b/docs/js/lunr.min.js new file mode 100644 index 0000000000000000000000000000000000000000..4fd086e7c3d9f091c1827840c626f2de34adeb00 --- /dev/null +++ b/docs/js/lunr.min.js @@ -0,0 +1,6 @@ +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.7.1 + * Copyright (C) 2016 Oliver Nightingale + * @license MIT + */ +!function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.7.1",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.utils.asString=function(t){return void 0===t||null===t?"":t.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(e){return arguments.length&&null!=e&&void 0!=e?Array.isArray(e)?e.map(function(e){return t.utils.asString(e).toLowerCase()}):e.toString().trim().toLowerCase().split(t.tokenizer.seperator):[]},t.tokenizer.seperator=/[\s\-]+/,t.tokenizer.load=function(t){var e=this.registeredFunctions[t];if(!e)throw new Error("Cannot load un-registered function: "+t);return e},t.tokenizer.label="default",t.tokenizer.registeredFunctions={"default":t.tokenizer},t.tokenizer.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing tokenizer: "+n),e.label=n,this.registeredFunctions[n]=e},t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.registeredFunctions[e];if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,i=this._stack.length,r=0;n>r;r++){for(var o=t[r],s=0;i>s&&(o=this._stack[s](o,r,t),void 0!==o&&""!==o);s++);void 0!==o&&""!==o&&e.push(o)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(o===t)return r;t>o&&(e=r),o>t&&(n=r),i=n-e,r=e+Math.floor(i/2),o=this.elements[r]}return o===t?r:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,r=e+Math.floor(i/2),o=this.elements[r];i>1;)t>o&&(e=r),o>t&&(n=r),i=n-e,r=e+Math.floor(i/2),o=this.elements[r];return o>t?r:t>o?r+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,r=0,o=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>o-1||r>s-1)break;a[i]!==h[r]?a[i]h[r]&&r++:(n.add(a[i]),i++,r++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone();for(var r=0,o=n.toArray();rp;p++)c[p]===a&&d++;h+=d/f*l.boost}}this.tokenStore.add(a,{ref:o,tf:h})}n&&this.eventEmitter.emit("add",e,this)},t.Index.prototype.remove=function(t,e){var n=t[this._ref],e=void 0===e?!0:e;if(this.documentStore.has(n)){var i=this.documentStore.get(n);this.documentStore.remove(n),i.forEach(function(t){this.tokenStore.remove(t,n)},this),e&&this.eventEmitter.emit("remove",t,this)}},t.Index.prototype.update=function(t,e){var e=void 0===e?!0:e;this.remove(t,!1),this.add(t,!1),e&&this.eventEmitter.emit("update",t,this)},t.Index.prototype.idf=function(t){var e="@"+t;if(Object.prototype.hasOwnProperty.call(this._idfCache,e))return this._idfCache[e];var n=this.tokenStore.count(t),i=1;return n>0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(this.tokenizerFn(e)),i=new t.Vector,r=[],o=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*o,h=this,u=this.tokenStore.expand(e).reduce(function(n,r){var o=h.corpusTokens.indexOf(r),s=h.idf(r),u=1,l=new t.SortedSet;if(r!==e){var c=Math.max(3,r.length-e.length);u=1/Math.log(c)}o>-1&&i.insert(o,a*s*u);for(var f=h.tokenStore.get(r),d=Object.keys(f),p=d.length,v=0;p>v;v++)l.add(f[d[v]].ref);return n.union(l)},new t.SortedSet);r.push(u)},this);var a=r.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,r=new t.Vector,o=0;i>o;o++){var s=n.elements[o],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);r.insert(this.corpusTokens.indexOf(s),a*h)}return r},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,tokenizer:this.tokenizerFn.label,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",r=n+"[^aeiouy]*",o=i+"[aeiou]*",s="^("+r+")?"+o+r,a="^("+r+")?"+o+r+"("+o+")?$",h="^("+r+")?"+o+r+o+r,u="^("+r+")?"+i,l=new RegExp(s),c=new RegExp(h),f=new RegExp(a),d=new RegExp(u),p=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,m=/^(.+?)(ed|ing)$/,y=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),k=new RegExp("^"+r+i+"[^aeiouwxy]$"),x=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,F=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,_=/^(.+?)(s|t)(ion)$/,z=/^(.+?)e$/,O=/ll$/,P=new RegExp("^"+r+i+"[^aeiouwxy]$"),T=function(n){var i,r,o,s,a,h,u;if(n.length<3)return n;if(o=n.substr(0,1),"y"==o&&(n=o.toUpperCase()+n.substr(1)),s=p,a=v,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=g,a=m,s.test(n)){var T=s.exec(n);s=l,s.test(T[1])&&(s=y,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=d,a.test(i)&&(n=i,a=S,h=w,u=k,a.test(n)?n+="e":h.test(n)?(s=y,n=n.replace(s,"")):u.test(n)&&(n+="e"))}if(s=x,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],r=T[2],s=l,s.test(i)&&(n=i+t[r])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],r=T[2],s=l,s.test(i)&&(n=i+e[r])}if(s=F,a=_,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=z,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=P,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=O,a=c,s.test(n)&&a.test(n)&&(s=y,n=n.replace(s,"")),"y"==o&&(n=o.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.generateStopWordFilter=function(t){var e=t.reduce(function(t,e){return t[e]=e,t},{});return function(t){return t&&e[t]!==t?t:void 0}},t.stopWordFilter=t.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t.charAt(0),r=t.slice(1);return i in n||(n[i]={docs:{}}),0===r.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(r,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;n div.highlighter-rouge:first-of-type").each(function(i) { + + var $this = $(this).before("
    "), + $languages = $this.prev(), + $notFirst = $this.nextUntil(":not(div.highlighter-rouge)"), + $all = $this.add($notFirst); + + $all.add($languages).wrapAll("
    "); + + + listLanguages($all, $languages); + + $this.css('display', 'block'); + + $languages.find('a').first().addClass('active'); + + $languages.find('a').click(function() { + $all.css('display', 'none'); + $all.eq($(this).parent().index()).css('display', 'block'); + + $languages.find('a').removeClass('active'); + $(this).addClass('active'); + return false; + }); + + if ($languages.children().length === 0) { + $languages.remove(); + } + }); + + function listLanguages($el, $insert) { + $el.each(function(i) { + var title = $(this).attr('title'); + if (title) { + $insert.append("
  • " + title + "
  • "); + } + }); + } + + var href = $('.sidebar a').first().attr("href"); + + if (href !== undefined && href.charAt(0) === "#") { + setActiveSidebarLink(); + + $(window).on("scroll", function(evt) { + setActiveSidebarLink(); + }); + } + + function setActiveSidebarLink() { + $('.sidebar a').removeClass('active'); + var $closest = getClosestHeader(); + $closest.addClass('active'); + document.title = $closest.text(); + + } +}); + +function getClosestHeader() { + var $links = $('.sidebar a'), + top = window.scrollY, + $last = $links.first(); + + if (top < 300) { + return $last; + } + + if (top + window.innerHeight >= $(".main").height()) { + return $links.last(); + } + + for (var i = 0; i < $links.length; i++) { + var $link = $links.eq(i), + href = $link.attr("href"); + + if (href !== undefined && href.charAt(0) === "#" && href.length > 1) { + var $anchor = $(href); + + if ($anchor.length > 0) { + var offset = $anchor.offset(); + + if (top < offset.top - 300) { + return $last; + } + + $last = $link; + } + } + } + return $last; +} + + + +$(document).ready(function(){ + // Select all links with hashes + $('a[href*="#"]') + // Remove links that don't actually link to anything + .not('[href="#"]') + .not('[href="#0"]') + .click(function(event) { + // On-page links + if ( + location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') + && + location.hostname == this.hostname + ) { + // Figure out element to scroll to + var target = $(this.hash); + target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); + // Does a scroll target exist? + if (target.length) { + // Only prevent default if animation is actually gonna happen + event.preventDefault(); + $('html, body').animate({ + scrollTop: target.offset().top + }, 300, function() { + // Callback after animation + // Must change focus! + var $target = $(target); + $target.focus(); + if ($target.is(":focus")) { // Checking if the target was focused + return false; + } else { + $target.attr('tabindex','-1'); // Adding tabindex for elements not focusable + $target.focus(); // Set focus again + }; + }); + } + } + }); + + var navSectionList = document.getElementsByClassName("pnl-main-nav-section"); + var pathname = window.location.pathname; + var inPageContentNodes = []; + + Array.prototype.forEach.call(navSectionList, function(section) { + if(pathname == section.getAttribute("url")) { + section.classList.add("show-content"); + section.classList.add("lock-open"); + Array.prototype.forEach.call(section.getElementsByTagName('a'), function(a) { + var id = a.href.substring(a.href.indexOf('#') + 1); + var contentNode = document.getElementById(id); + if(contentNode) { + inPageContentNodes.push({ + "id":id, + "a":a, + "node":contentNode, + "top":contentNode.offsetTop, + "bottom":contentNode.offsetTop + contentNode.offsetHeight + }); + + } + + }); + } else { + section.getElementsByClassName("ctrl-nav-section")[0].addEventListener("click", function() { + section.classList.toggle("show-content"); + }); + } + }); + + window.onresize(function() { + inPageContentNodes.forEach(function(content) { + content.top = content.node.offsetTop; + content.bottom = content.node.offsetTop + contentNode.offsetHeight + }); + }); + + $(window).scroll(function (event) { + var scrollTop = $(window).scrollTop(); + var scrollBottom = scrollTop + window.innerHeight + inPageContentNodes.forEach(function(content) { + if((scrollBottom >= content.top && scrollTop < content.bottom)) { + content.a.classList.add('active'); + } else { + content.a.classList.remove('active'); + } + }); + }); +}); diff --git a/docs/js/search.js b/docs/js/search.js new file mode 100644 index 0000000000000000000000000000000000000000..b9427e744863d4bdeef134dcdae583d5ffc4c223 --- /dev/null +++ b/docs/js/search.js @@ -0,0 +1,102 @@ +(function () { + function getQueryVariable(variable) { + var query = window.location.search.substring(1), + vars = query.split("&"); + + for (var i = 0; i < vars.length; i++) { + var pair = vars[i].split("="); + + if (pair[0] === variable) { + return pair[1]; + } + } + } + + function getPreview(query, content, previewLength) { + previewLength = previewLength || (content.length * 2); + + var parts = query.split(" "), + match = content.toLowerCase().indexOf(query.toLowerCase()), + matchLength = query.length, + preview; + + // Find a relevant location in content + for (var i = 0; i < parts.length; i++) { + if (match >= 0) { + break; + } + + match = content.toLowerCase().indexOf(parts[i].toLowerCase()); + matchLength = parts[i].length; + } + + // Create preview + if (match >= 0) { + var start = match - (previewLength / 2), + end = start > 0 ? match + matchLength + (previewLength / 2) : previewLength; + + preview = content.substring(start, end).trim(); + + if (start > 0) { + preview = "..." + preview; + } + + if (end < content.length) { + preview = preview + "..."; + } + + // Highlight query parts + preview = preview.replace(new RegExp("(" + parts.join("|") + ")", "gi"), "$1"); + } else { + // Use start of content if no match found + preview = content.substring(0, previewLength).trim() + (content.length > previewLength ? "..." : ""); + } + + return preview; + } + + function displaySearchResults(results, query) { + var searchResultsEl = document.getElementById("search-results"), + searchProcessEl = document.getElementById("search-process"); + + if (results.length) { + var resultsHTML = ""; + results.forEach(function (result) { + var item = window.data[result.ref], + contentPreview = getPreview(query, item.content, 170), + titlePreview = getPreview(query, item.title); + + resultsHTML += "
  • " + titlePreview + "

    " + contentPreview + "

  • "; + }); + + searchResultsEl.innerHTML = resultsHTML; + searchProcessEl.innerText = "Showing"; + } else { + searchResultsEl.style.display = "none"; + searchProcessEl.innerText = "No"; + } + } + + window.index = lunr(function () { + this.field("id"); + this.field("title", {boost: 10}); + this.field("category"); + this.field("url"); + this.field("content"); + }); + + var query = decodeURIComponent((getQueryVariable("q") || "").replace(/\+/g, "%20")), + searchQueryContainerEl = document.getElementById("search-query-container"), + searchQueryEl = document.getElementById("search-query"), + searchInputEl = document.getElementById("search-input"); + + searchInputEl.value = query; + searchQueryEl.innerText = query; + searchQueryContainerEl.style.display = "inline"; + + for (var key in window.data) { + window.index.add(window.data[key]); + } + + displaySearchResults(window.index.search(query), query); // Hand the results off to be displayed +})(); diff --git a/docs/lib/scrape/api_definitions_job.rb b/docs/lib/scrape/api_definitions_job.rb new file mode 100644 index 0000000000000000000000000000000000000000..5ae4f3b236ea056d7cf68188121c2ff65a4a2ccb --- /dev/null +++ b/docs/lib/scrape/api_definitions_job.rb @@ -0,0 +1,124 @@ +require 'steem' + +module Scrape + + # Scrapes all known methods for all known APIs and saves them to as `.yml`. + class ApiDefinitionsJob + attr_accessor :url, :api_data_path, :jsonrpc + + DEFAULT_URL = 'https://appbasetest.timcliff.com' + DEFAULT_API_DATA_PATH = '_data/apidefinitions' + + def initialize(options = {url: DEFAULT_URL, api_data_path: DEFAULT_API_DATA_PATH}) + @url = options[:url] || DEFAULT_URL + @api_data_path = options[:api_data_path] || DEFAULT_API_DATA_PATH + @jsonrpc = Steem::Jsonrpc.new(url: @url) + end + + # Execute the job. + # + # @return [Integer] total number of methods added or changed in this pass + def perform + method_change_count = 0 + all_signatures = jsonrpc.get_all_signatures + + apis.each do |api, methods| + signatures = all_signatures.select { |k, v| k == api } + file_name = "#{api_data_path}/#{api}.yml" + api_method_change_count = 0 + puts "Definitions for: #{api}, methods: #{methods.size}" + + dirty, yml = if File.exist?(file_name) + [false, YAML.load_file(file_name)] + else + # Initialize + [true, [ + 'name' => api, + 'description' => nil, + 'methods' => [] + ]] + end + + signatures[api].each do |method, signature| + method_name = "#{api}.#{method}" + existing_api_method = yml[0]['methods'].reverse.find{|e| e['api_method'] == method_name} + + parameter_json = signature.args.to_json + expected_response_json = signature.ret.to_json + + if existing_api_method + + case api + when :condenser_api + # skipping signature analysis on condenser_api + # puts "A: " + existing_api_method['parameter_json'].inspect + # puts "B: " + parameter_json.inspect + # puts "C: " + existing_api_method['expected_response_json'].inspect + # puts "D: " + expected_response_json.inspect + next + else + if existing_api_method['parameter_json'] == parameter_json && + existing_api_method['expected_response_json'] == expected_response_json + next + else + existing_api_method['parameter_json'] = parameter_json + existing_api_method['expected_response_json'] = expected_response_json + puts "\tChanged: #{method}" + end + end + else + puts "\tAdding: #{method}" + end + + dirty = true + unless existing_api_method + yml[0]['methods'] << { + 'api_method' => method_name, + 'purpose' => nil, + 'parameter_json' => parameter_json, + 'expected_response_json' => expected_response_json + } + end + + api_method_change_count += 1 + method_change_count += 1 + end + + yml[0]['methods'].each do |method| + existing_api, existing_method = method['api_method'].split('.') + + unless methods.include?(existing_method.to_sym) + puts "\tDropped method: #{existing_method} (recommend removal from #{file_name})" + end + end + + next unless dirty + + File.open(file_name, 'w+') do |f| + f.write("# Generated by #{self.class.name.to_s}: #{Time.now.utc}\n") + f.write("# See: https://git.io/vx5CY\n") + f.write yml.to_yaml + end + + puts "\t#{api_method_change_count} methods added/updated in #{api}" + end + + method_change_count + end + private + def apis + apis = {} + + jsonrpc.get_methods do |methods| + methods.each do |method| + api, method = method.split('.').map(&:to_sym) + + apis[api] ||= [] + apis[api] << method + end + end + + apis + end + end +end \ No newline at end of file diff --git a/docs/lib/scrape/tutorials_job/base.rb b/docs/lib/scrape/tutorials_job/base.rb new file mode 100644 index 0000000000000000000000000000000000000000..bc01be9ff8c2048bd22a3db68b237ec6883f2d64 --- /dev/null +++ b/docs/lib/scrape/tutorials_job/base.rb @@ -0,0 +1,155 @@ +require 'git' + +module Scrape + module TutorialsJob + class Base + TMP_CHECKOUT = '/tmp/checkout' + + def initialize(options = {}) + @num = (options[:num] || '-1').to_i + @force = options[:force] == 'true' + @tutorial_github_url = options[:tutorial_github_url] #e.g.: https://github.com/steemit/devportal-tutorials-js.git + @tutorial_github_name = options[:tutorial_github_name] # e.g.: devportal-tutorials-js + @tutorial_url = options[:tutorial_url] # e.g.: https://github.com/steemit/devportal-tutorials-js + @dest_tutorials_path = options[:dest_tutorials_path] # e.g.: _tutorials-javascript + + @clone_tutorials_path = "#{TMP_CHECKOUT}/#{@tutorial_github_name}/tutorials" + end + + # Execute the job. + # + # @return [Integer] total number of tutorials added or changed in this pass + def perform + tutorial_change_count = 0 + tutorial_title_prefix = @tutorial_github_name.split('-').last.upcase + + clean_previous_clone + + Git.clone(@tutorial_github_url, @tutorial_github_name, path: TMP_CHECKOUT) + + Pathname.new(@clone_tutorials_path).children.sort.each do |path| + next unless File.directory? path + + slug = include_name = path.to_s.split('/').last + slug = slug.split('_') + num = slug[0].to_i + + next if @num != -1 && @num != num + + name = slug[1..-1].join '_' + title = slug[1..-1].map(&:capitalize).join ' ' + readme = "#{path}/README.md" + destination = "#{@dest_tutorials_path}/#{name}.md" + + if File.exists?(destination) && @force + puts "##{num}: \"#{title}\" already exists. Forcing." + elsif File.exists? destination + puts "##{num}: \"#{title}\" already exists. Skipping." + next + end + + parse_readme(readme) do |description, body| + template = <<~DONE + --- + title: '#{tutorial_title_prefix}: #{title}' + position: #{num} + description: #{description} + layout: full + --- + #{tutorial_repo_links title, include_name, tutorial_title_prefix} +
    + + #{rewrite_relative_links(rewrite_images body, include_name)} + + --- + + + DONE + + f = File.open(destination, 'w+') + f.puts template.strip + "\n" + f.close + end + + tutorial_change_count += 1 + end + + clean_previous_clone + + tutorial_change_count + end + private + def parse_readme(readme) + description = nil + body = '' + + File.open(readme, 'r').each_line do |line| + next if line =~ /^# / + + if description.nil? && !line.strip.empty? + description ||= "\"#{line.strip}\"" + + next + end + + body << line + end + + yield description, body + end + + def rewrite_images(body, include_name) + body = body.gsub(/!\[([^\]]+)\]\(([^)]+)\)/) do + alt, src = Regexp.last_match[1..2] + src = if src.include? '://' + src + else + src = src.split('/')[1..-1].join('/') if src.start_with? './' + "#{@tutorial_url}/blob/master/tutorials/#{include_name}/#{src}?raw=true" + end + + "![#{alt}](#{src})" + end + + body + end + + def rewrite_relative_links(body) + body = body.gsub(/\[([^\]]+)\]\(([^)]+)\)/) do + text, href = Regexp.last_match[1..2] + href = if href.include? '://' + href + elsif href.include? @tutorial_url + relative_href = href.gsub(/#{@tutorial_url}\/tree\/master\/tutorials\/(\d+)_([a-z0-9_]+)/) do + num, name = Regexp.last_match[1..2] + + name + end + + relative_href + else + relative_href = href.gsub(/..\/(\d+)_([a-z0-9_]+)/) do + num, name = Regexp.last_match[1..2] + + name + end + + relative_href + end + + "[#{text}](#{href})" + end + + body + end + + def tutorial_repo_links(title, include_name, tutorial_title_prefix) + "Full, runnable src of [#{title}](#{@tutorial_url}/tree/master/tutorials/#{include_name}) can be downloaded as part of the [#{tutorial_title_prefix} tutorials repository](#{@tutorial_url})." + end + + def clean_previous_clone + FileUtils.rm_rf(Dir.glob("#{TMP_CHECKOUT}/*")) + end + end + end +end diff --git a/docs/lib/scrape/tutorials_job/javascript.rb b/docs/lib/scrape/tutorials_job/javascript.rb new file mode 100644 index 0000000000000000000000000000000000000000..b19693feec78eb2f4a8dc754b4fe1facfba0c1f8 --- /dev/null +++ b/docs/lib/scrape/tutorials_job/javascript.rb @@ -0,0 +1,16 @@ +require 'git' + +module Scrape + module TutorialsJob + class Javascript < Base + def initialize(options = {}) + options[:tutorial_github_url] ||= 'https://github.com/steemit/devportal-tutorials-js.git' + options[:tutorial_github_name] ||= 'devportal-tutorials-js' + options[:tutorial_url] = 'https://github.com/steemit/devportal-tutorials-js' + options[:dest_tutorials_path] ||= '_tutorials-javascript' + + super + end + end + end +end diff --git a/docs/lib/scrape/tutorials_job/python.rb b/docs/lib/scrape/tutorials_job/python.rb new file mode 100644 index 0000000000000000000000000000000000000000..c5cbdc1c688ee8ef8c8f169b888af84eed70683d --- /dev/null +++ b/docs/lib/scrape/tutorials_job/python.rb @@ -0,0 +1,16 @@ +require 'git' + +module Scrape + module TutorialsJob + class Python < Base + def initialize(options = {}) + options[:tutorial_github_url] = 'https://github.com/steemit/devportal-tutorials-py.git' + options[:tutorial_github_name] ||= 'devportal-tutorials-py' + options[:tutorial_url] = 'https://github.com/steemit/devportal-tutorials-py' + options[:dest_tutorials_path] ||= '_tutorials-python' + + super + end + end + end +end diff --git a/docs/lib/scrape/tutorials_job/ruby.rb b/docs/lib/scrape/tutorials_job/ruby.rb new file mode 100644 index 0000000000000000000000000000000000000000..edb81b3f067570f8eea2d1dd605b543493fc3152 --- /dev/null +++ b/docs/lib/scrape/tutorials_job/ruby.rb @@ -0,0 +1,16 @@ +require 'git' + +module Scrape + module TutorialsJob + class Ruby < Base + def initialize(options = {}) + options[:tutorial_github_url] = 'https://github.com/steemit/devportal-tutorials-rb.git' + options[:tutorial_github_name] ||= 'devportal-tutorials-rb' + options[:tutorial_url] = 'https://github.com/steemit/devportal-tutorials-rb' + options[:dest_tutorials_path] ||= '_tutorials-ruby' + + super + end + end + end +end diff --git a/docs/quickstart/choose_library.html b/docs/quickstart/choose_library.html new file mode 100644 index 0000000000000000000000000000000000000000..1ca4bac4ed0942dc63763f368ba3058b549ed3d1 --- /dev/null +++ b/docs/quickstart/choose_library.html @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + + +Choose Library | Steem Developer + + + + + + + + + + + + + + + +
    +

    + + Steem Developer logo +

    + + +
    + + +
    + + + + + + + + + + + +
    +
    +
    +

    Steem Developer Portal

    + + + +
    +

    Getting started to develop robust and feature rich Steem applications couldn’t be easier. Accessing steem data is easy from various options depending on your infrastructure and objectives.

    + +

    Building a picture discovery app is a breeze with the JavaScript library. There is also a Python library available, Steemit.com and SBDS services, as well as many community projects which could be beneficial for your steem project.

    + +
    + + + + + + + + diff --git a/docs/quickstart/index.html b/docs/quickstart/index.html new file mode 100644 index 0000000000000000000000000000000000000000..fae62bf2d8f8b880a324ab02e5b31468dd20d699 --- /dev/null +++ b/docs/quickstart/index.html @@ -0,0 +1,612 @@ + + + + + + + + + + + + + + + + + + +Quickstart | Steem Developer + + + + + + + + + + + + + + + +
    +

    + + Steem Developer logo +

    + + +
    + + +
    + + + + + + + + + + + +
    +
    +
    +

    Steem Developer Portal - Quickstart

    + + + +
    + + + + +
    +

    + + Choose Library + + +

    + + +

    Getting started to develop robust and feature rich Steem applications couldn’t be easier. Accessing steem data is easy from various options depending on your infrastructure and objectives.

    + +

    Building a picture discovery app is a breeze with the JavaScript library. There is also a Python library available, Steemit.com and SBDS services, as well as many community projects which could be beneficial for your steem project.

    + +
    + +
    +

    + + steemd Nodes + + +

    + + +

    Applications that interface directly with the Steem blockchain will need to connect to a steemd node. Developers may choose to use one of the public API nodes that are available, or run their own instance of a node.

    + +

    Public Nodes

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    URLOwner
    api.steemit.com@steemit
    api.steemitdev.com@steemit
    api.steemitstage.com@steemit
    api.steem.house@gtg
    appbasetest.timcliff.com@timcliff
    gtg.steem.house:8090@gtg
    rpc.curiesteem.com@curie
    rpc.steemliberator.com@netuoso
    rpc.steemviz.com@ausbitbank
    steemd.minnowsupportproject.org@followbtcnews
    steemd.privex.io@privex
    + +

    Private Nodes

    + +

    The simplest way to get started is by deploying a pre-built dockerized container.

    + +
    Dockerized p2p Node
    + +

    To run a p2p node (ca. 2GB of memory is required at the moment):

    + +
    Dockerized Full Node
    + +

    to run a node with all the data (e.g. for supporting a content website) that uses ca. 14GB of memory and growing:

    + +

    Syncing blockchain

    + +

    Normally syncing blockchain starts from very first, 0 genesis block. It might take long time to catch up with live network. Because it connectes to various p2p nodes in the Steem network and requests blocks from 0 to head block. It stores blocks in block log file and builds up the current state in the shared memory file. But there is a way to bootstrap syncing by using trusted block_log file. The block log is an external append only log of the blocks. It contains blocks that are only added to the log after they are irreversible because the log is append only.

    + +

    Trusted block log file helps to download blocks faster. Steemit Inc, provides public block log file which can be downloaded from here and there is also option from community witness @gtg which can be downloaded from here.

    + +

    Both block_log files updated periodically, as of May 2018 uncompressed block_log file size ~110 GB. Docker container on stable branch of Steem source code has option to use USE_PUBLIC_BLOCKLOG=1 to download latest block log and start Steem node with replay.

    + +

    Block log should be place in blockchain directory below data_dir and node should be started with --replay-blockchain to ensure block log is valid and continue to sync from the point of snapshot. Replay uses the downloaded block log file to build up the shared memory file up to the highest block stored in that snapshot and then continues with sync up to the head block.

    + +

    Replay helps to sync blockchain in much faster rate, but as blockchain grows in size replay might also take some time to verify blocks.

    + +

    There is another trick which might help with faster sync/replay on smaller equipped servers:

    + +
    while :
    +do
    +   dd if=blockchain/block_log iflag=nocache count=0
    +   sleep 60
    +done
    +
    + +

    Above bash script drops block_log from the OS cache, leaving more memory free for backing the blockchain database. It might also help while running live, but measurement would be needed to determine this.

    + +
    Few other tricks that might help:
    + +

    For Linux users, virtual memory writes dirty pages of the shared file out to disk more often than is optimal which results in steemd being slowed down by redundant IO operations. These settings are recommended to optimize reindex time.

    + +
    echo    75 | sudo tee /proc/sys/vm/dirty_background_ratio
    +echo  1000 | sudo tee /proc/sys/vm/dirty_expire_centisecs
    +echo    80 | sudo tee /proc/sys/vm/dirty_ratio
    +echo 30000 | sudo tee /proc/sys/vm/dirty_writeback_centisecs
    +
    + +

    Another settings that can be changed in config.ini is flush - it is to specify a target number of blocks to process before flushing the chain database to disk. This is needed on Linux machines and a value of 100000 is recommended. It is not needed on OS X, but can be used if desired.

    + +
    docker run \
    +    -d -p 2001:2001 -p 8090:8090 --name steemd-default \
    +    steemit/steem
    +
    +docker logs -f steemd-default  # follow along
    +
    +
    docker run \
    +    --env USE_WAY_TOO_MUCH_RAM=1 \
    +    -d -p 2001:2001 -p 8090:8090 --name steemd-full \
    +    steemit/steem
    +
    +docker logs -f steemd-full
    +
    + +
    + +
    +

    + + Steem Testnet + + +

    + + +

    Steem blockchain software is written in C++ and in order to modify the source code you need some understanding of the C++ programming language. Each Steem node runs an instance of this software, so in order to test your changes, you will need to know how to install dependencies which can be found in the Steem repo. This also means that some knowledge of System administration is also required. There are multiple advantages of running a testnet, you can test your scripts or applications on a testnet without extra spam on the live network, which allows much more flexibility to try new things. Having access to a testnet also helps you to work on new features and possibly submit new or improved pull requests to official the Steem GitHub repository.

    + +

    Steemit’s Testnet

    + +

    Steemit maintains a live testnet to which you can connect. In the near future, we expect the chain id to update with every code change. To get the current chain id for any HF20+ Steem testnet you can use the database_api.get_version api call (curl example included for your convenience). Be sure to point it at an api node on the testnet for which you want information!

    + +

    Features

    + +

    The official Steemit, Inc. Testnet is a mirror of the mainnet. This is achieved by copying the existing accounts and transactions from the mainnet state, as the they happen. Accounts are copied from a snapshot of mainnet while the module used to copy transactions in real time is called gatling. The gatling module runs at the final step of each testnet deployment.

    + +

    The combination of snapshot and gatling means that this testnet approaches a subset of the same activity that the mainnet experiences. Not everything can be mirrored. For example, if someone comments or votes on a post that hasn’t been mirrored to the testnet (because the post itself pre-dates the testnet deploy), those operations will also not be included.

    + +

    At the time of this writing, the connection information for Steemit’s testnet is as follows:

    + +
      +
    • ChainID: 46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32
    • +
    • Address prefix: TST
    • +
    • API node: https://testnet.steemitdev.com
    • +
    + +

    Running a Testnet Node

    + +

    First, let’s build steemd specifically for testnet. Recommended specs:

    + +
      +
    • Ubuntu Server 16.04 LTS
    • +
    • 100GB HDD
    • +
    • 16GB RAM (mostly needed for steemd build)
    • +
    + +
    sudo apt-get update && sudo apt-get dist-upgrade
    +sudo reboot
    +
    +sudo apt-get install autoconf automake autotools-dev bsdmainutils build-essential cmake doxygen \
    +   git libboost-all-dev libreadline-dev libssl-dev libtool ncurses-dev pbzip2 pkg-config \
    +   python3-dev python3-jinja2 python3-pip libbz2-dev libsnappy-dev\
    +   wget curl screen pv virtualenv nano xz-utils
    +mkdir -p src
    +cd src
    +git clone https://github.com/steemit/steem
    +cd steem
    +git checkout <20180824-testnet OR develop OR a more current branch>
    +git submodule update --init --recursive
    +mkdir -p build
    +cd build
    +cmake \
    +   -DCMAKE_BUILD_TYPE=Release \
    +   -DBUILD_STEEM_TESTNET=ON \
    +   -DENABLE_SMT_SUPPORT=ON \
    +   -DLOW_MEMORY_NODE=ON \
    +   -DCHAINBASE_CHECK_LOCKING=ON \
    +   -DCLEAR_VOTES=ON \
    +   -DSKIP_BY_TX_ID=ON \
    +   -DSTEEM_LINT_LEVEL=OFF \
    +   ..
    +make -j$(nproc) install
    +cd
    +mkdir -p testnet-data
    +cd testnet-data
    +nano config.ini
    +
    + +

    config.ini

    + +
    log-console-appender = {"appender":"stderr","stream":"std_error"}
    +log-file-appender = {"appender":"p2p","file":"logs/p2p/p2p.log"}
    +log-logger = {"name":"default","level":"info","appender":"stderr"}
    +log-logger = {"name":"p2p","level":"warn","appender":"p2p"}
    +
    +backtrace = yes
    +plugin = chain p2p webserver witness database_api network_broadcast_api block_api 
    +
    +shared-file-dir = "blockchain"
    +shared-file-size = 12G
    +p2p-endpoint = 0.0.0.0:2001
    +webserver-http-endpoint = 0.0.0.0:8751
    +webserver-ws-endpoint = 0.0.0.0:8752
    +
    +# testnet.steemitdev.com
    +p2p-seed-node = testnet.steemitdev.com:2001
    +
    + +

    Then execute:

    + +
    steemd --data-dir=. --chain-id=46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32
    +
    + +

    Now let it sync, and you’ll have a shiny new testnet seed node to play with.

    + +

    Custom Testnet

    + +

    In order to create a custom, isolated, testnet separate from the Steemit’s we need to modify a few things mentioned in the previous section.

    + +

    In the file named steem/libraries/protocol/include/steem/protocol/config.hpp, we can see the first few lines dedicated to the Testnet section. The line starts with #ifdef IS_TEST_NET.

    + +

    Let’s say we want to create a custom testnet with an initial supply of 1,000,000 STEEM. We can change STEEM_INIT_SUPPLY 1,000,000 and by changing STEEM_CHAIN_ID_NAME "testnet", testnet to mytestnet we will automatically get a unique Chain ID for our testnet. The address prefix can be set to something like MTN and of course, we need to change the public and private keys to the genesis account. Note that the genesis account will receive the entire pre-mined supply of 1,000,000. That way, you can execute a setup script to fund any newly created accounts. Such a custom testnet will not have any additional hardware requirements to run.

    + +

    A minimum of 8GB RAM should be sufficient to run a custom testnet. Currently, Steem only has Linux and Mac compiling guides to build. A testnet can either be hosted locally, on a rented AWS, or dedicated bare metal servers so one can start testing functionality, explore different APIs, and start developing.

    + +

    One more crucial point to modify is to change the number of witnesses required to accept hardforks for a custom testnet, by default it is set to 17, we can change it to 1 STEEM_HARDFORK_REQUIRED_WITNESSES 1 so that only one node instance would be sufficient and the network will be still functional and fast.

    + +

    Another thing to note is that you can start a new chain with all previous hardforks already accepted, by changing the file named steem/blob/master/libraries/chain/database.cpp with the following function:

    + +

    void database::init_genesis( uint64_t init_supply ) inside try add this line:

    + +

    set_hardfork( 19, true );

    + +

    This would mean that 19 hardforks have been accepted by witnesses and the new chain will start with all previous forks included.

    + +

    After these changes, all we have to do is compile the source code and get the steemd executable. And once we fire up the custom testnet we can start testing and experimenting.

    + +

    If you want to port some data from Steem main network you can use Tinman, also developed by Steemit, to help with taking snapshots of the main network.

    + +

    Custom live testnet

    + +

    An example of a custom testnet run by Steem community member @almost-digital. It doesn’t have a snapshot of the main network

    + +
      +
    • ChainID: 79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673
    • +
    • Address prefix: STX
    • +
    • API node: https://testnet.steem.vc
    • +
    + +
    + + + +
    + + + + + + + + diff --git a/docs/quickstart/steemd_nodes.html b/docs/quickstart/steemd_nodes.html new file mode 100644 index 0000000000000000000000000000000000000000..e44b8230c7cebffcbd7f5f15d09966ff119ce102 --- /dev/null +++ b/docs/quickstart/steemd_nodes.html @@ -0,0 +1,446 @@ + + + + + + + + + + + + + + + + + + +steemd Nodes | Steem Developer + + + + + + + + + + + + + + + +
    +

    + + Steem Developer logo +

    + + +
    + + +
    + + + + + + + + + + + +
    +
    +
    +

    Steem Developer Portal

    + + + +
    +

    Applications that interface directly with the Steem blockchain will need to connect to a steemd node. Developers may choose to use one of the public API nodes that are available, or run their own instance of a node.

    + +

    Public Nodes

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    URLOwner
    api.steemit.com@steemit
    api.steemitdev.com@steemit
    api.steemitstage.com@steemit
    api.steem.house@gtg
    appbasetest.timcliff.com@timcliff
    gtg.steem.house:8090@gtg
    rpc.curiesteem.com@curie
    rpc.steemliberator.com@netuoso
    rpc.steemviz.com@ausbitbank
    steemd.minnowsupportproject.org@followbtcnews
    steemd.privex.io@privex
    + +

    Private Nodes

    + +

    The simplest way to get started is by deploying a pre-built dockerized container.

    + +
    Dockerized p2p Node
    + +

    To run a p2p node (ca. 2GB of memory is required at the moment):

    + +
    Dockerized Full Node
    + +

    to run a node with all the data (e.g. for supporting a content website) that uses ca. 14GB of memory and growing:

    + +

    Syncing blockchain

    + +

    Normally syncing blockchain starts from very first, 0 genesis block. It might take long time to catch up with live network. Because it connectes to various p2p nodes in the Steem network and requests blocks from 0 to head block. It stores blocks in block log file and builds up the current state in the shared memory file. But there is a way to bootstrap syncing by using trusted block_log file. The block log is an external append only log of the blocks. It contains blocks that are only added to the log after they are irreversible because the log is append only.

    + +

    Trusted block log file helps to download blocks faster. Steemit Inc, provides public block log file which can be downloaded from here and there is also option from community witness @gtg which can be downloaded from here.

    + +

    Both block_log files updated periodically, as of May 2018 uncompressed block_log file size ~110 GB. Docker container on stable branch of Steem source code has option to use USE_PUBLIC_BLOCKLOG=1 to download latest block log and start Steem node with replay.

    + +

    Block log should be place in blockchain directory below data_dir and node should be started with --replay-blockchain to ensure block log is valid and continue to sync from the point of snapshot. Replay uses the downloaded block log file to build up the shared memory file up to the highest block stored in that snapshot and then continues with sync up to the head block.

    + +

    Replay helps to sync blockchain in much faster rate, but as blockchain grows in size replay might also take some time to verify blocks.

    + +

    There is another trick which might help with faster sync/replay on smaller equipped servers:

    + +
    while :
    +do
    +   dd if=blockchain/block_log iflag=nocache count=0
    +   sleep 60
    +done
    +
    + +

    Above bash script drops block_log from the OS cache, leaving more memory free for backing the blockchain database. It might also help while running live, but measurement would be needed to determine this.

    + +
    Few other tricks that might help:
    + +

    For Linux users, virtual memory writes dirty pages of the shared file out to disk more often than is optimal which results in steemd being slowed down by redundant IO operations. These settings are recommended to optimize reindex time.

    + +
    echo    75 | sudo tee /proc/sys/vm/dirty_background_ratio
    +echo  1000 | sudo tee /proc/sys/vm/dirty_expire_centisecs
    +echo    80 | sudo tee /proc/sys/vm/dirty_ratio
    +echo 30000 | sudo tee /proc/sys/vm/dirty_writeback_centisecs
    +
    + +

    Another settings that can be changed in config.ini is flush - it is to specify a target number of blocks to process before flushing the chain database to disk. This is needed on Linux machines and a value of 100000 is recommended. It is not needed on OS X, but can be used if desired.

    + +
    docker run \
    +    -d -p 2001:2001 -p 8090:8090 --name steemd-default \
    +    steemit/steem
    +
    +docker logs -f steemd-default  # follow along
    +
    +
    docker run \
    +    --env USE_WAY_TOO_MUCH_RAM=1 \
    +    -d -p 2001:2001 -p 8090:8090 --name steemd-full \
    +    steemit/steem
    +
    +docker logs -f steemd-full
    +
    + +
    + + + + + + + + diff --git a/docs/quickstart/testnet.html b/docs/quickstart/testnet.html new file mode 100644 index 0000000000000000000000000000000000000000..8542485e51fbf226373f76b399c57addffb141c0 --- /dev/null +++ b/docs/quickstart/testnet.html @@ -0,0 +1,449 @@ + + + + + + + + + + + + + + + + + + +Steem Testnet | Steem Developer + + + + + + + + + + + + + + + +
    +

    + + Steem Developer logo +

    + + +
    + + +
    + + + + + + + + + + + +
    +
    +
    +

    Steem Developer Portal

    + + + +
    +

    Steem blockchain software is written in C++ and in order to modify the source code you need some understanding of the C++ programming language. Each Steem node runs an instance of this software, so in order to test your changes, you will need to know how to install dependencies which can be found in the Steem repo. This also means that some knowledge of System administration is also required. There are multiple advantages of running a testnet, you can test your scripts or applications on a testnet without extra spam on the live network, which allows much more flexibility to try new things. Having access to a testnet also helps you to work on new features and possibly submit new or improved pull requests to official the Steem GitHub repository.

    + +

    Steemit’s Testnet

    + +

    Steemit maintains a live testnet to which you can connect. In the near future, we expect the chain id to update with every code change. To get the current chain id for any HF20+ Steem testnet you can use the database_api.get_version api call (curl example included for your convenience). Be sure to point it at an api node on the testnet for which you want information!

    + +

    Features

    + +

    The official Steemit, Inc. Testnet is a mirror of the mainnet. This is achieved by copying the existing accounts and transactions from the mainnet state, as the they happen. Accounts are copied from a snapshot of mainnet while the module used to copy transactions in real time is called gatling. The gatling module runs at the final step of each testnet deployment.

    + +

    The combination of snapshot and gatling means that this testnet approaches a subset of the same activity that the mainnet experiences. Not everything can be mirrored. For example, if someone comments or votes on a post that hasn’t been mirrored to the testnet (because the post itself pre-dates the testnet deploy), those operations will also not be included.

    + +

    At the time of this writing, the connection information for Steemit’s testnet is as follows:

    + +
      +
    • ChainID: 46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32
    • +
    • Address prefix: TST
    • +
    • API node: https://testnet.steemitdev.com
    • +
    + +

    Running a Testnet Node

    + +

    First, let’s build steemd specifically for testnet. Recommended specs:

    + +
      +
    • Ubuntu Server 16.04 LTS
    • +
    • 100GB HDD
    • +
    • 16GB RAM (mostly needed for steemd build)
    • +
    + +
    sudo apt-get update && sudo apt-get dist-upgrade
    +sudo reboot
    +
    +sudo apt-get install autoconf automake autotools-dev bsdmainutils build-essential cmake doxygen \
    +   git libboost-all-dev libreadline-dev libssl-dev libtool ncurses-dev pbzip2 pkg-config \
    +   python3-dev python3-jinja2 python3-pip libbz2-dev libsnappy-dev\
    +   wget curl screen pv virtualenv nano xz-utils
    +mkdir -p src
    +cd src
    +git clone https://github.com/steemit/steem
    +cd steem
    +git checkout <20180824-testnet OR develop OR a more current branch>
    +git submodule update --init --recursive
    +mkdir -p build
    +cd build
    +cmake \
    +   -DCMAKE_BUILD_TYPE=Release \
    +   -DBUILD_STEEM_TESTNET=ON \
    +   -DENABLE_SMT_SUPPORT=ON \
    +   -DLOW_MEMORY_NODE=ON \
    +   -DCHAINBASE_CHECK_LOCKING=ON \
    +   -DCLEAR_VOTES=ON \
    +   -DSKIP_BY_TX_ID=ON \
    +   -DSTEEM_LINT_LEVEL=OFF \
    +   ..
    +make -j$(nproc) install
    +cd
    +mkdir -p testnet-data
    +cd testnet-data
    +nano config.ini
    +
    + +

    config.ini

    + +
    log-console-appender = {"appender":"stderr","stream":"std_error"}
    +log-file-appender = {"appender":"p2p","file":"logs/p2p/p2p.log"}
    +log-logger = {"name":"default","level":"info","appender":"stderr"}
    +log-logger = {"name":"p2p","level":"warn","appender":"p2p"}
    +
    +backtrace = yes
    +plugin = chain p2p webserver witness database_api network_broadcast_api block_api 
    +
    +shared-file-dir = "blockchain"
    +shared-file-size = 12G
    +p2p-endpoint = 0.0.0.0:2001
    +webserver-http-endpoint = 0.0.0.0:8751
    +webserver-ws-endpoint = 0.0.0.0:8752
    +
    +# testnet.steemitdev.com
    +p2p-seed-node = testnet.steemitdev.com:2001
    +
    + +

    Then execute:

    + +
    steemd --data-dir=. --chain-id=46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32
    +
    + +

    Now let it sync, and you’ll have a shiny new testnet seed node to play with.

    + +

    Custom Testnet

    + +

    In order to create a custom, isolated, testnet separate from the Steemit’s we need to modify a few things mentioned in the previous section.

    + +

    In the file named steem/libraries/protocol/include/steem/protocol/config.hpp, we can see the first few lines dedicated to the Testnet section. The line starts with #ifdef IS_TEST_NET.

    + +

    Let’s say we want to create a custom testnet with an initial supply of 1,000,000 STEEM. We can change STEEM_INIT_SUPPLY 1,000,000 and by changing STEEM_CHAIN_ID_NAME "testnet", testnet to mytestnet we will automatically get a unique Chain ID for our testnet. The address prefix can be set to something like MTN and of course, we need to change the public and private keys to the genesis account. Note that the genesis account will receive the entire pre-mined supply of 1,000,000. That way, you can execute a setup script to fund any newly created accounts. Such a custom testnet will not have any additional hardware requirements to run.

    + +

    A minimum of 8GB RAM should be sufficient to run a custom testnet. Currently, Steem only has Linux and Mac compiling guides to build. A testnet can either be hosted locally, on a rented AWS, or dedicated bare metal servers so one can start testing functionality, explore different APIs, and start developing.

    + +

    One more crucial point to modify is to change the number of witnesses required to accept hardforks for a custom testnet, by default it is set to 17, we can change it to 1 STEEM_HARDFORK_REQUIRED_WITNESSES 1 so that only one node instance would be sufficient and the network will be still functional and fast.

    + +

    Another thing to note is that you can start a new chain with all previous hardforks already accepted, by changing the file named steem/blob/master/libraries/chain/database.cpp with the following function:

    + +

    void database::init_genesis( uint64_t init_supply ) inside try add this line:

    + +

    set_hardfork( 19, true );

    + +

    This would mean that 19 hardforks have been accepted by witnesses and the new chain will start with all previous forks included.

    + +

    After these changes, all we have to do is compile the source code and get the steemd executable. And once we fire up the custom testnet we can start testing and experimenting.

    + +

    If you want to port some data from Steem main network you can use Tinman, also developed by Steemit, to help with taking snapshots of the main network.

    + +

    Custom live testnet

    + +

    An example of a custom testnet run by Steem community member @almost-digital. It doesn’t have a snapshot of the main network

    + +
      +
    • ChainID: 79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673
    • +
    • Address prefix: STX
    • +
    • API node: https://testnet.steem.vc
    • +
    + +
    + + + + + + + + diff --git a/docs/resources/client_libs.html b/docs/resources/client_libs.html new file mode 100644 index 0000000000000000000000000000000000000000..58375bc0702c37d1ba707884bd165fbf882dc189 --- /dev/null +++ b/docs/resources/client_libs.html @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + +Client Libraries | Steem Developer + + + + + + + + + + + + + + + +
    +

    + + Steem Developer logo +

    + + +
    + + +
    + + + + + + + + + + + +
    +
    +
    +

    Steem Developer Portal

    + + + +
    +

    Radiator - https://github.com/inertia186/radiator

    + +

    Radiator is a Ruby API client to interact with the steem blockchain.

    + +
    + +

    Steem-JS - https://github.com/steemit/steem-js

    + +

    Pure JavaScript Steem crypto library for node.js and browsers. Can be used to construct, sign and broadcast transactions in JavaScript.

    + +
    + +

    DSteem - https://github.com/jnordberg/dsteem

    + +

    A Typescript Steem crypto library for node.js and browsers. Steemit Inc also maintains a version of this library

    + +
    + +

    Beem - https://github.com/holgern/beem

    + +

    A python library to interact with the STEEM blockchain. It includes the CLI tool beempy.

    + +
    + +

    PHP Steem - https://github.com/lukestokes/php-steem-tools

    + +

    Various tools and scripts written in PHP for exploring the STEEM blockchain.

    + +
    + +

    SteemJ - https://github.com/marvin-we/steem-java-api-wrapper

    + +

    An API Wrapper for Steem written in Java

    + +
    + +

    GoSteem - https://github.com/go-steem/rpc

    + +

    Golang RPC client library for Steem

    + +
    + +

    SteemClientRS - https://github.com/cyberpunk-ventures/steem-client-rs

    + +

    Client library for Steem blockchain built with Rust

    + + +
    + + + + + + + + diff --git a/docs/resources/developeradvocate.html b/docs/resources/developeradvocate.html new file mode 100644 index 0000000000000000000000000000000000000000..d4816aeb7d1e309f6f9646f492a1ed4c67deb12d --- /dev/null +++ b/docs/resources/developeradvocate.html @@ -0,0 +1,342 @@ + + + + + + + + + + + + + + + + + + +Community & Help | Steem Developer + + + + + + + + + + + + + + + +
    +

    + + Steem Developer logo +

    + + +
    + + +
    + + + + + + + + + + + +
    +
    +
    +

    Steem Developer Portal

    + + + +
    +

    Developer Advocate

    + +

    The members of the Steemit Inc. development team are currently the main contributors to the Steem blockchain software. They oversee the open source Steem GitHub repository, and maintain many of the open source libraries that developers use.

    + +

    Steemit’s Developer Advocate is here to make the process of developing for the Steem platform as smooth as possible. If you have any comments, concerns, or suggestions about how to improve the experience of developing applications with the Steem blockchain - please reach out.

    + +

    The D.A. receives a lot of emails, but will respond as quickly as possible.

    + +
    + +

    SteemDevs Chat - https://discord.gg/B29Bbng

    + +

    SteemDevs chat is a public Discord chat community where members of the Steem development community go to discuss Steem development, and other related topics. +It is a great place to go to ask questions, meet other developers that are working on Steem projects, share tips and code snippets, and discuss the items you are working on.

    + + +
    + + + + + + + + diff --git a/docs/resources/index.html b/docs/resources/index.html new file mode 100644 index 0000000000000000000000000000000000000000..24d5fabe253d7718f93e4a3ed928b054c18c3ede --- /dev/null +++ b/docs/resources/index.html @@ -0,0 +1,534 @@ + + + + + + + + + + + + + + + + + + +Resources | Steem Developer + + + + + + + + + + + + + + + +
    +

    + + Steem Developer logo +

    + + +
    + + +
    + + + + + + + + + + + +
    +
    +
    +

    Steem Developer Portal - Resources

    + + + +
    + + + + +
    +

    + + Overview + + +

    + + +

    Steem has an active developer community that is constantly innovating on the blockchain. +While the their presence on this page doesn’t constitute endorsement, +it’s likely a few of these projects could be beneficial for your Steem idea.

    + +
    + +
    +

    + + Client Libraries + + +

    + + +

    Radiator - https://github.com/inertia186/radiator

    + +

    Radiator is a Ruby API client to interact with the steem blockchain.

    + +
    + +

    Steem-JS - https://github.com/steemit/steem-js

    + +

    Pure JavaScript Steem crypto library for node.js and browsers. Can be used to construct, sign and broadcast transactions in JavaScript.

    + +
    + +

    DSteem - https://github.com/jnordberg/dsteem

    + +

    A Typescript Steem crypto library for node.js and browsers. Steemit Inc also maintains a version of this library

    + +
    + +

    Beem - https://github.com/holgern/beem

    + +

    A python library to interact with the STEEM blockchain. It includes the CLI tool beempy.

    + +
    + +

    PHP Steem - https://github.com/lukestokes/php-steem-tools

    + +

    Various tools and scripts written in PHP for exploring the STEEM blockchain.

    + +
    + +

    SteemJ - https://github.com/marvin-we/steem-java-api-wrapper

    + +

    An API Wrapper for Steem written in Java

    + +
    + +

    GoSteem - https://github.com/go-steem/rpc

    + +

    Golang RPC client library for Steem

    + +
    + +

    SteemClientRS - https://github.com/cyberpunk-ventures/steem-client-rs

    + +

    Client library for Steem blockchain built with Rust

    + + +
    + +
    +

    + + Tools + + +

    + + +

    ChainSync - https://github.com/aaroncox/chainsync

    + +

    A simple library to stream blocks and operations for digesting into other mediums.

    + +
    + +

    SteemIAPI - http://steem.esteem.ws/

    + +

    Interactive Steem API swagger, open-source script allows you to interact with blockchain.

    + +
    + +

    SteemSQL - http://www.steemsql.com/

    + +

    A private Microsoft SQL server database with Steem blockchain data, subscription based, allows you to do flexible queries and analyze blockchain data.

    + +
    + +

    eSync - https://github.com/eSteemApp/esync

    + +

    eSync extracts Steem blockchain data and saves into Mongodb, written in Nodejs.

    + +
    + +

    Many more projects and tools can be found at https://steemprojects.com

    + +
    + +
    + +
    +

    + + SteemConnect Libs + + +

    + + +

    Most people who will be implementing OAuth2 will want to find and utilize a library in the language of their choice. These libraries, while not necessarily built by Steemit, should support the SteemConnect API.

    + +

    If you’re wondering what SteemConnect is, go here.

    + +
    + +

    SteemConnect SDK - https://github.com/steemit/steemconnect-sdk

    + +

    An official javascript library for utilizing SteemConnect.

    + +
    + +

    steem-connect-firebase-function - https://jakipatryk.github.io/steemconnect-firebase-functions/

    + +

    A TypeScript library that can help you build applications with SteemConnect and Firebase.

    + +
    + +

    Sc2 SDK PHP - https://github.com/hernandev/sc2-sdk-php

    + +

    Easily integrate STEEM blockchain into your PHP applications, though SteemConnect.

    + +
    + +

    Social Auth SteemConnect - https://pypi.python.org/pypi/social-auth-steemconnect/0.0.2

    + +

    Pluggable authentication backend for python-social-auth, that allows authentication via SteemConnect (v2).

    + +
    + +

    steemconnect-python-client - https://github.com/emre/steemconnect-python-client

    + +

    steemconnect-python-client is a simple yet powerful library to interact with the Steemconnect.

    + +
    + +

    omniauth-steemconnect - https://rubygems.org/gems/omniauth-steemconnect/versions/0.1.0

    + +

    Ruby Omniauth2 Strategy for SteemConnect.

    + +
    + +

    SwiftyConnect - https://github.com/caspernikus/SwiftyConnect

    + +

    SteemConnect Library for iOS / Swift.

    + +
    + +

    SteemConnect4j - https://github.com/hapramp/steemconnect4j

    + +

    Steemconnect SDK for Java.

    + +
    + +
    +

    + + Community & Help + + +

    + + +

    Developer Advocate

    + +

    The members of the Steemit Inc. development team are currently the main contributors to the Steem blockchain software. They oversee the open source Steem GitHub repository, and maintain many of the open source libraries that developers use.

    + +

    Steemit’s Developer Advocate is here to make the process of developing for the Steem platform as smooth as possible. If you have any comments, concerns, or suggestions about how to improve the experience of developing applications with the Steem blockchain - please reach out.

    + +

    The D.A. receives a lot of emails, but will respond as quickly as possible.

    + +
    + +

    SteemDevs Chat - https://discord.gg/B29Bbng

    + +

    SteemDevs chat is a public Discord chat community where members of the Steem development community go to discuss Steem development, and other related topics. +It is a great place to go to ask questions, meet other developers that are working on Steem projects, share tips and code snippets, and discuss the items you are working on.

    + + +
    + + + +
    + + + + + + + + diff --git a/docs/resources/overview.html b/docs/resources/overview.html new file mode 100644 index 0000000000000000000000000000000000000000..dc6d247a91e49c8dcdde67a9cb8ee88b9370ced5 --- /dev/null +++ b/docs/resources/overview.html @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + + +Overview | Steem Developer + + + + + + + + + + + + + + + +
    +

    + + Steem Developer logo +

    + + +
    + + +
    + + + + + + + + + + + +
    +
    +
    +

    Steem Developer Portal

    + + + +
    +

    Steem has an active developer community that is constantly innovating on the blockchain. +While the their presence on this page doesn’t constitute endorsement, +it’s likely a few of these projects could be beneficial for your Steem idea.

    + +
    + + + + + + + + diff --git a/docs/resources/steem_connect_libs.html b/docs/resources/steem_connect_libs.html new file mode 100644 index 0000000000000000000000000000000000000000..35f84d0f9172e3ac7324354de078f8dc5554f509 --- /dev/null +++ b/docs/resources/steem_connect_libs.html @@ -0,0 +1,378 @@ + + + + + + + + + + + + + + + + + + +SteemConnect Libs | Steem Developer + + + + + + + + + + + + + + + +
    +

    + + Steem Developer logo +

    + + +
    + + +
    + + + + + + + + + + + +
    +
    +
    +

    Steem Developer Portal

    + + + +
    +

    Most people who will be implementing OAuth2 will want to find and utilize a library in the language of their choice. These libraries, while not necessarily built by Steemit, should support the SteemConnect API.

    + +

    If you’re wondering what SteemConnect is, go here.

    + +
    + +

    SteemConnect SDK - https://github.com/steemit/steemconnect-sdk

    + +

    An official javascript library for utilizing SteemConnect.

    + +
    + +

    steem-connect-firebase-function - https://jakipatryk.github.io/steemconnect-firebase-functions/

    + +

    A TypeScript library that can help you build applications with SteemConnect and Firebase.

    + +
    + +

    Sc2 SDK PHP - https://github.com/hernandev/sc2-sdk-php

    + +

    Easily integrate STEEM blockchain into your PHP applications, though SteemConnect.

    + +
    + +

    Social Auth SteemConnect - https://pypi.python.org/pypi/social-auth-steemconnect/0.0.2

    + +

    Pluggable authentication backend for python-social-auth, that allows authentication via SteemConnect (v2).

    + +
    + +

    steemconnect-python-client - https://github.com/emre/steemconnect-python-client

    + +

    steemconnect-python-client is a simple yet powerful library to interact with the Steemconnect.

    + +
    + +

    omniauth-steemconnect - https://rubygems.org/gems/omniauth-steemconnect/versions/0.1.0

    + +

    Ruby Omniauth2 Strategy for SteemConnect.

    + +
    + +

    SwiftyConnect - https://github.com/caspernikus/SwiftyConnect

    + +

    SteemConnect Library for iOS / Swift.

    + +
    + +

    SteemConnect4j - https://github.com/hapramp/steemconnect4j

    + +

    Steemconnect SDK for Java.

    + +
    + + + + + + + + diff --git a/docs/resources/tools.html b/docs/resources/tools.html new file mode 100644 index 0000000000000000000000000000000000000000..2071eef340d64c1dc1962e733a8fc883081ee673 --- /dev/null +++ b/docs/resources/tools.html @@ -0,0 +1,354 @@ + + + + + + + + + + + + + + + + + + +Tools | Steem Developer + + + + + + + + + + + + + + + +
    +

    + + Steem Developer logo +

    + + +
    + + +
    + + + + + + + + + + + +
    +
    +
    +

    Steem Developer Portal

    + + + +
    +

    ChainSync - https://github.com/aaroncox/chainsync

    + +

    A simple library to stream blocks and operations for digesting into other mediums.

    + +
    + +

    SteemIAPI - http://steem.esteem.ws/

    + +

    Interactive Steem API swagger, open-source script allows you to interact with blockchain.

    + +
    + +

    SteemSQL - http://www.steemsql.com/

    + +

    A private Microsoft SQL server database with Steem blockchain data, subscription based, allows you to do flexible queries and analyze blockchain data.

    + +
    + +

    eSync - https://github.com/eSteemApp/esync

    + +

    eSync extracts Steem blockchain data and saves into Mongodb, written in Nodejs.

    + +
    + +

    Many more projects and tools can be found at https://steemprojects.com

    + +
    + +
    + + + + + + + + diff --git a/docs/robots.txt b/docs/robots.txt new file mode 100644 index 0000000000000000000000000000000000000000..0d9639652946c55640bd4540ae96614d9c72822f --- /dev/null +++ b/docs/robots.txt @@ -0,0 +1 @@ +Sitemap: https://developers.steem.io/sitemap.xml diff --git a/docs/search/index.html b/docs/search/index.html new file mode 100644 index 0000000000000000000000000000000000000000..2f9c1ad166071fac3c3c0c24b0b71b399f87046d --- /dev/null +++ b/docs/search/index.html @@ -0,0 +1,2617 @@ + + + + + + + + + + + + + + + + + + +Search | Steem Developer + + + + + + + + + + + + + + + +
    +

    + + Steem Developer logo +

    + + +
    + + +
    + + + + + + + + + + + +
    +
    +
    +

    Steem Developer Portal

    + + + +
    +
    +

    Search Results

    + +

    Loading results

    +
      +
      + + + + + + + +
      + + + + + + + + diff --git a/docs/services/imageHoster.html b/docs/services/imageHoster.html new file mode 100644 index 0000000000000000000000000000000000000000..0ddfd33a56e0d485d4597223dbc1d7c599008856 --- /dev/null +++ b/docs/services/imageHoster.html @@ -0,0 +1,447 @@ + + + + + + + + + + + + + + + + + + +ImageHoster | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +

      Definition

      + +

      Imagehoster is a Steem-powered image hosting and proxying service. Any image uploaded to, or proxied through, your Imagehoster has a copy stored within it. This means that the image continues to be available even if 3rd party sites go down or change their URLs. For as long as your instance of imagehoster is running the image will be available, anytime you need it.

      + +

      The purpose of this tool is to provide a way to host and proxy images used by condenser to help maintain the privacy of the authors and general users accessing the images.

      + +

      Using ImageHoster will help limit access to IP addresses of the general user. It will also strip image metadata related to the author’s geographical location. It also helps to verify that the original author uploaded the image they intended.

      + +

      The ability to upload images on steemit.com was originally added in January, 2017. Please note that this tool does not store any image data on the blockchain.

      + +

      Detaied information on Imagehoster can be found in its repository

      + +

      The API

      + +

      Below are examples of how to process images with the API

      + +
        +
      1. Upload an image
      2. +
      3. Fetch an uploaded image
      4. +
      5. Proxy and resize an image
      6. +
      7. Get user avatar image
      8. +
      9. Signing uploads
      10. +
      11. How to run
      12. +
      + +

      1. Upload an image

      + +

      POST /<username>/<signature>

      + +

      This returns a JSON object container the URL to the uploaded image, ex:

      + +
      {
      +    "url": "https://images.example.com/DQmZi174Xz96UrRVBMNRHb6A2FfU3z1HRPwPPQCgSMgdiUT/test.jpg"
      +}
      +
      + +

      For this to succeed it requires a signature from a Steem account in good standing.

      + +

      2. Fetch an uploaded image

      + +

      GET /<image_hash>/<filename>

      + +

      This downloads a previously uploaded image.

      + +

      <filename> is optional but can be provided to help users and applications understand the content type (Content-Type header will still always reflect actual image type)

      + +

      3. Proxy and resize an image

      + +

      GET /<width>x<hight>/<image_url>

      + +

      This downloads and serves the provided image_url. Something to note is that a copy will be taken of the image and will be served on subsequent requests, so even if the upstream is removed or changes, you will still get the original from the proxy endpoint.

      + +

      <width> and <height> can be set to 0 to preserve the image’s dimensions, if they are >0 the image will be aspect resized (down-sample only) to fit.

      + +

      4. Get user avatar image

      + +

      GET /u/<username>/avatar/<size>

      + +

      This presents the avatar for username. If no avatar is set, a default image will be served. This default is set in the service config.

      + +

      The sizes are:

      +
        +
      • small - 64x64
      • +
      • medium - 128x128
      • +
      • large - 512x512
      • +
      + +

      The avatars follow the same sizing rules as proxied images, so you not guaranteed to get a square image, just an image fitting inside of the size square

      + +

      5. Signing uploads

      + +

      Uploads also require a signature made by a Steem account’s posting authority. The account has to also be above a certain (service configurable) reputation threshold.

      + +

      Creating a signature for node.js and with dsteem:

      + +
      const dsteem = require('dsteem')
      +const crypto = require('crypto')
      +const fs = require('fs')
      +
      +const [wif, file] = process.argv.slice(2)
      +
      +if (!wif || !file) {
      +    process.stderr.write(`Usage: ./sign.js <posting_wif> <file>\n`)
      +    process.exit(1)
      +}
      +
      +const data = fs.readFileSync(file)
      +const key = dsteem.PrivateKey.fromString(wif)
      +const imageHash = crypto.createHash('sha256')
      +    .update('ImageSigningChallenge')
      +    .update(data)
      +    .digest()
      +
      +process.stdout.write(key.sign(imageHash).toString() + '\n')
      +
      + +

      6. How to run

      + +

      This imagehoster demo must be run through linux due to a dependency on the make commandline. +You will also require node.js and yarn to run

      + +
        +
      • +

        git clone https://github.com/steemit/imagehoster

        +
      • +
      • +

        Run make devserver

        +
      • +
      + +

      This will pull in all dependencies and spin up a hot-reloading development server. From there the HTTP methods can be used to alter the image loaded from the <./test> module.

      + +
        +
      • Run make lint to load the autolinter.
      • +
      • Run make test to run the unit tests for the active functions.
      • +
      + +

      Default configuration variables are in <./config/defailt.toml> and can be overridden by environment variables as definded in <./config/custom-enfironment-variables.toml>

      + +

      The load order for the config files are: env vars > config/$NODE_ENV.toml > config/default.toml

      + +
      + + + + + + + + diff --git a/docs/services/index.html b/docs/services/index.html new file mode 100644 index 0000000000000000000000000000000000000000..1494a085976117cd003733a08b6eb8f35fdfc0db --- /dev/null +++ b/docs/services/index.html @@ -0,0 +1,1265 @@ + + + + + + + + + + + + + + + + + + +Services | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal - Services

      + + + +
      + + + + +
      +

      + + Steemit.com + + +

      + + +

      steemit.com endpoints

      + +

      Steemit.com offers a few endpoints for getting common data. User profile and post JSON data is very convenient and simple by appending .json +to your request.

      + +

      Getting a particular user profile JSON:

      + +
      https://steemit.com/@curie.json
      +
      + +

      User object

      +
      {
      +   "user":{
      +      "id":81544,
      +      "name":"curie",
      +      "owner":{
      +         "weight_threshold":1,
      +         "account_auths":[],
      +         "key_auths":[["STM69WGR1yhUdKrnzwQLDPnXrW9kaAERwHze8Uvtw2ecgRqCEjWxT", 1]]
      +      },
      +      "active":{
      +         "weight_threshold":1,
      +         "account_auths":[],
      +         "key_auths":[["STM5GAbbS84ViMEouJL3LKcM8VZzPejn68AfPaYaLZZDdmy98kwU5", 1]]
      +      },
      +      "posting":{
      +         "weight_threshold":1,
      +         "account_auths":[["steemauto", 1]],
      +         "key_auths":[["STM5cmuKw6EPkZWeVNXcZorKtattZTX5wSopcRb4xNe6VhRKjETgv", 1]]
      +      },
      +      "memo_key":"STM7ZBi61xYz1b9STE1PHcAraPXJbvafzge3AcPjcfeq4XkKtM2At",
      +      "json_metadata":{
      +         "profile":{
      +            "profile_image":"https://i.imgur.com/Mjewc66.jpg",
      +            "name":"Curie",
      +            "about":"Discovering exceptional content. ",
      +            "location":"Worldwide",
      +            "website":"http://curiesteem.com"
      +         }
      +      },
      +      "proxy":"",
      +      "last_owner_update":"1970-01-01T00:00:00",
      +      "last_account_update":"2018-02-28T14:21:24",
      +      "created":"2016-09-02T10:44:24",
      +      "mined":false,
      +      "recovery_account":"anonsteem",
      +      "last_account_recovery":"1970-01-01T00:00:00",
      +      "reset_account":"null",
      +      "comment_count":0,
      +      "lifetime_vote_count":0,
      +      "post_count":1042,
      +      "can_vote":true,
      +      "voting_power":8927,
      +      "last_vote_time":"2018-06-21T19:42:33",
      +      "balance":"24.519 STEEM",
      +      "savings_balance":"0.000 STEEM",
      +      "sbd_balance":"36.736 SBD",
      +      "sbd_seconds":"11732264931",
      +      "sbd_seconds_last_update":"2018-06-21T19:35:00",
      +      "sbd_last_interest_payment":"2018-06-15T14:05:03",
      +      "savings_sbd_balance":"0.000 SBD",
      +      "savings_sbd_seconds":"0",
      +      "savings_sbd_seconds_last_update":"1970-01-01T00:00:00",
      +      "savings_sbd_last_interest_payment":"1970-01-01T00:00:00",
      +      "savings_withdraw_requests":0,
      +      "reward_sbd_balance":"0.000 SBD",
      +      "reward_steem_balance":"0.000 STEEM",
      +      "reward_vesting_balance":"481.354811 VESTS",
      +      "reward_vesting_steem":"0.237 STEEM",
      +      "vesting_shares":"128367480.795804 VESTS",
      +      "delegated_vesting_shares":"0.000000 VESTS",
      +      "received_vesting_shares":"17069919.621493 VESTS",
      +      "vesting_withdraw_rate":"9672265.370398 VESTS",
      +      "next_vesting_withdrawal":"2018-06-24T14:01:51",
      +      "withdrawn":0,
      +      "to_withdraw":"125739449815180",
      +      "withdraw_routes":0,
      +      "curation_rewards":79730650,
      +      "posting_rewards":168964559,
      +      "proxied_vsf_votes":["1753316906111", 0, 0, 0],
      +      "witnesses_voted_for":1,
      +      "last_post":"2018-06-21T18:06:57",
      +      "last_root_post":"2018-06-19T13:16:15",
      +      "average_bandwidth":"540385456623",
      +      "lifetime_bandwidth":"33717478000000",
      +      "last_bandwidth_update":"2018-06-21T19:42:33",
      +      "average_market_bandwidth":"83841450748",
      +      "lifetime_market_bandwidth":"8042800000000",
      +      "last_market_bandwidth_update":"2018-06-19T04:21:42",
      +      "vesting_balance":"0.000 STEEM",
      +      "reputation":"418378051905700",
      +      "transfer_history":[],
      +      "market_history":[],
      +      "post_history":[],
      +      "vote_history":[],
      +      "other_history":[],
      +      "witness_votes":["curie"],
      +      "tags_usage":[],
      +      "guest_bloggers":[]
      +   },
      +   "status":"200"
      +}
      +
      + +

      Getting a particular post JSON:

      + +
      https://steemit.com/curation/@curie/the-daily-curie-12-13-feb-2017.json
      +
      + +

      Post object

      +
      {
      +   "post":{
      +      "id":1720643,
      +      "author":"curie",
      +      "permlink":"the-daily-curie-08-09-jan-2017",
      +      "category":"curation",
      +      "parent_author":"",
      +      "parent_permlink":"curation",
      +      "title":"The Daily Curie (08-09 Jan 2017)",
      +      "body":"<center>https://s29.postimg.org/dgtsfe7if/curie2.png</center>\n## Introduction\n[Curie](https://steemit.com/steemit/@donkeypong/announcing-project-curie-bringing-rewards-and-recognition-to-steemit-s-undiscovered-and-emerging-authors)  is a commu ...",
      +      "last_update":"2017-01-09T12:20:15",
      +      "created":"2017-01-09T12:20:15",
      +      "active":"2017-01-11T22:44:57",
      +      "last_payout":"2017-02-09T14:40:54",
      +      "depth":0,
      +      "children":36,
      +      "children_rshares2":"0",
      +      "net_rshares":0,
      +      "abs_rshares":0,
      +      "vote_rshares":0,
      +      "children_abs_rshares":0,
      +      "cashout_time":"1969-12-31T23:59:59",
      +      "max_cashout_time":"1969-12-31T23:59:59",
      +      "total_vote_weight":0,
      +      "reward_weight":10000,
      +      "total_payout_value":"0.000 SBD",
      +      "curator_payout_value":"0.000 SBD",
      +      "author_rewards":0,
      +      "net_votes":519,
      +      "root_comment":1720643,
      +      "mode":"archived",
      +      "max_accepted_payout":"0.000 SBD",
      +      "percent_steem_dollars":10000,
      +      "allow_replies":true,
      +      "allow_votes":true,
      +      "allow_curation_rewards":true,
      +      "url":"/curation/@curie/the-daily-curie-08-09-jan-2017",
      +      "root_title":"The Daily Curie (08-09 Jan 2017)",
      +      "pending_payout_value":"0.000 SBD",
      +      "total_pending_payout_value":"0.000 SBD"
      +   }
      +}
      +
      + +
      + +
      +

      + + SteemConnect + + +

      + + +

      What is SteemConnect?

      + +

      The goal of SteemConnect is to provide a safe way of connecting to the blockchain via 3rd party apps without compromising the security of your private keys and passwords. It’s a simple identity layer built on top of the blockchain allowing users safe access and developers the freedom of not having to handle the authentication system, i.e. managing users’ private keys and encryption. This means that devs won’t have to opensource their projects in order to gain user trust. When connecting to apps in this manner, neither SteemConnect nor the authorised app store the private keys as the posting key is incrypted on your cookie.

      + +

      How SteemConnect is implemented

      + +

      SteemConnect works by granting an access token to the requesting app once the application has been approved. +A full tutorial on how to set up an application, request authorisation and grant access can be found here.

      + +

      Steem Authorisation and OAuth 2

      + +

      The OAuth protocol allows third party apps to grant limited access to an HTTP service, either on behalf of a resource owner or by allowing the app to obtain access on its own behalf. The authorisation is provided without the private key or password of the user being shared with the third party. +Simplified, the process includes the following steps:

      + +
        +
      1. The user is presented with an authorisation link that requests a token from the API
      2. +
      3. The user has to log in to the service to verify their identity whereupon they will be prompted to authorise the application
      4. +
      5. The user is redirected to the application redirect URI along with the access token
      6. +
      + +

      Once the application has an access token, it may use the token to access the user’s account via the API, limited to the scope of access, until the token expires or is revoked. +A full breakdown of OAuth2 and how it applies to SteemIt and SteemConnect can be found here.

      + +

      Useful Links

      + + + +

      For additional material you can refer to the original steemit blog post by busy.org

      + +
      + +
      +

      + + Jussi + + +

      + +

      A reverse proxy that forwards json-rpc requests.

      + + +

      Jussi is a custom-built caching layer for use with steemd and other various services (such as SBDS).

      + +

      The purpose of this document is to help developers and node operators set up their own jussi node within a docker container.

      + +

      Intro

      + +

      Jussi is a reverse proxy that is situation between the API client and the steemd server. It allows node operators to route an API call to nodes that are optimized for the particular call, as if they are all hosted from the same place.

      + +

      Sections

      + + + +

      Installation

      + +
      To run jussi locally:
      + +
      git clone https://github.com/steemit/jussi.git
      +cd jussi
      +docker build -t="$USER/jussi:$(git rev-parse --abbrev-ref HEAD)" .
      +docker run -itp 9000:8080 "$USER/jussi:$(git rev-parse --abbrev-ref HEAD)"
      +
      + +

      Kitematic Example +jussi in a docker container as seen from Kitematic for macOS.

      + +
      Try out your local configuration:
      + +
      curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[8675309], "id":1}' http://localhost:9000
      +
      + +

      See: Running Condenser, Jussi and a new service locally + adding feature flags to Condenser

      + +
      + +

      Adding Upstreams

      + +

      The default DEV_config.json is:

      + +
      {
      +   "limits":{"blacklist_accounts":["non-steemit"]},
      +   "upstreams":[
      +      {
      +         "name":"steemd",
      +         "translate_to_appbase":false,
      +         "urls":[["steemd", "https://steemd.steemitdev.com"]],
      +         "ttls":[
      +            ["steemd", 3],
      +            ["steemd.login_api", -1],
      +            ["steemd.network_broadcast_api", -1],
      +            ["steemd.follow_api", 10],
      +            ["steemd.market_history_api", 1],
      +            ["steemd.database_api", 3],
      +            ["steemd.database_api.get_block", -2],
      +            ["steemd.database_api.get_block_header", -2],
      +            ["steemd.database_api.get_content", 1],
      +            ["steemd.database_api.get_state", 1],
      +            ["steemd.database_api.get_state.params=['/trending']", 30],
      +            ["steemd.database_api.get_state.params=['trending']", 30],
      +            ["steemd.database_api.get_state.params=['/hot']", 30],
      +            ["steemd.database_api.get_state.params=['/welcome']", 30],
      +            ["steemd.database_api.get_state.params=['/promoted']", 30],
      +            ["steemd.database_api.get_state.params=['/created']", 10],
      +            ["steemd.database_api.get_dynamic_global_properties", 1]
      +         ],
      +         "timeouts":[
      +            ["steemd", 5],
      +            ["steemd.network_broadcast_api", 0]
      +         ],
      +         "retries": [
      +            ["steemd", 3],
      +            ["steemd.network_broadcast_api", 0]
      +         ]
      +      },
      +      {
      +         "name":"appbase",
      +         "urls":[["appbase", "https://steemd.steemitdev.com"]],
      +         "ttls":[
      +            ["appbase", -2],
      +            ["appbase.block_api", -2],
      +            ["appbase.database_api", 1]
      +         ],
      +         "timeouts":[
      +            ["appbase", 3],
      +            ["appbase.chain_api.push_block", 0],
      +            ["appbase.chain_api.push_transaction", 0],
      +            ["appbase.network_broadcast_api", 0],
      +            ["appbase.condenser_api.broadcast_block", 0],
      +            ["appbase.condenser_api.broadcast_transaction", 0],
      +            ["appbase.condenser_api.broadcast_transaction_synchronous", 0]
      +         ]
      +      }
      +   ]
      +}
      +
      + +

      Upstreams can be added to the upstreams array:

      + +
      {
      +  "name": "foo",
      +  "urls": [["foo", "https://foo.host.name"]],
      +  "ttls": [["foo", 3]],
      +  "timeouts": [["foo", 5]]
      +}
      +
      + +

      Once the above upstream is added to the local config and docker has been built, the following curl will work:

      + +
      curl -s --data '{"jsonrpc":"2.0", "method":"foo.bar", "params":["baz"], "id":1}' http://localhost:9000
      +
      + +

      Note: if you set translate_to_appbase as true, jussi will do the translation for you and that specific endpoint will work with libraries that don’t yet support appbase.

      + +

      Benefits of jussi

      + +

      Time To Live

      + +

      Jussi can be configured with various TTL (Time To Live) schemes. A TTL is an integer value in seconds. Integers equal to or less than 0 have special meaning. A reasonable set of defaults would be:

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      UpstreamAPIMethodParametersTTL (seconds)
      steemdlogin_apiallall-1
      steemdnetwork_broadcast_apiallall-1
      steemdfollow_apiallall10
      steemdmarket_history_apiallall1
      steemddatabase_apiallall3
      steemddatabase_apiget_blockall-2
      steemddatabase_apiget_block_headerall-2
      steemddatabase_apiget_contentall1
      steemddatabase_apiget_stateall1
      steemddatabase_apiget_state'/trending'30
      steemddatabase_apiget_state'trending'30
      steemddatabase_apiget_state'/hot'30
      steemddatabase_apiget_state'/welcome'30
      steemddatabase_apiget_state'/promoted'30
      steemddatabase_apiget_state'/created'10
      steemddatabase_apiget_dynamic_global_propertiesall1
      overseerallallall5
      conveyorallallall-1
      sbdsallallall3
      hivemindallallall3
      yoallallall3
      + +

      In this case, requests for login_api and network_broadcast_api have a TTL of -1, which means requests with those namespaces are not cached, whereas follow_api request have a TTL of 10 seconds.

      + +

      Some methods and parameters have their own TTL that overrides the general default, like database_api.get_block, which overrides database_api.*.

      + +
      Time to Live Special Meaning
      + +
        +
      • 0 won’t expire
      • +
      • -1 won’t be cached
      • +
      • -2 will be cached without expiration only if it is irreversible in terms of blockchain consensus
      • +
      + +

      If you have a local copy of jussi (see: Installation), you can change these defaults by modifying DEV_config.json.

      + +

      Multiple Routes

      + +

      Each urls key can have multiple endpoints for each namespace. For example:

      + +
      {
      +  "urls":[
      +    ["appbase", "https://api.steemitdev.com"]
      +  ]
      +}
      +
      + +

      … can also be expressed as:

      + +
      {
      +  "urls":[
      +    ["appbase","https://api.steemitdev.com"],
      +    ["appbase.condenser_api.get_account_history","https://api-for-account-history.steemitdev.com"],
      +    ["appbase.condenser_api.get_ops_in_block","https://api-for-get-ops-in-block.steemitdev.com"]
      +  ]
      +}
      +
      + +

      In these examples, the methods get_account_history and get_ops_in_block route to a dedicated API endpoint, while the rest of the appbase namespace routes to a common endpoint.

      + +

      Retry

      + +

      Adding a retries element defines the number of retry attempts, where 0 (or absent) means no retry. The maximum number of retries is 3.

      + +

      Note that retrying broadcast methods is not recommended, which is why the example explicitly sets steemd.network_broadcast_api to 0.

      + +

      json-rpc batch

      + +

      Normally, a request is made with a JSON Object ({}). But jussi also supports batch requests, which is constructed with a JSON Array of Objects ([{}]).

      + +

      For example, this would be a typical, non-batched JSON Object request that asks for a single block:

      + +
      curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[1], "id":1}' https://api.steemit.com
      +
      + +
      {
      +   "id":1,
      +   "jsonrpc":"2.0",
      +   "result":{
      +      "previous":"0000000000000000000000000000000000000000",
      +      "timestamp":"2016-03-24T16:05:00",
      +      "witness":"initminer",
      +      "transaction_merkle_root":"0000000000000000000000000000000000000000",
      +      "extensions":[
      +
      +      ],
      +      "witness_signature":"204f8ad56a8f5cf722a02b035a61b500aa59b9519b2c33c77a80c0a714680a5a5a7a340d909d19996613c5e4ae92146b9add8a7a663eef37d837ef881477313043",
      +      "transactions":[
      +
      +      ],
      +      "block_id":"0000000109833ce528d5bbfb3f6225b39ee10086",
      +      "signing_key":"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX",
      +      "transaction_ids":[
      +
      +      ]
      +   }
      +}
      +
      + +

      To request more than one block using the batch construct, wrap each call in a JSON Array, that asks for two blocks in one request:

      + +
      curl -s --data '[{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[1], "id":1},{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[2], "id":2}]' https://api.steemit.com
      +
      + +
      [
      +   {
      +      "id":1,
      +      "jsonrpc":"2.0",
      +      "result":{
      +         "previous":"0000000000000000000000000000000000000000",
      +         "timestamp":"2016-03-24T16:05:00",
      +         "witness":"initminer",
      +         "transaction_merkle_root":"0000000000000000000000000000000000000000",
      +         "extensions":[
      +
      +         ],
      +         "witness_signature":"204f8ad56a8f5cf722a02b035a61b500aa59b9519b2c33c77a80c0a714680a5a5a7a340d909d19996613c5e4ae92146b9add8a7a663eef37d837ef881477313043",
      +         "transactions":[
      +
      +         ],
      +         "block_id":"0000000109833ce528d5bbfb3f6225b39ee10086",
      +         "signing_key":"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX",
      +         "transaction_ids":[
      +
      +         ]
      +      }
      +   },
      +   {
      +      "id":2,
      +      "jsonrpc":"2.0",
      +      "result":{
      +         "previous":"0000000109833ce528d5bbfb3f6225b39ee10086",
      +         "timestamp":"2016-03-24T16:05:36",
      +         "witness":"initminer",
      +         "transaction_merkle_root":"0000000000000000000000000000000000000000",
      +         "extensions":[
      +
      +         ],
      +         "witness_signature":"1f3e85ab301a600f391f11e859240f090a9404f8ebf0bf98df58eb17f455156e2d16e1dcfc621acb3a7acbedc86b6d2560fdd87ce5709e80fa333a2bbb92966df3",
      +         "transactions":[
      +
      +         ],
      +         "block_id":"00000002ed04e3c3def0238f693931ee7eebbdf1",
      +         "signing_key":"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX",
      +         "transaction_ids":[
      +
      +         ]
      +      }
      +   }
      +]
      +
      + +

      Error responses are returned in the JSON Array response as well. Notice the "WRONG" parameter in the second element. The first block is returned as expected, the second one generates an error.

      + +
      curl -s --data '[{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[1], "id":1},{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":["WRONG"], "id":2}]' https://api.steemit.com
      +
      + +
      [
      +   {
      +      "jsonrpc":"2.0",
      +      "result":{
      +         "previous":"0000000000000000000000000000000000000000",
      +         "timestamp":"2016-03-24T16:05:00",
      +         "witness":"initminer",
      +         "transaction_merkle_root":"0000000000000000000000000000000000000000",
      +         "extensions":[
      +
      +         ],
      +         "witness_signature":"204f8ad56a8f5cf722a02b035a61b500aa59b9519b2c33c77a80c0a714680a5a5a7a340d909d19996613c5e4ae92146b9add8a7a663eef37d837ef881477313043",
      +         "transactions":[
      +
      +         ],
      +         "block_id":"0000000109833ce528d5bbfb3f6225b39ee10086",
      +         "signing_key":"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX",
      +         "transaction_ids":[
      +
      +         ]
      +      },
      +      "id":1
      +   },
      +   {
      +      "jsonrpc":"2.0",
      +      "error":{
      +         "code":-32000,
      +         "message":"Parse Error:Couldn't parse uint64_t",
      +         "data":{
      +            "code":4,
      +            "name":"parse_error_exception",
      +            "message":"Parse Error",
      +            "stack":[
      +               {
      +                  "context":{
      +                     "level":"error",
      +                     "file":"string.cpp",
      +                     "line":113,
      +                     "method":"to_uint64",
      +                     "hostname":"",
      +                     "timestamp":"2018-05-21T18:02:41"
      +                  },
      +                  "format":"Couldn't parse uint64_t",
      +                  "data":{
      +
      +                  }
      +               },
      +               {
      +                  "context":{
      +                     "level":"warn",
      +                     "file":"string.cpp",
      +                     "line":116,
      +                     "method":"to_uint64",
      +                     "hostname":"",
      +                     "timestamp":"2018-05-21T18:02:41"
      +                  },
      +                  "format":"",
      +                  "data":{
      +                     "i":"WRONG"
      +                  }
      +               },
      +               {
      +                  "context":{
      +                     "level":"warn",
      +                     "file":"variant.cpp",
      +                     "line":405,
      +                     "method":"as_uint64",
      +                     "hostname":"",
      +                     "timestamp":"2018-05-21T18:02:41"
      +                  },
      +                  "format":"",
      +                  "data":{
      +                     "*this":"WRONG"
      +                  }
      +               }
      +            ]
      +         }
      +      },
      +      "id":2
      +   }
      +]
      +
      + +

      Footnotes

      + + + +
      + +

      Latin

      + +
      +
      jussi
      +
      +noun
      +
      +declension: 2nd declension
      +gender: neuter
      +
      +Definitions:
      +  1. order, command, decree, ordinance, law
      +
      +
      + +
      + +
      +

      + + ImageHoster + + +

      + + +

      Definition

      + +

      Imagehoster is a Steem-powered image hosting and proxying service. Any image uploaded to, or proxied through, your Imagehoster has a copy stored within it. This means that the image continues to be available even if 3rd party sites go down or change their URLs. For as long as your instance of imagehoster is running the image will be available, anytime you need it.

      + +

      The purpose of this tool is to provide a way to host and proxy images used by condenser to help maintain the privacy of the authors and general users accessing the images.

      + +

      Using ImageHoster will help limit access to IP addresses of the general user. It will also strip image metadata related to the author’s geographical location. It also helps to verify that the original author uploaded the image they intended.

      + +

      The ability to upload images on steemit.com was originally added in January, 2017. Please note that this tool does not store any image data on the blockchain.

      + +

      Detaied information on Imagehoster can be found in its repository

      + +

      The API

      + +

      Below are examples of how to process images with the API

      + +
        +
      1. Upload an image
      2. +
      3. Fetch an uploaded image
      4. +
      5. Proxy and resize an image
      6. +
      7. Get user avatar image
      8. +
      9. Signing uploads
      10. +
      11. How to run
      12. +
      + +

      1. Upload an image

      + +

      POST /<username>/<signature>

      + +

      This returns a JSON object container the URL to the uploaded image, ex:

      + +
      {
      +    "url": "https://images.example.com/DQmZi174Xz96UrRVBMNRHb6A2FfU3z1HRPwPPQCgSMgdiUT/test.jpg"
      +}
      +
      + +

      For this to succeed it requires a signature from a Steem account in good standing.

      + +

      2. Fetch an uploaded image

      + +

      GET /<image_hash>/<filename>

      + +

      This downloads a previously uploaded image.

      + +

      <filename> is optional but can be provided to help users and applications understand the content type (Content-Type header will still always reflect actual image type)

      + +

      3. Proxy and resize an image

      + +

      GET /<width>x<hight>/<image_url>

      + +

      This downloads and serves the provided image_url. Something to note is that a copy will be taken of the image and will be served on subsequent requests, so even if the upstream is removed or changes, you will still get the original from the proxy endpoint.

      + +

      <width> and <height> can be set to 0 to preserve the image’s dimensions, if they are >0 the image will be aspect resized (down-sample only) to fit.

      + +

      4. Get user avatar image

      + +

      GET /u/<username>/avatar/<size>

      + +

      This presents the avatar for username. If no avatar is set, a default image will be served. This default is set in the service config.

      + +

      The sizes are:

      +
        +
      • small - 64x64
      • +
      • medium - 128x128
      • +
      • large - 512x512
      • +
      + +

      The avatars follow the same sizing rules as proxied images, so you not guaranteed to get a square image, just an image fitting inside of the size square

      + +

      5. Signing uploads

      + +

      Uploads also require a signature made by a Steem account’s posting authority. The account has to also be above a certain (service configurable) reputation threshold.

      + +

      Creating a signature for node.js and with dsteem:

      + +
      const dsteem = require('dsteem')
      +const crypto = require('crypto')
      +const fs = require('fs')
      +
      +const [wif, file] = process.argv.slice(2)
      +
      +if (!wif || !file) {
      +    process.stderr.write(`Usage: ./sign.js <posting_wif> <file>\n`)
      +    process.exit(1)
      +}
      +
      +const data = fs.readFileSync(file)
      +const key = dsteem.PrivateKey.fromString(wif)
      +const imageHash = crypto.createHash('sha256')
      +    .update('ImageSigningChallenge')
      +    .update(data)
      +    .digest()
      +
      +process.stdout.write(key.sign(imageHash).toString() + '\n')
      +
      + +

      6. How to run

      + +

      This imagehoster demo must be run through linux due to a dependency on the make commandline. +You will also require node.js and yarn to run

      + +
        +
      • +

        git clone https://github.com/steemit/imagehoster

        +
      • +
      • +

        Run make devserver

        +
      • +
      + +

      This will pull in all dependencies and spin up a hot-reloading development server. From there the HTTP methods can be used to alter the image loaded from the <./test> module.

      + +
        +
      • Run make lint to load the autolinter.
      • +
      • Run make test to run the unit tests for the active functions.
      • +
      + +

      Default configuration variables are in <./config/defailt.toml> and can be overridden by environment variables as definded in <./config/custom-enfironment-variables.toml>

      + +

      The load order for the config files are: env vars > config/$NODE_ENV.toml > config/default.toml

      + +
      + +
      +

      + + SBDS + + +

      + + +

      sbds is a tool for easily querying the data of the Steem Blockchain.

      + +

      While providing direct interfaces to several pluggable storage architectures that may be used for querying the blockchain, sbds may also be used as a lower level API upon which other applications can be built.

      + +

      Docker Hub

      + +
      docker run -d steemit/sbds
      +
      + +

      Python 3

      +
      pip3 install -e git+git@github.com:steemit/sbds.git#egg=sbds
      +
      + +

      Examples

      + +

      Stream blocks 1 to 3450000 from our dev S3 bucket

      +
      sbds checkpoints get-blocks s3://steemit-dev-sbds-checkpoints/gzipped --start 1 --end 3450000
      +
      + +

      Stream blocks 8000000 to the last block from your local copy of our S3 bucket

      +
      sbds checkpoints get-blocks /home/ubuntu/checkpoints/gzipped --start 8000000
      +
      + +

      Stream all blocks from your local copy of our S3 bucket

      + +
      sbds checkpoints get-blocks /home/ubuntu/checkpoints/gzipped
      +
      + +

      Routes

      + +

      Coming soon.

      + +
      + + + +
      + + + + + + + + diff --git a/docs/services/jussi.html b/docs/services/jussi.html new file mode 100644 index 0000000000000000000000000000000000000000..612497617fd00aae880e9dab677b6185a251bdc9 --- /dev/null +++ b/docs/services/jussi.html @@ -0,0 +1,863 @@ + + + + + + + + + + + + + + + + + + +Jussi | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +

      Jussi is a custom-built caching layer for use with steemd and other various services (such as SBDS).

      + +

      The purpose of this document is to help developers and node operators set up their own jussi node within a docker container.

      + +

      Intro

      + +

      Jussi is a reverse proxy that is situation between the API client and the steemd server. It allows node operators to route an API call to nodes that are optimized for the particular call, as if they are all hosted from the same place.

      + +

      Sections

      + + + +

      Installation

      + +
      To run jussi locally:
      + +
      git clone https://github.com/steemit/jussi.git
      +cd jussi
      +docker build -t="$USER/jussi:$(git rev-parse --abbrev-ref HEAD)" .
      +docker run -itp 9000:8080 "$USER/jussi:$(git rev-parse --abbrev-ref HEAD)"
      +
      + +

      Kitematic Example +jussi in a docker container as seen from Kitematic for macOS.

      + +
      Try out your local configuration:
      + +
      curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[8675309], "id":1}' http://localhost:9000
      +
      + +

      See: Running Condenser, Jussi and a new service locally + adding feature flags to Condenser

      + +
      + +

      Adding Upstreams

      + +

      The default DEV_config.json is:

      + +
      {
      +   "limits":{"blacklist_accounts":["non-steemit"]},
      +   "upstreams":[
      +      {
      +         "name":"steemd",
      +         "translate_to_appbase":false,
      +         "urls":[["steemd", "https://steemd.steemitdev.com"]],
      +         "ttls":[
      +            ["steemd", 3],
      +            ["steemd.login_api", -1],
      +            ["steemd.network_broadcast_api", -1],
      +            ["steemd.follow_api", 10],
      +            ["steemd.market_history_api", 1],
      +            ["steemd.database_api", 3],
      +            ["steemd.database_api.get_block", -2],
      +            ["steemd.database_api.get_block_header", -2],
      +            ["steemd.database_api.get_content", 1],
      +            ["steemd.database_api.get_state", 1],
      +            ["steemd.database_api.get_state.params=['/trending']", 30],
      +            ["steemd.database_api.get_state.params=['trending']", 30],
      +            ["steemd.database_api.get_state.params=['/hot']", 30],
      +            ["steemd.database_api.get_state.params=['/welcome']", 30],
      +            ["steemd.database_api.get_state.params=['/promoted']", 30],
      +            ["steemd.database_api.get_state.params=['/created']", 10],
      +            ["steemd.database_api.get_dynamic_global_properties", 1]
      +         ],
      +         "timeouts":[
      +            ["steemd", 5],
      +            ["steemd.network_broadcast_api", 0]
      +         ],
      +         "retries": [
      +            ["steemd", 3],
      +            ["steemd.network_broadcast_api", 0]
      +         ]
      +      },
      +      {
      +         "name":"appbase",
      +         "urls":[["appbase", "https://steemd.steemitdev.com"]],
      +         "ttls":[
      +            ["appbase", -2],
      +            ["appbase.block_api", -2],
      +            ["appbase.database_api", 1]
      +         ],
      +         "timeouts":[
      +            ["appbase", 3],
      +            ["appbase.chain_api.push_block", 0],
      +            ["appbase.chain_api.push_transaction", 0],
      +            ["appbase.network_broadcast_api", 0],
      +            ["appbase.condenser_api.broadcast_block", 0],
      +            ["appbase.condenser_api.broadcast_transaction", 0],
      +            ["appbase.condenser_api.broadcast_transaction_synchronous", 0]
      +         ]
      +      }
      +   ]
      +}
      +
      + +

      Upstreams can be added to the upstreams array:

      + +
      {
      +  "name": "foo",
      +  "urls": [["foo", "https://foo.host.name"]],
      +  "ttls": [["foo", 3]],
      +  "timeouts": [["foo", 5]]
      +}
      +
      + +

      Once the above upstream is added to the local config and docker has been built, the following curl will work:

      + +
      curl -s --data '{"jsonrpc":"2.0", "method":"foo.bar", "params":["baz"], "id":1}' http://localhost:9000
      +
      + +

      Note: if you set translate_to_appbase as true, jussi will do the translation for you and that specific endpoint will work with libraries that don’t yet support appbase.

      + +

      Benefits of jussi

      + +

      Time To Live

      + +

      Jussi can be configured with various TTL (Time To Live) schemes. A TTL is an integer value in seconds. Integers equal to or less than 0 have special meaning. A reasonable set of defaults would be:

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      UpstreamAPIMethodParametersTTL (seconds)
      steemdlogin_apiallall-1
      steemdnetwork_broadcast_apiallall-1
      steemdfollow_apiallall10
      steemdmarket_history_apiallall1
      steemddatabase_apiallall3
      steemddatabase_apiget_blockall-2
      steemddatabase_apiget_block_headerall-2
      steemddatabase_apiget_contentall1
      steemddatabase_apiget_stateall1
      steemddatabase_apiget_state'/trending'30
      steemddatabase_apiget_state'trending'30
      steemddatabase_apiget_state'/hot'30
      steemddatabase_apiget_state'/welcome'30
      steemddatabase_apiget_state'/promoted'30
      steemddatabase_apiget_state'/created'10
      steemddatabase_apiget_dynamic_global_propertiesall1
      overseerallallall5
      conveyorallallall-1
      sbdsallallall3
      hivemindallallall3
      yoallallall3
      + +

      In this case, requests for login_api and network_broadcast_api have a TTL of -1, which means requests with those namespaces are not cached, whereas follow_api request have a TTL of 10 seconds.

      + +

      Some methods and parameters have their own TTL that overrides the general default, like database_api.get_block, which overrides database_api.*.

      + +
      Time to Live Special Meaning
      + +
        +
      • 0 won’t expire
      • +
      • -1 won’t be cached
      • +
      • -2 will be cached without expiration only if it is irreversible in terms of blockchain consensus
      • +
      + +

      If you have a local copy of jussi (see: Installation), you can change these defaults by modifying DEV_config.json.

      + +

      Multiple Routes

      + +

      Each urls key can have multiple endpoints for each namespace. For example:

      + +
      {
      +  "urls":[
      +    ["appbase", "https://api.steemitdev.com"]
      +  ]
      +}
      +
      + +

      … can also be expressed as:

      + +
      {
      +  "urls":[
      +    ["appbase","https://api.steemitdev.com"],
      +    ["appbase.condenser_api.get_account_history","https://api-for-account-history.steemitdev.com"],
      +    ["appbase.condenser_api.get_ops_in_block","https://api-for-get-ops-in-block.steemitdev.com"]
      +  ]
      +}
      +
      + +

      In these examples, the methods get_account_history and get_ops_in_block route to a dedicated API endpoint, while the rest of the appbase namespace routes to a common endpoint.

      + +

      Retry

      + +

      Adding a retries element defines the number of retry attempts, where 0 (or absent) means no retry. The maximum number of retries is 3.

      + +

      Note that retrying broadcast methods is not recommended, which is why the example explicitly sets steemd.network_broadcast_api to 0.

      + +

      json-rpc batch

      + +

      Normally, a request is made with a JSON Object ({}). But jussi also supports batch requests, which is constructed with a JSON Array of Objects ([{}]).

      + +

      For example, this would be a typical, non-batched JSON Object request that asks for a single block:

      + +
      curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[1], "id":1}' https://api.steemit.com
      +
      + +
      {
      +   "id":1,
      +   "jsonrpc":"2.0",
      +   "result":{
      +      "previous":"0000000000000000000000000000000000000000",
      +      "timestamp":"2016-03-24T16:05:00",
      +      "witness":"initminer",
      +      "transaction_merkle_root":"0000000000000000000000000000000000000000",
      +      "extensions":[
      +
      +      ],
      +      "witness_signature":"204f8ad56a8f5cf722a02b035a61b500aa59b9519b2c33c77a80c0a714680a5a5a7a340d909d19996613c5e4ae92146b9add8a7a663eef37d837ef881477313043",
      +      "transactions":[
      +
      +      ],
      +      "block_id":"0000000109833ce528d5bbfb3f6225b39ee10086",
      +      "signing_key":"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX",
      +      "transaction_ids":[
      +
      +      ]
      +   }
      +}
      +
      + +

      To request more than one block using the batch construct, wrap each call in a JSON Array, that asks for two blocks in one request:

      + +
      curl -s --data '[{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[1], "id":1},{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[2], "id":2}]' https://api.steemit.com
      +
      + +
      [
      +   {
      +      "id":1,
      +      "jsonrpc":"2.0",
      +      "result":{
      +         "previous":"0000000000000000000000000000000000000000",
      +         "timestamp":"2016-03-24T16:05:00",
      +         "witness":"initminer",
      +         "transaction_merkle_root":"0000000000000000000000000000000000000000",
      +         "extensions":[
      +
      +         ],
      +         "witness_signature":"204f8ad56a8f5cf722a02b035a61b500aa59b9519b2c33c77a80c0a714680a5a5a7a340d909d19996613c5e4ae92146b9add8a7a663eef37d837ef881477313043",
      +         "transactions":[
      +
      +         ],
      +         "block_id":"0000000109833ce528d5bbfb3f6225b39ee10086",
      +         "signing_key":"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX",
      +         "transaction_ids":[
      +
      +         ]
      +      }
      +   },
      +   {
      +      "id":2,
      +      "jsonrpc":"2.0",
      +      "result":{
      +         "previous":"0000000109833ce528d5bbfb3f6225b39ee10086",
      +         "timestamp":"2016-03-24T16:05:36",
      +         "witness":"initminer",
      +         "transaction_merkle_root":"0000000000000000000000000000000000000000",
      +         "extensions":[
      +
      +         ],
      +         "witness_signature":"1f3e85ab301a600f391f11e859240f090a9404f8ebf0bf98df58eb17f455156e2d16e1dcfc621acb3a7acbedc86b6d2560fdd87ce5709e80fa333a2bbb92966df3",
      +         "transactions":[
      +
      +         ],
      +         "block_id":"00000002ed04e3c3def0238f693931ee7eebbdf1",
      +         "signing_key":"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX",
      +         "transaction_ids":[
      +
      +         ]
      +      }
      +   }
      +]
      +
      + +

      Error responses are returned in the JSON Array response as well. Notice the "WRONG" parameter in the second element. The first block is returned as expected, the second one generates an error.

      + +
      curl -s --data '[{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[1], "id":1},{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":["WRONG"], "id":2}]' https://api.steemit.com
      +
      + +
      [
      +   {
      +      "jsonrpc":"2.0",
      +      "result":{
      +         "previous":"0000000000000000000000000000000000000000",
      +         "timestamp":"2016-03-24T16:05:00",
      +         "witness":"initminer",
      +         "transaction_merkle_root":"0000000000000000000000000000000000000000",
      +         "extensions":[
      +
      +         ],
      +         "witness_signature":"204f8ad56a8f5cf722a02b035a61b500aa59b9519b2c33c77a80c0a714680a5a5a7a340d909d19996613c5e4ae92146b9add8a7a663eef37d837ef881477313043",
      +         "transactions":[
      +
      +         ],
      +         "block_id":"0000000109833ce528d5bbfb3f6225b39ee10086",
      +         "signing_key":"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX",
      +         "transaction_ids":[
      +
      +         ]
      +      },
      +      "id":1
      +   },
      +   {
      +      "jsonrpc":"2.0",
      +      "error":{
      +         "code":-32000,
      +         "message":"Parse Error:Couldn't parse uint64_t",
      +         "data":{
      +            "code":4,
      +            "name":"parse_error_exception",
      +            "message":"Parse Error",
      +            "stack":[
      +               {
      +                  "context":{
      +                     "level":"error",
      +                     "file":"string.cpp",
      +                     "line":113,
      +                     "method":"to_uint64",
      +                     "hostname":"",
      +                     "timestamp":"2018-05-21T18:02:41"
      +                  },
      +                  "format":"Couldn't parse uint64_t",
      +                  "data":{
      +
      +                  }
      +               },
      +               {
      +                  "context":{
      +                     "level":"warn",
      +                     "file":"string.cpp",
      +                     "line":116,
      +                     "method":"to_uint64",
      +                     "hostname":"",
      +                     "timestamp":"2018-05-21T18:02:41"
      +                  },
      +                  "format":"",
      +                  "data":{
      +                     "i":"WRONG"
      +                  }
      +               },
      +               {
      +                  "context":{
      +                     "level":"warn",
      +                     "file":"variant.cpp",
      +                     "line":405,
      +                     "method":"as_uint64",
      +                     "hostname":"",
      +                     "timestamp":"2018-05-21T18:02:41"
      +                  },
      +                  "format":"",
      +                  "data":{
      +                     "*this":"WRONG"
      +                  }
      +               }
      +            ]
      +         }
      +      },
      +      "id":2
      +   }
      +]
      +
      + +

      Footnotes

      + + + +
      + +

      Latin

      + +
      +
      jussi
      +
      +noun
      +
      +declension: 2nd declension
      +gender: neuter
      +
      +Definitions:
      +  1. order, command, decree, ordinance, law
      +
      +
      + +
      + + + + + + + + diff --git a/docs/services/sbds.html b/docs/services/sbds.html new file mode 100644 index 0000000000000000000000000000000000000000..8e12279e69f122e0376acaafba4ebab5b5e57754 --- /dev/null +++ b/docs/services/sbds.html @@ -0,0 +1,358 @@ + + + + + + + + + + + + + + + + + + +SBDS | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +

      sbds is a tool for easily querying the data of the Steem Blockchain.

      + +

      While providing direct interfaces to several pluggable storage architectures that may be used for querying the blockchain, sbds may also be used as a lower level API upon which other applications can be built.

      + +

      Docker Hub

      + +
      docker run -d steemit/sbds
      +
      + +

      Python 3

      +
      pip3 install -e git+git@github.com:steemit/sbds.git#egg=sbds
      +
      + +

      Examples

      + +

      Stream blocks 1 to 3450000 from our dev S3 bucket

      +
      sbds checkpoints get-blocks s3://steemit-dev-sbds-checkpoints/gzipped --start 1 --end 3450000
      +
      + +

      Stream blocks 8000000 to the last block from your local copy of our S3 bucket

      +
      sbds checkpoints get-blocks /home/ubuntu/checkpoints/gzipped --start 8000000
      +
      + +

      Stream all blocks from your local copy of our S3 bucket

      + +
      sbds checkpoints get-blocks /home/ubuntu/checkpoints/gzipped
      +
      + +

      Routes

      + +

      Coming soon.

      + +
      + + + + + + + + diff --git a/docs/services/steemconnect.html b/docs/services/steemconnect.html new file mode 100644 index 0000000000000000000000000000000000000000..eae4f1a4f8c81967cc35a29ed13c4fcc21a118f9 --- /dev/null +++ b/docs/services/steemconnect.html @@ -0,0 +1,358 @@ + + + + + + + + + + + + + + + + + + +SteemConnect | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +

      What is SteemConnect?

      + +

      The goal of SteemConnect is to provide a safe way of connecting to the blockchain via 3rd party apps without compromising the security of your private keys and passwords. It’s a simple identity layer built on top of the blockchain allowing users safe access and developers the freedom of not having to handle the authentication system, i.e. managing users’ private keys and encryption. This means that devs won’t have to opensource their projects in order to gain user trust. When connecting to apps in this manner, neither SteemConnect nor the authorised app store the private keys as the posting key is incrypted on your cookie.

      + +

      How SteemConnect is implemented

      + +

      SteemConnect works by granting an access token to the requesting app once the application has been approved. +A full tutorial on how to set up an application, request authorisation and grant access can be found here.

      + +

      Steem Authorisation and OAuth 2

      + +

      The OAuth protocol allows third party apps to grant limited access to an HTTP service, either on behalf of a resource owner or by allowing the app to obtain access on its own behalf. The authorisation is provided without the private key or password of the user being shared with the third party. +Simplified, the process includes the following steps:

      + +
        +
      1. The user is presented with an authorisation link that requests a token from the API
      2. +
      3. The user has to log in to the service to verify their identity whereupon they will be prompted to authorise the application
      4. +
      5. The user is redirected to the application redirect URI along with the access token
      6. +
      + +

      Once the application has an access token, it may use the token to access the user’s account via the API, limited to the scope of access, until the token expires or is revoked. +A full breakdown of OAuth2 and how it applies to SteemIt and SteemConnect can be found here.

      + +

      Useful Links

      + + + +

      For additional material you can refer to the original steemit blog post by busy.org

      + +
      + + + + + + + + diff --git a/docs/services/steemit.html b/docs/services/steemit.html new file mode 100644 index 0000000000000000000000000000000000000000..bd728fb8ba07069c1ff2504deb6904d89241452d --- /dev/null +++ b/docs/services/steemit.html @@ -0,0 +1,480 @@ + + + + + + + + + + + + + + + + + + +Steemit.com | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +

      steemit.com endpoints

      + +

      Steemit.com offers a few endpoints for getting common data. User profile and post JSON data is very convenient and simple by appending .json +to your request.

      + +

      Getting a particular user profile JSON:

      + +
      https://steemit.com/@curie.json
      +
      + +

      User object

      +
      {
      +   "user":{
      +      "id":81544,
      +      "name":"curie",
      +      "owner":{
      +         "weight_threshold":1,
      +         "account_auths":[],
      +         "key_auths":[["STM69WGR1yhUdKrnzwQLDPnXrW9kaAERwHze8Uvtw2ecgRqCEjWxT", 1]]
      +      },
      +      "active":{
      +         "weight_threshold":1,
      +         "account_auths":[],
      +         "key_auths":[["STM5GAbbS84ViMEouJL3LKcM8VZzPejn68AfPaYaLZZDdmy98kwU5", 1]]
      +      },
      +      "posting":{
      +         "weight_threshold":1,
      +         "account_auths":[["steemauto", 1]],
      +         "key_auths":[["STM5cmuKw6EPkZWeVNXcZorKtattZTX5wSopcRb4xNe6VhRKjETgv", 1]]
      +      },
      +      "memo_key":"STM7ZBi61xYz1b9STE1PHcAraPXJbvafzge3AcPjcfeq4XkKtM2At",
      +      "json_metadata":{
      +         "profile":{
      +            "profile_image":"https://i.imgur.com/Mjewc66.jpg",
      +            "name":"Curie",
      +            "about":"Discovering exceptional content. ",
      +            "location":"Worldwide",
      +            "website":"http://curiesteem.com"
      +         }
      +      },
      +      "proxy":"",
      +      "last_owner_update":"1970-01-01T00:00:00",
      +      "last_account_update":"2018-02-28T14:21:24",
      +      "created":"2016-09-02T10:44:24",
      +      "mined":false,
      +      "recovery_account":"anonsteem",
      +      "last_account_recovery":"1970-01-01T00:00:00",
      +      "reset_account":"null",
      +      "comment_count":0,
      +      "lifetime_vote_count":0,
      +      "post_count":1042,
      +      "can_vote":true,
      +      "voting_power":8927,
      +      "last_vote_time":"2018-06-21T19:42:33",
      +      "balance":"24.519 STEEM",
      +      "savings_balance":"0.000 STEEM",
      +      "sbd_balance":"36.736 SBD",
      +      "sbd_seconds":"11732264931",
      +      "sbd_seconds_last_update":"2018-06-21T19:35:00",
      +      "sbd_last_interest_payment":"2018-06-15T14:05:03",
      +      "savings_sbd_balance":"0.000 SBD",
      +      "savings_sbd_seconds":"0",
      +      "savings_sbd_seconds_last_update":"1970-01-01T00:00:00",
      +      "savings_sbd_last_interest_payment":"1970-01-01T00:00:00",
      +      "savings_withdraw_requests":0,
      +      "reward_sbd_balance":"0.000 SBD",
      +      "reward_steem_balance":"0.000 STEEM",
      +      "reward_vesting_balance":"481.354811 VESTS",
      +      "reward_vesting_steem":"0.237 STEEM",
      +      "vesting_shares":"128367480.795804 VESTS",
      +      "delegated_vesting_shares":"0.000000 VESTS",
      +      "received_vesting_shares":"17069919.621493 VESTS",
      +      "vesting_withdraw_rate":"9672265.370398 VESTS",
      +      "next_vesting_withdrawal":"2018-06-24T14:01:51",
      +      "withdrawn":0,
      +      "to_withdraw":"125739449815180",
      +      "withdraw_routes":0,
      +      "curation_rewards":79730650,
      +      "posting_rewards":168964559,
      +      "proxied_vsf_votes":["1753316906111", 0, 0, 0],
      +      "witnesses_voted_for":1,
      +      "last_post":"2018-06-21T18:06:57",
      +      "last_root_post":"2018-06-19T13:16:15",
      +      "average_bandwidth":"540385456623",
      +      "lifetime_bandwidth":"33717478000000",
      +      "last_bandwidth_update":"2018-06-21T19:42:33",
      +      "average_market_bandwidth":"83841450748",
      +      "lifetime_market_bandwidth":"8042800000000",
      +      "last_market_bandwidth_update":"2018-06-19T04:21:42",
      +      "vesting_balance":"0.000 STEEM",
      +      "reputation":"418378051905700",
      +      "transfer_history":[],
      +      "market_history":[],
      +      "post_history":[],
      +      "vote_history":[],
      +      "other_history":[],
      +      "witness_votes":["curie"],
      +      "tags_usage":[],
      +      "guest_bloggers":[]
      +   },
      +   "status":"200"
      +}
      +
      + +

      Getting a particular post JSON:

      + +
      https://steemit.com/curation/@curie/the-daily-curie-12-13-feb-2017.json
      +
      + +

      Post object

      +
      {
      +   "post":{
      +      "id":1720643,
      +      "author":"curie",
      +      "permlink":"the-daily-curie-08-09-jan-2017",
      +      "category":"curation",
      +      "parent_author":"",
      +      "parent_permlink":"curation",
      +      "title":"The Daily Curie (08-09 Jan 2017)",
      +      "body":"<center>https://s29.postimg.org/dgtsfe7if/curie2.png</center>\n## Introduction\n[Curie](https://steemit.com/steemit/@donkeypong/announcing-project-curie-bringing-rewards-and-recognition-to-steemit-s-undiscovered-and-emerging-authors)  is a commu ...",
      +      "last_update":"2017-01-09T12:20:15",
      +      "created":"2017-01-09T12:20:15",
      +      "active":"2017-01-11T22:44:57",
      +      "last_payout":"2017-02-09T14:40:54",
      +      "depth":0,
      +      "children":36,
      +      "children_rshares2":"0",
      +      "net_rshares":0,
      +      "abs_rshares":0,
      +      "vote_rshares":0,
      +      "children_abs_rshares":0,
      +      "cashout_time":"1969-12-31T23:59:59",
      +      "max_cashout_time":"1969-12-31T23:59:59",
      +      "total_vote_weight":0,
      +      "reward_weight":10000,
      +      "total_payout_value":"0.000 SBD",
      +      "curator_payout_value":"0.000 SBD",
      +      "author_rewards":0,
      +      "net_votes":519,
      +      "root_comment":1720643,
      +      "mode":"archived",
      +      "max_accepted_payout":"0.000 SBD",
      +      "percent_steem_dollars":10000,
      +      "allow_replies":true,
      +      "allow_votes":true,
      +      "allow_curation_rewards":true,
      +      "url":"/curation/@curie/the-daily-curie-08-09-jan-2017",
      +      "root_title":"The Daily Curie (08-09 Jan 2017)",
      +      "pending_payout_value":"0.000 SBD",
      +      "total_pending_payout_value":"0.000 SBD"
      +   }
      +}
      +
      + +
      + + + + + + + + diff --git a/docs/siteicon.png b/docs/siteicon.png new file mode 100644 index 0000000000000000000000000000000000000000..fed4b7deb8faf6ae194f44bf1a50c359343a3923 Binary files /dev/null and b/docs/siteicon.png differ diff --git a/docs/sitemap.xml b/docs/sitemap.xml new file mode 100644 index 0000000000000000000000000000000000000000..cf87a1bf06098affc0e5876b1d7e1c2d7da7256f --- /dev/null +++ b/docs/sitemap.xml @@ -0,0 +1,567 @@ + + + +https://developers.steem.io/apidefinitions/account-by-key-api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/account-history-api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/block-api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/broadcast-ops-comment +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/broadcast-ops +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/condenser-api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/database-api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/debug-node-api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/follow-api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/jsonrpc +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/market-history-api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/network-broadcast-api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/rc-api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/tags-api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/apidefinitions/witness-api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/glossary/api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/glossary/chain_basics +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/glossary/governance +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/glossary/index +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/glossary/market +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/glossary/transactions +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/introduction/welcome +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/quickstart/choose_library +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/quickstart/steemd_nodes +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/quickstart/testnet +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/resources/client_libs +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/resources/developeradvocate +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/resources/overview +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/resources/steem_connect_libs +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/resources/tools +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/services/imageHoster +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/services/jussi +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/services/sbds +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/services/steemconnect +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/services/steemit +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/testnet/index +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/testnet/tools +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials/index +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/account_reputation +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/blog_feed +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/claim_rewards +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/client_signing +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/convert_sbd_to_steem +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/create_account +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/delegate_power +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/edit_content_patching +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/follow_a_user +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/get_account_comments +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/get_account_replies +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/get_delegations_by_user +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/get_follower_and_following_list +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/get_post_comments +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/get_post_details +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/get_posts +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/get_state_replacement_api +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/get_voters_list_on_post +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/getting_started +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/grant_active_permission +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/grant_posting_permission +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/power_down +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/power_up_steem +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/reblogging_post +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/search_accounts +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/search_tags +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/set_withdraw_route +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/steemconnect +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/stream_blockchain_transactions +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/submit_comment_reply +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/submit_post +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/transfer_steem_and_sbd +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/vote_on_content +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-javascript/witness_listing_and_voting +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/account_recovery +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/account_reputation +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/claim_rewards +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/convert_sbd_to_steem +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/delegate_power +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/edit_content_patching +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/follow_a_user +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/get_account_comments +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/get_account_replies +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/get_delegations_by_user +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/get_follower_and_following_list +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/get_post_comments +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/get_post_details +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/get_posts +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/get_voters_list_on_post +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/getting_started +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/grant_active_permission +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/grant_posting_permission +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/password_key_change +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/power_down +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/power_up_steem +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/reblogging_post +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/search_accounts +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/search_tags +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/stream_blockchain_transactions +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/submit_comment_reply +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/submit_post +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/transfer_steem_and_sbd +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/transfer_steem_and_sbd_to_savings_balance +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/using_keys_securely +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/vote_on_content +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-python/witness_listing_and_voting +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-recipes/account-creation-process +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-recipes/calculate_rc_recipe +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-recipes/estimate_upvote +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-recipes/forum-market-bandwidth +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-recipes/jussi-multiplexer +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-recipes/plugin_and_api_list +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-recipes/understanding-configuration-values +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-recipes/understanding-dynamic-global-properties +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-recipes/vest-to-steem +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-recipes/virtual-operations-when-streaming-blockchain-transactions +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/blog_feed +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/edit_content_patching +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/follow_another_user +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/get_account_comments +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/get_account_replies +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/get_follower_and_following_list +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/get_post_comments +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/get_post_details +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/get_posts +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/get_voters_list_on_post +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/getting_started +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/reblogging_post +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/search_accounts +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/search_tags +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/stream_blockchain_transactions +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/submit_comment_reply +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/submit_post +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/tutorials-ruby/vote_on_content +2018-11-15T17:18:46-06:00 + + +https://developers.steem.io/CONTRIBUTING + + +https://developers.steem.io/apidefinitions/ + + +https://developers.steem.io/unused/community + + +https://developers.steem.io/unused/database_api + + +https://developers.steem.io/unused/docker + + +https://developers.steem.io/ + + +https://developers.steem.io/quickstart/ + + +https://developers.steem.io/resources/ + + +https://developers.steem.io/services/ + + +https://developers.steem.io/unused/steemd + + +https://developers.steem.io/unused/tags + + +https://developers.steem.io/unused/tutorials + + diff --git a/docs/testnet/index.html b/docs/testnet/index.html new file mode 100644 index 0000000000000000000000000000000000000000..c83f0d14bd7f70778ce83af16196eda3b893866a --- /dev/null +++ b/docs/testnet/index.html @@ -0,0 +1,408 @@ + + + + + + + + + + + + + + + + + + +Steem Testnet | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + Steem Testnet + + +

      + + +

      Steem blockchain software is written in C++ and in order to modify the source code you need some understanding of the C++ programming language. Each Steem node runs an instance of this software, so in order to test your changes, you will need to know how to install dependencies which can be found in the Steem repo. This also means that some knowledge of System administration is also required. There are multiple advantages of running a testnet, you can test your scripts or applications on a testnet without extra spam on the live network, which allows much more flexibility to try new things. +Having access to a testnet also helps you to work on new features and possibly submit new or improved pull requests to official the Steem GitHub repository.

      + +

      Running Testnet

      + +

      By following official build steps and enabling the BUILD_STEEM_TESTNET flag during compilation, you should be able to run the Steem Testnet locally on your workstation and join the development testnet. Docker can also be used to get started quickly. Compilation generates the steemd executable which is the main daemon for the Steem network. Additional cli_wallet can also be compiled to test/connect to an instance of steemd and request some data from the network, but it is not necessary to run a node.

      + +

      The development testnet requires a certain minimum set of hardware requirements, depending on the type of compile flags that have been enabled. Because it is a mirror of the live network, private keys are the same for accounts up to the point of the snapshot timestamp of the testnet.

      + +

      Joining/Running the development testnet requires around 10 GB for block log on an SSD and 8 GB RAM. The CPU requirements are the same.

      + +

      Testnet has the following parameters by default (as of this writing):

      + +
        +
      • Initial supply (250 billion) - STEEM_INIT_SUPPLY 250,000,000,000
      • +
      • Max number of blocks to be produced - TESTNET_BLOCK_LIMIT 3,000,000
      • +
      • Address prefix, prefix on public addresses - STEEM_ADDRESS_PREFIX "TST"
      • +
      • Chain id name, used for chain id - STEEM_CHAIN_ID_NAME "testnet"
      • +
      • Chain id, unique id hash of chain - STEEM_CHAIN_ID (fc::sha256::hash(STEEM_CHAIN_ID_NAME))
      • +
      • Public key of genesis account - STEEM_INIT_PUBLIC_KEY_STR
      • +
      • Account creation fee - STEEM_MIN_ACCOUNT_CREATION_FEE 0
      • +
      + +

      There are a number of other subtle changes that we don’t need to focus on right now.

      + +

      Live testnet

      + +
        +
      • ChainID: 46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32
      • +
      • Address prefix: TST
      • +
      • API node: https://testnet.steemitdev.com
      • +
      + +

      Anyone can join the Live testnet and start testing their node and applications, become a witness, and provide API (RPC) node for public use.

      + +

      Custom Testnet

      + +

      In order to create a custom testnet, separate from the development one, we need to modify a few parameters mentioned in the previous section.

      + +

      In the file named steem/libraries/protocol/include/steem/protocol/config.hpp, we can see the first few lines dedicated to the Testnet section. The line starts with #ifdef IS_TEST_NET.

      + +

      Let’s say we want to create a custom testnet with an initial supply of 1,000,000 STEEM. We can change STEEM_INIT_SUPPLY 1,000,000 and by changing STEEM_CHAIN_ID_NAME "testnet", testnet to mytestnet we will automatically get a unique Chain ID for our testnet. The address prefix can be set to something like MTN and of course, we need to change the public and private keys to the genesis account. Note that the genesis account will receive the entire pre-mined supply of 1,000,000. That way, you can execute a setup script to fund any newly created accounts. Such a custom testnet will not have any additional hardware requirements to run.

      + +

      A minimum of 8GB RAM should be sufficient to run a custom testnet. Currently, Steem only has Linux and Mac compiling guides to build. A testnet can either be hosted locally, on a rented AWS, or dedicated bare metal servers so one can start testing functionality, explore different APIs, and start developing.

      + +

      One more crucial point to modify is to change the number of witnesses required to accept hardforks for a custom testnet, by default it is set to 17, we can change it to 1 STEEM_HARDFORK_REQUIRED_WITNESSES 1 so that only one node instance would be sufficient and the network will be still functional and fast.

      + +

      Another thing to note is that you can start a new chain with all previous hardforks already accepted, by changing the file named steem/blob/master/libraries/chain/database.cpp with the following function:

      + +

      void database::init_genesis( uint64_t init_supply ) inside try add this line:

      + +

      set_hardfork( 19, true );

      + +

      This would mean that 19 hardforks have been accepted by witnesses and the new chain will start with all previous forks included.

      + +

      After these changes, all we have to do is compile the source code and get the steemd executable. And once we fire up the custom testnet we can start testing and experimenting.

      + +

      If you want to port some data from Steem main network you can use Tinman, also developed by Steemit, to help with taking snapshots of the main network.

      + +

      Custom live testnet

      + +
        +
      • ChainID: 79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673
      • +
      • Address prefix: STX
      • +
      • API node: https://testnet.steem.vc
      • +
      + +

      The above testnet is powered by community member @almost-digital and doesn’t have a snapshot of the main network.

      + +
      + +
      + + + + + + + + diff --git a/docs/testnet/tools.html b/docs/testnet/tools.html new file mode 100644 index 0000000000000000000000000000000000000000..8af8538bd11a224aba5902341050ae281a0ba0b3 --- /dev/null +++ b/docs/testnet/tools.html @@ -0,0 +1,354 @@ + + + + + + + + + + + + + + + + + + +Tools | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + +
      Testnet IDToolPurpose
      46d82abSteemit, Inc. Live Testnet EndpointFor anyone who wants to start testing their node and applications.
      79276aetestnet.steem.vcGeneral bootstrapping to testnet.steem.vc maintained maintained by @almost-digital.
      79276aeTestNET CondenserA condenser instance for testnet.steem.vc.
      + + +
      + + + + + + + + diff --git a/docs/touch-icon.png b/docs/touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..624d181cf367c34e74e15e4a24c5f168135dfa55 Binary files /dev/null and b/docs/touch-icon.png differ diff --git a/docs/tutorial_structure.md b/docs/tutorial_structure.md new file mode 100644 index 0000000000000000000000000000000000000000..08fdfc0ff8458ad093e8951860cd2371c7e02bc2 --- /dev/null +++ b/docs/tutorial_structure.md @@ -0,0 +1,119 @@ +# Tutorial & Recipe Structure + +This document describes the general structure of the README.md of each tutorial found in repositories that this site imports into its tutorials section. + +If you're contributing a tutorial to one of those repositories, it's much more likely to be accepted if it conforms to these guidelines. + +Use [devportal#46](https://github.com/steemit/devportal/issues/46) as partial reference where this doc is ambiguous (referred to after as `46`). + +**Please note that all visible is contained in the STRUCTURE section.** + +## PURPOSE +Tutorials must be focused on a specific task, practice, or theory. The consumer of the tutorial should come away with enough knowledge to perform the task, follow the practice, understand the theory. + +--- + +## README.md +Begin `README.md` guidance + +### IMAGES +* Should be no more than 800px wide. +* Must go in `${tutorial dir}/images/` +* There should be at least one image per tutorial + +### STRUCTURE + +#### Top section +There are three elements +1. **Main tutorial title** The title is the topic & focus. Suitable for a table of contents. Use `# ` +1. **Skill aquired paragraph** Defines clearly the knowledge/skill aquired by successfully + completing the tutorial. One sentence long. +1. **Description paragraph** The description goes into greater detail. It is intended to + help the consumer decide if the tutorial is appropriate for consumption. This may + include examples of applicability (where the operation(s) in this tutorial would be + useful) If there are areas of likely interest that the tutorial does *not* cover, + that is explained as well. + +#### Intro +* Titled with `## Intro` One or two paragraphs that give context and background. This + section gives users who are interested some of the philosophical points of what the + tutorial is doing, or should do. + + +#### LIST OF STEPS/OPERATIONS IN THE TUTORIAL +* This section is titled `## Steps` +* If there are 2 or more steps to the tutorial an in-order, + titled and numbered list of steps (must use `1.` for each step). + A brief description is recommended but not needed. If there are + 'complication' scenarios as described in + [#46](https://github.com/steemit/devportal/issues/46), those are enumerated here. +* Each step should have its name bolded. And should link to the tutorial step + + +#### TUTORIAL +* The tutorial in detail, with each step titled & numbered exactly as output in the above section. +* Tutorial section begins with a horizontal rule `---`. There is no large text + + + +##### TUTORIAL STEP +* Each step describes what happens in that step. +* Each step should start with `#### ` +* A step may be numbered as a "primary" step ex: `1.` or a "secondary" step `1.a.` +* If there is a code-block that the writer feels should be in the "right-code" section of the + developer portal, that code-block should be created with `~~~` + * there may be only one `~~~` code-block per api step (but multiple ` ``` `) +* A step includes no more than one api call + * If there is an api call, there is a block with the title "Query" showing + the parameters for the call, and at least one block titled "Response" + showing a possible response from the api (multiple possible responses may be + shown, so long as they are numbered/labels and there are adequate descriptions + of each response & why it would be emitted by the API) + + +##### DONE STATEMENT +* *optional* - a wrapup of some kind. +* A simple, bolded statement telling the consumer they're done. + + +#### RUN INSTRUCTIONS +* Titled `## To Run` Describes the running environment + (may link to external doc for brevity) with the final "run" instruction(s) + listed here, as well as any tutorial specific configurations or settings. + If the tutorial/recipe does not have runnable code, states that. + + +#### Troubleshooting - optional +Any issues that may require troubleshooting + +#### FOOTNOTES - optional +A section for any caveat, gotchas, references. The `46` _Simple Arguments_, _Advanced Arguments_, & _Expanded Results_ should be able to point to Steem's API specification in the devportal for the relevant calls. If the specification isn't clear enough, it needs to be updated. + + +### LINGUISTIC PRECISION +It's very important that the tutorials be both accurate and precise in their language. +* a `function` something used within the client +* a `api call`or `rpc` is a call made between the client and the server. Ex in `client.database.call('get_active_votes', [author, permlink])` is an api call and should be referred to in a manner similar to _the rpc `get_active_votes` ..._. When referencing `.call()` it is a function. +* `` tags that take the user to a different page/site should be referred to as links +* `` ` + Steem Developer logo + + + +
      + + +
      + + + + + + + + + + + + +
      +
      +

      Steem Developer Portal

      + + + +
      + + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/blog_feed.html b/docs/tutorials-javascript/blog_feed.html new file mode 100644 index 0000000000000000000000000000000000000000..9024c8bcbcb93f37b51a3b94f1c141255500d53f --- /dev/null +++ b/docs/tutorials-javascript/blog_feed.html @@ -0,0 +1,498 @@ + + + + + + + + + + + + + + + + + + +JS: Blog Feed | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Blog Feed + + +

      + +

      By the end of this tutorial you should know how to fetch most recent five posts from particular user on Steem.

      +
      + + +

      Full, runnable src of Blog Feed can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial pulls a list of the most recent five user’s posts from the blockchain and displays them in simple list. Also some notes about usage of client.database.getDiscussions API.

      + +

      Intro

      + +

      Tutorial is demonstrates the typical process of fetching account blog posts. It is quite useful if you want to embedd your blog posts on your website these tutorial will help you achieve that goal as well. This tutorial will explain and show you how to access the Steem blockchain using the dsteem library to build a basic blog list of posts filtered by a tag

      + +

      Steps

      + +
        +
      1. Configure connection Configuration of dsteem to use proper connection and network
      2. +
      3. Query format Simple query format to help use fetch data
      4. +
      5. Fetch data and format Fetch data and display in proper interface
      6. +
      + +
      + +

      1. Configure connection

      + +

      In order to connect to the live Steem network, all we have to do is provide connection url to a server that runs on the network. dsteem by default set up to use live network but it has flexibility to adjust connection to any other testnet or custom networks, more on that in future tutorials.

      + +

      In first couple lines we require package and define connection server:

      + +
      const { Client } = require('dsteem');
      +
      +const client = new Client('https://api.steemit.com');
      +
      + +

      2. Query format

      + +
        +
      • You can add a tag to filter the blog posts that you receive from the server, since we are aiming to fetch blog posts of particular user, we will define username as tag.
      • +
      • You can also limit the number of results you would like to receive from the query
      • +
      + +
      var query = {
      +    tag: 'steemitblog', // This tag is used to filter the results by a specific post tag
      +    limit: 5, // This limit allows us to limit the overall results returned to 5
      +};
      +
      + +

      3. Fetch data and format

      + +

      client.database.getDiscussions function is used for fetching discussions or posts. The first argument to this function determines which equivalent of the appbase condenser_api.get_discussions_by_* api calls it’s going to use. Below is example of query and keyword ‘blog’ indicates condenser_api.get_discussions_by_blog and somewhat counter-intuitively query.tag indicates the account from which we want to get posts.

      + +
          client.database
      +        .getDiscussions('blog', query)
      +        .then(result => {
      +            var posts = [];
      +            result.forEach(post => {
      +                const json = JSON.parse(post.json_metadata);
      +                const image = json.image ? json.image[0] : '';
      +                const title = post.title;
      +                const author = post.author;
      +                const created = new Date(post.created).toDateString();
      +                posts.push(
      +                    `<div class="list-group-item"><h4 class="list-group-item-heading">${title}</h4><p>by ${author}</p><center><img src="${image}" class="img-responsive center-block" style="max-width: 450px"/></center><p class="list-group-item-text text-right text-nowrap">${created}</p></div>`
      +                );
      +            });
      +
      +            document.getElementById('postList').innerHTML = posts.join('');
      +        })
      +        .catch(err => {
      +            alert('Error occured' + err);
      +        });
      +
      + +

      The result returned form the service is a JSON object with the following properties:

      + +
      [
      +    {
      +        "id": 37338948,
      +        "author": "steemitblog",
      +        "permlink": "join-team-steemit-at-tokenfest",
      +        "category": "steemit",
      +        "parent_author": "",
      +        "parent_permlink": "steemit",
      +        "title": "Join Team Steemit at TokenFest!",
      +        "body":
      +            "<a href=\"https://tokenfest.adria.digital\"><img src=\"https://i.imgur.com/fOScDIW.png\"/></a>\n\nHello Steemians! If you’d like to meet Team Steemit live-in-person, or are just interested in attending what promises to be a great blockchain conference, join us at <a href=\"https://tokenfest.adria.digital/\">TokenFest</a> in San Francisco from March 15th to 16th. \n\nSteemit CEO, Ned Scott, will be participating in a fireside chat alongside Steemit’s CTO, Harry Schmidt, as well as the creator of Utopian.io, Diego Pucci. Steemit will also be hosting the opening party on Thursday night and we’d certainly love to meet as many of you as possible IRL, so head on over to https://tokenfest.adria.digital/ and get your tickets while you can. \n\n*Team Steemit*",
      +        "json_metadata":
      +            "{\"tags\":[\"steemit\",\"tokenfest\",\"conference\"],\"image\":[\"https://i.imgur.com/fOScDIW.png\"],\"links\":[\"https://tokenfest.adria.digital\",\"https://tokenfest.adria.digital/\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}",
      +        "last_update": "2018-03-07T23:22:54",
      +        "created": "2018-03-07T20:56:36",
      +        "active": "2018-03-13T01:40:21",
      +        "last_payout": "1970-01-01T00:00:00",
      +        "depth": 0,
      +        "children": 29,
      +        "net_rshares": "11453442114933",
      +        "abs_rshares": "11454054795840",
      +        "vote_rshares": "11454054795840",
      +        "children_abs_rshares": "13568695606090",
      +        "cashout_time": "2018-03-14T20:56:36",
      +        "max_cashout_time": "1969-12-31T23:59:59",
      +        "total_vote_weight": 3462435,
      +        "reward_weight": 10000,
      +        "total_payout_value": "0.000 SBD",
      +        "curator_payout_value": "0.000 SBD",
      +        "author_rewards": 0,
      +        "net_votes": 77,
      +        "root_comment": 37338948,
      +        "max_accepted_payout": "0.000 SBD",
      +        "percent_steem_dollars": 10000,
      +        "allow_replies": true,
      +        "allow_votes": true,
      +        "allow_curation_rewards": true,
      +        "beneficiaries": [],
      +        "url": "/steemit/@steemitblog/join-team-steemit-at-tokenfest",
      +        "root_title": "Join Team Steemit at TokenFest!",
      +        "pending_payout_value": "46.436 SBD",
      +        "total_pending_payout_value": "0.000 STEEM",
      +        "active_votes": [
      +            {
      +                "voter": "steemitblog",
      +                "weight": 0,
      +                "rshares": "1870813909383",
      +                "percent": 10000,
      +                "reputation": "128210130644387",
      +                "time": "2018-03-07T20:56:36"
      +            },
      +            {
      +                "voter": "kevinwong",
      +                "weight": 526653,
      +                "rshares": "2208942520687",
      +                "percent": 5000,
      +                "reputation": "374133832002581",
      +                "time": "2018-03-08T04:27:00"
      +            }
      +        ],
      +        "replies": [],
      +        "author_reputation": "128210130644387",
      +        "promoted": "0.000 SBD",
      +        "body_length": 754,
      +        "reblogged_by": []
      +    }
      +]
      +
      + +

      From this result we have access to everything associated to the post including additional metadata which is a JSON string that must be decoded to use. This JSON object has additional information and properties for the post including a reference to the image uploaded. And we are displaying this data in meaningful user interface. Note: it is truncated to one element, but you would get five posts in array

      + +

      That’s all there is to it.

      + +

      To Run the tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/01_blog_feed
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/claim_rewards.html b/docs/tutorials-javascript/claim_rewards.html new file mode 100644 index 0000000000000000000000000000000000000000..793c90a25357830c2b7089b8f2809c75a3efaa68 --- /dev/null +++ b/docs/tutorials-javascript/claim_rewards.html @@ -0,0 +1,449 @@ + + + + + + + + + + + + + + + + + + +JS: Claim Rewards | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Claim Rewards + + +

      + +

      Learn how to claim rewards from unclaimed reward balance using Steemconnect as well as client signing method.

      +
      + + +

      Full, runnable src of Claim Rewards can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial runs on the main Steem blockchain. And accounts queried are real users with unclaimed balances.

      + +

      Intro

      + +

      This tutorial will show few functions such as querying account by name and getting unclaimed rewards. We are using the call function provided by the dsteem library to pull accounts from the Steem blockchain. A simple HTML interface is used to capture the account and its unclaimed balance as well as allowing interactively claim rewards.

      + +

      Steps

      + +
        +
      1. App setup Setup dsteem to use the proper connection and network.
      2. +
      3. Search account Get account details after input has account name
      4. +
      5. Fill form Fill form with account reward balances
      6. +
      7. Claim reward Claim reward with Steemconnect or Client signing options
      8. +
      + +

      1. App setup

      + +

      Below we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint. There is a public/app.js file which holds the Javascript segment of this tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +let opts = {};
      +//connect to production server
      +opts.addressPrefix = 'STM';
      +opts.chainId =
      +    '0000000000000000000000000000000000000000000000000000000000000000';
      +//connect to server which is connected to the network/production
      +const client = new dsteem.Client('https://api.steemit.com');
      +
      + +

      2. Search account

      + +

      After account name field is filled with some name, we do automatic search for account by name when input is focused out. HTML input forms can be found in the index.html file. The values are pulled from that screen with the below:

      + +
          const accSearch = document.getElementById('username').value;
      +    const _accounts = await client.database.call('get_accounts', [[accSearch]]);
      +    console.log(`_accounts:`, _accounts);
      +
      + +

      3. Fill form

      + +

      After we fetched account data, we will fill form with reward balance and show current reward balance details.

      + +
      const name = _accounts[0].name;
      +const reward_steem = _accounts[0].reward_steem_balance.split(' ')[0];
      +const reward_sbd = _accounts[0].reward_sbd_balance.split(' ')[0];
      +const reward_sp = _accounts[0].reward_vesting_steem.split(' ')[0];
      +const reward_vests = _accounts[0].reward_vesting_balance.split(' ')[0];
      +const unclaimed_balance = `Unclaimed balance for ${name}: ${reward_steem} STEEM, ${reward_sbd} SBD, ${reward_sp} SP = ${reward_vests} VESTS<br/>`;
      +document.getElementById('accList').innerHTML = unclaimed_balance;
      +document.getElementById('steem').value = reward_steem;
      +document.getElementById('sbd').value = reward_sbd;
      +document.getElementById('sp').value = reward_vests;
      +
      + +

      4. Claim reward

      + +

      We have 2 options on how to claim rewards. Steemconnect and Client signing options. We generate Steemconnect link to claim rewards, but you can also choose client signing option to claim rewards right inside tutorial.

      + +

      In order to enable client signing, we will generate operation and also show Posting Private key (wif) field to sign transaction right there client side. +Below you can see example of operation and signing transaction, after successful operation broadcast result will be shown in user interface. It will be block number that transaction was included.

      + +
      window.submitTx = async () => {
      +    const privateKey = dsteem.PrivateKey.fromString(
      +        document.getElementById('wif').value
      +    );
      +    const op = [
      +        'claim_reward_balance',
      +        {
      +            account: document.getElementById('username').value,
      +            reward_steem: document.getElementById('steem').value + ' STEEM',
      +            reward_sbd: document.getElementById('sbd').value + ' SBD',
      +            reward_vests: document.getElementById('sp').value + ' VESTS',
      +        },
      +    ];
      +    client.broadcast.sendOperations([op], privateKey).then(
      +        function(result) {
      +            document.getElementById('result').style.display = 'block';
      +            document.getElementById(
      +                'result'
      +            ).innerHTML = `<br/><p>Included in block: ${
      +                result.block_num
      +            }</p><br/><br/>`;
      +        },
      +        function(error) {
      +            console.error(error);
      +        }
      +    );
      +};
      +
      + +

      That’s it!

      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/21_claim_rewards
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/client_signing.html b/docs/tutorials-javascript/client_signing.html new file mode 100644 index 0000000000000000000000000000000000000000..9e7ac9998d53a95fccfa01ff8d0590953b41a971 --- /dev/null +++ b/docs/tutorials-javascript/client_signing.html @@ -0,0 +1,465 @@ + + + + + + + + + + + + + + + + + + +JS: Client Signing | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Client Signing + + +

      + +

      By the end of this tutorial you would know how to sign, verify broadcast transactions locally on Steem.

      +
      + + +

      Full, runnable src of Client Signing can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial gives you overview of how client side transaction signing works under the hood.

      + +

      Purpose is to guide you through the steps required so that you could adapt this in your own applications.

      + +

      We have predefined accounts to select for you to quickly use and few transaction types to test the process.

      + +

      Intro

      + +

      Client side signing of transaction is yet another way of interacting with Steem blockchain. Compare to Steemconnect method, client signing doesn’t rely on other servers to generate and verify transaction, except when transaction is broadcasted to the network, it should be routed through one of the servers connected to that network or blockchain. It can be your own local machine running Steem blockchain or it could be any other publicly accessible servers.

      + +

      Steps

      + +
        +
      1. App setup Import dsteem into app.js and prepare it to communicate with a Testnet instance of Steem blockchain
      2. +
      3. Get globals Network globals
      4. +
      5. Account selection Select predefined account
      6. +
      7. Operation selection Select common operations
      8. +
      9. Generate transaction Generate transaction with selected account and operation
      10. +
      11. Sign and verify transaction Sign and verify signature of the transaction
      12. +
      13. Broadcast transaction Broadcast signed transaction to the network
      14. +
      + +

      1. App setup

      + +

      Testnet and Production networks only differ with few settings which helps developers to switch their application from testnet to production. One of these settings is addressPrefix - string that is defined and will be in front of every public address on that chain/network. Another one is chainId - id of that network. By defining those parameters we are selecting Testnet and connecting to publicly available server with help of dsteem library. First few lines of code in public/app.js gives you example of connection to different networks, testnet and production.

      + +
      opts.addressPrefix = 'TST';
      +opts.chainId =
      +    '46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32';
      +//connect to server which is connected to the network/testnet
      +const client = new dsteem.Client('https://testnet.steemitdev.com', opts);
      +
      + +
        +
      • Disclaimer: In this tutorial we are using testnet powered by community member (@almost-digital) and predefined accounts reside on this network only.
      • +
      + +

      2. Get globals

      + +

      To test connection as well as to get parameters of the connected network, we can use getDynamicGlobalProperties function from dsteem library. Only 2 fields are in our interesting for this tutorial, head_block_number - returns head or latest block number of the network, head_block_id - returns id of head block.

      + +

      Overview

      + +

      3. Account selection

      + +

      We have predefined list of accounts to help you with generate, sign, verify and broadcast transaction on testnet. Select list has posting private key for each account and onchange selection event we keep account name and credentials in memory. accountChange function shows example of turning plain posting private key into private key buffer format that is understandable by dsteem.

      + +
      privateKey = dsteem.PrivateKey.fromString(
      +    document.getElementById('account').value
      +);
      +
      + +

      Account and its credentials should belong to specified testnet/mainnet network to sign/verify/broadcast transactions properly.

      + +

      4. Operation selection

      + +

      Number of operations are also predefined to show you example of operation format. opChange also keeps selected operation name in memory.

      + +

      5. Generate transaction

      + +

      Next we have button which helps us to generate operation object. Depending on selected operation type we have different structure for operation object. Typically, each transaction object has following fields:

      + +
        +
      • ref_block_num - references block number in past, in this example we have chosen head block number, but it is possible to use a block number from up to 65,536 blocks ago. This is required in TaPoS (Transaction as Proof of Stake) to avoid network forks.
      • +
      • ref_block_prefix - reference buffer of block id of ref_block_num as prefix
      • +
      • expiration - transaction expiration date in future, in our example we have set it +1 minute into future
      • +
      • operations - array of operations, this field holds main information about transaction type and its structure which is recognized by the network
      • +
      • extensions - any extensions to the transaction to change its parameters or options
      • +
      + +

      Vote operation example

      + +
      op = {
      +    ref_block_num: head_block_number,
      +    ref_block_prefix: Buffer.from(head_block_id, 'hex').readUInt32LE(4),
      +    expiration: new Date(Date.now() + expireTime).toISOString().slice(0, -5),
      +    operations: [['vote', {
      +        voter: account,
      +        author: 'test',
      +        permlink: 'test',
      +        weight: 10000
      +    }]],
      +    extensions: [],
      +}
      +
      + +

      First item, operation type, vote and second item object with voter - account that is casting vote, author - author of post vote is being casted to, permlink - permanent link of the post, weight - vote weight 10000 being 100%, 1 being 0.01% smallest voting unit.

      + +

      And output of operation object/json is set to OpInput element.

      + +

      6. Sign and verify transaction

      + +

      Each operation needs to be signed before they can be sent to the network, transactions without signature will not be accepted by network. Because someone has to identify operation and sign it with their private keys. Sign transaction button calls for signTx function which is job is to sign selected operation and its obkect with selected account. And output result into TxOutput element.

      + +

      stx = client.broadcast.sign(op, privateKey)

      + +

      Verifying transaction process is mostly done automatically but to show every step, we have included this process to check validity of the transaction signature. Verify transaction button calls verifyTx function. Function then verify authority of the signature in signed transaction, if it was signed with correct private key and authority. If verification is successful user interfaces adds checkmark next to button otherwise adds crossmark to indicate state of the signature.

      + +

      const rv = await client.database.verifyAuthority(stx)

      + +

      7. Broadcast transaction

      + +

      Final step is to broadcast our signed transction to the selected server. Server chosen in Connect section will handle propagating transction to the network. After network accepts transaction it will return result with transaction id, block_num that this transaction is included to, trx_num transaction number, and if it is expired or not.

      + +

      const res = await client.broadcast.send(stx)

      + +

      That’s it!

      + +

      To Run the tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/03_client_signing
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/convert_sbd_to_steem.html b/docs/tutorials-javascript/convert_sbd_to_steem.html new file mode 100644 index 0000000000000000000000000000000000000000..ba56639da29758968bab543d44944e85745fb51a --- /dev/null +++ b/docs/tutorials-javascript/convert_sbd_to_steem.html @@ -0,0 +1,488 @@ + + + + + + + + + + + + + + + + + + +JS: Convert Sbd To Steem | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Convert Sbd To Steem + + +

      + +

      How to convert SBD to STEEM for a specified account.

      +
      + + +

      Full, runnable src of Convert Sbd To Steem can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will take you through the process of checking a specific users’ balances and then broadcasting the intended SBD conversion to the blockchain. Demo account information has been provided to assist with the tutorial. This tutorial has been set up for the testnet but can be easily be changed for production.

      + +

      It should be noted that the converted STEEM will not be available instantly as it takes 3.5 days for the transaction to be processed. It is also not possible to stop a conversion once initialised. During the 3.5 days for it to be converted and as the conversion price fluctuates you could actually be receiving less STEEM than what you should. Because of this, the method in this tutorial is NOT the preferred or most efficient way of converting SBD to STEEM. This tutorial just illustrates that it can be done in this manner.

      + +

      There is a marketplace on Steemit that allows you to “sell” your SBD instantly. With this process you can get your STEEM immediately and at the exact price that you expect. The market place is the better way to convert your SBD. This article provides more information on using the market to exchange your SBD to STEEM

      + +

      Steemconnect offers an alternative to converting SBD with a “simple link” solution. Instead of running through a list of operations on your account, you can simply use a link similar to the one below substituting the three parameters for your own details. You will be prompted to enter your username and password before the transaction will be executed. +https://steemconnect.com/sign/convert?owner=username&requestid=1234567&amount=0.000%20SBD +This is similar to the steemconnect links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://v2.steemconnect.com/sign +This article has more information on using steemconnect

      + +

      Intro

      + +

      This tutorial uses the database API to gather account information for the current SBD and STEEM balances of the specified user. This information is then used to assist the user in completing the conversion request. The values are then captured and the operation is transmitted via the broadcast API. The parameters for this convert function are:

      + +
        +
      1. owner - The account for which the conversion is being done
      2. +
      3. requestid - Integer identifier for tracking the conversion. This needs to be a unique number for a specified user
      4. +
      5. amount - The amount of SBD to withdraw
      6. +
      + +

      The only other information required is the private active key of the user.

      + +

      Steps

      + +
        +
      1. Configure connection Configuration of dsteem to communicate with a Steem blockchain
      2. +
      3. User account User account is captured and balances displayed
      4. +
      5. Input variables Collecting the required inputs via an HTML UI
      6. +
      7. Broadcast operation Broadcasting the operation to the blockchain
      8. +
      + +

      1. Configure connection

      + +

      As usual, we have a public/app.js file which holds the Javascript segment of the tutorial. In the first few lines we define the configured library and packages:

      + +
      import { Client, PrivateKey } from 'dsteem';
      +import { Testnet as NetConfig } from '../../configuration'; //A Steem Testnet. Replace 'Testnet' with 'Mainnet' to connect to the main Steem blockchain.
      +
      +let opts = { ...NetConfig.net };
      +
      +// //connect to a steem node, tesetnet in this case
      +const client = new Client(NetConfig.url, opts);
      +
      + +

      Above, we have dsteem pointing to the testnet with the proper chainId, addressPrefix, and endpoint by importing it from the configuration.js file. Due to this tutorial altering the blockchain it is preferable to not work on production.

      + +

      2. User account

      + +

      The user account is input through the UI. Once entered, the user can select the search button to display the SBD and STEEM balances for that account. During this step, a random number is also generated for the requestid. This value can be changed to any integer value as long as it is unique for the specific account. If the requestid is duplicated an error to do with “uniqueness constraint” will be displayed in the console. For ease of use values for a demo account has already been entered in the relevant fields once the page loads.

      + +
      window.onload = async () => {
      +    const account = NetConfig.accounts[0];
      +    document.getElementById('username').value = account.address;
      +    document.getElementById('privateKey').value = account.privActive;
      +};
      +
      + +

      With the account search function as seen below.

      + +
      window.submitAcc = async () => {
      +    const accSearch = document.getElementById('username').value;
      +
      +    const _account = await client.database.call('get_accounts', [[accSearch]]);
      +    console.log(`_account:`, _account);
      +
      +    const availSBD = _account[0].sbd_balance 
      +    const availSTEEM = _account[0].balance
      +
      +    const balance = `Available balance: ${availSBD} and ${availSTEEM} <br/>`;
      +    document.getElementById('accBalance').innerHTML = balance;
      +
      +    //create random number for requestid paramter
      +    var x = Math.floor(Math.random() * 10000000);
      +    document.getElementById("requestID").value = x
      +}
      +
      + +

      3. Input variables

      + +

      The parameters for the convert function are input in the UI and assigned as seen below once the user presses the convert button.

      + +
      //get all values from the UI
      +//get account name
      +const username = document.getElementById('username').value;
      +//get private active key
      +const privateKey = PrivateKey.fromString(
      +    document.getElementById('privateKey').value
      +);
      +//get convert amount
      +const quantity = document.getElementById('quantity').value;
      +//create correct format
      +const convert = quantity.concat(' SBD');
      +//assign integer value of ID
      +const requestid = parseInt(document.getElementById('requestID').value);
      +
      + +

      4. Broadcast operation

      + +

      With all the parameters assigned we create an array for the convert function and transmit it to the blockchain via the sendOperation function in the broadcast API.

      + +
      //create convert operation
      +const op = [
      +    'convert',
      +    { owner: username, amount: convert, requestid: requestid },
      +];
      +    
      +//broadcast the conversion
      +client.broadcast.sendOperations([op], privateKey).then(
      +    function(result) {
      +        console.log(
      +            'included in block: ' + result.block_num,
      +            'expired: ' + result.expired
      +        );
      +        document.getElementById('convertResultContainer').style.display = 'flex';
      +        document.getElementById('convertResult').className =
      +            'form-control-plaintext alert alert-success';
      +        document.getElementById('convertResult').innerHTML = 'Success';
      +    },
      +    function(error) {
      +        console.error(error);
      +        document.getElementById('convertResultContainer').style.display = 'flex';
      +        document.getElementById('convertResult').className =
      +            'form-control-plaintext alert alert-danger';
      +        document.getElementById('convertResult').innerHTML = error.jse_shortmsg;
      +    }
      +);
      +
      + +

      The results of the operation is displayed on the UI along with a block number in the console to confirm a successful operation.

      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/32_convert_sbd_to_steem
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/create_account.html b/docs/tutorials-javascript/create_account.html new file mode 100644 index 0000000000000000000000000000000000000000..127dd0e5ec4ddc7d9112033d91c3a911bdcf662f --- /dev/null +++ b/docs/tutorials-javascript/create_account.html @@ -0,0 +1,540 @@ + + + + + + + + + + + + + + + + + + +JS: Create Account | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      + + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/delegate_power.html b/docs/tutorials-javascript/delegate_power.html new file mode 100644 index 0000000000000000000000000000000000000000..94e7c7696beb8e8dae5bd0ca4f00447135dd1e88 --- /dev/null +++ b/docs/tutorials-javascript/delegate_power.html @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + + + + +JS: Delegate Power | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Delegate Power + + +

      + +

      Delegate power to other users using Steemconnect or Client-side signing.

      +
      + + +

      Full, runnable src of Delegate Power can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial runs on the main Steem blockchain. And accounts queried/searched are real accounts with their available VESTS balances and estimated STEEM POWER holdings.

      + +

      Intro

      + +

      This tutorial will show few functions such as querying account by name and getting account vesting balance. We then convert VESTS to STEEM POWER for convenience of user. And allow user to choose portion or all holdings of VESTS to delegate other users. A simple HTML interface is provided to capture the account with search and its VESTS balance as well as allowing interactively delegate. It should be noted that when a delegation is cancelled, the VESTS will only be available again after a 5 day cool-down period.

      + +

      Steps

      + +
        +
      1. App setup Setup dsteem to use the proper connection and network.
      2. +
      3. Search account Get account details after input has account name
      4. +
      5. Calculate and Fill form Calculate available vesting shares and Fill form with details
      6. +
      7. Delegate power Delegate VESTS with Steemconnect or Client-side signing.
      8. +
      + +

      1. App setup

      + +

      Below we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint. There is a public/app.js file which holds the Javascript segment of this tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +let opts = {};
      +//connect to production server
      +opts.addressPrefix = 'STM';
      +opts.chainId =
      +    '0000000000000000000000000000000000000000000000000000000000000000';
      +//connect to server which is connected to the network/production
      +const client = new dsteem.Client('https://api.steemit.com');
      +
      + +

      2. Search account

      + +

      After account name field is filled with some name, we do automatic search for account by name when input is focused out. HTML input forms can be found in the index.html file. The values are pulled from that screen with the below:

      + +
          const accSearch = document.getElementById('username').value;
      +    const _account = await client.database.call('get_accounts', [[accSearch]]);
      +    console.log(`_account:`, _account);
      +
      + +

      3. Calculate and Fill form

      + +

      After we fetched account data, we will fill form with VESTS balance and show current balance details. Note, that in order to get available VESTS balance we will have to check if account is already powering down and how much is powering down, how much of VESTS were delegated out which locks them from being powered down. Available balance will be in avail variable, next for convenience of user, we convert available VESTS to STEEM with getDynamicGlobalProperties function and fill form fields accordingly.

      + +
          const name = _account[0].name;
      +    const avail = parseFloat(_account[0].vesting_shares) - (parseFloat(_account[0].to_withdraw) - parseFloat(_account[0].withdrawn)) / 1e6 - parseFloat(_account[0].delegated_vesting_shares);
      +
      +    const props = await client.database.getDynamicGlobalProperties();
      +    const vestSteem = parseFloat(parseFloat(props.total_vesting_fund_steem) *
      +        (parseFloat(avail) / parseFloat(props.total_vesting_shares)),6);
      +
      +    const balance = `Available Vests for ${name}: ${avail} VESTS ~ ${vestSteem} STEEM POWER<br/><br/>`;
      +    document.getElementById('accBalance').innerHTML = balance;
      +    document.getElementById('steem').value = avail+' VESTS';
      +
      + +

      Once form is filled with maximum available VESTS balance, you can choose portion or lesser amount of VESTS to delegate other user.

      + +

      4. Delegate power

      + +

      We have 2 options on how to delegate others. Steemconnect and Client-side signing options. By default we generate Steemconnect link to delegate power (delegate vesting shares), but you can choose client signing option to delegate right inside tutorial, note client-side signing will require Active Private key to perform the operation.

      + +

      In order to enable client signing, we will generate operation and also show Active Private key (wif) field to sign transaction client side. +Below you can see example of operation and signing transaction, after successful operation broadcast result will be shown in user interface. It will be block number that transaction was included.

      + +
      window.submitTx = async () => {
      +    const privateKey = dsteem.PrivateKey.fromString(
      +        document.getElementById('wif').value
      +    );
      +    const op = [
      +        'delegate_vesting_shares',
      +        {
      +            delegator: document.getElementById('username').value,
      +            delegatee: document.getElementById('account').value,
      +            vesting_shares: document.getElementById('steem').value,
      +        },
      +    ];
      +    client.broadcast.sendOperations([op], privateKey).then(
      +        function(result) {
      +            document.getElementById('result').style.display = 'block';
      +            document.getElementById(
      +                'result'
      +            ).innerHTML = `<br/><p>Included in block: ${
      +                result.block_num
      +            }</p><br/><br/>`;
      +        },
      +        function(error) {
      +            console.error(error);
      +        }
      +    );
      +};
      +
      + +

      That’s it!

      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/25_delegate_power
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/edit_content_patching.html b/docs/tutorials-javascript/edit_content_patching.html new file mode 100644 index 0000000000000000000000000000000000000000..03d3db3c6aa6a8d4a9379085ff4d042ad90c5245 --- /dev/null +++ b/docs/tutorials-javascript/edit_content_patching.html @@ -0,0 +1,519 @@ + + + + + + + + + + + + + + + + + + +JS: Edit Content Patching | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Edit Content Patching + + +

      + +

      By the end of this tutorial you should know how to patch post edits to Steem.

      +
      + + +

      Full, runnable src of Edit Content Patching can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will take you through the process of preparing and patching post using the broadcast.comment operation. Being able to patch a post is critical to save resources on Steem.

      + +

      Intro

      + +

      Tutorial is demonstrating the typical process of editing content that has been previously posted on the blockchain. Instead of replacing the entire body of the post, the Steem blockchain offers an alternative strategy. In this tutorial, we will focus on properly patching existing content and then broadcasting the patch with a demo account on a testnet.

      + +

      Note for long time community members: Since HF20 even archived content (older than 7 days) can be changed/updated. Editing content will also use less RC (resource credits) than creating new posts entirely.

      + +

      We are using the broadcast.comment function provided by dsteem which generates, signs, and broadcast the transaction to the network. On the Steem platform, posts and comments are all internally stored as a comment object, differentiated by whether or not a parent_author exists. When there is no parent_author, it’s a post, when there is, it’s a comment. When editing a post, we need to make sure that we don’t resubmit the same post over and over again, which will spam the network and adds additional cost to operate the platform. Instead we will use a package called diff-match-patch, which allows us to only apply changes and save resources on the Steem platform.

      + +

      Steps

      + +
        +
      1. Configure testnet Testnet connection should be established with proper configurations
      2. +
      3. Get latest post Get @demo’s latest post for editing
      4. +
      5. Creating patch Creating patch with new edited text
      6. +
      7. Submit a patch Submit newly formatted post
      8. +
      + +

      1. Configure testnet

      + +

      As usual, we have a file called public/app.js, which holds the Javascript segment of the tutorial. In the first few lines, we have defined the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +let opts = {};
      +//connect to community testnet
      +opts.addressPrefix = 'STX';
      +opts.chainId =
      +    '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673';
      +//connect to server which is connected to the network/testnet
      +const client = new dsteem.Client('https://testnet.steem.vc', opts);
      +
      + +

      Above, we have dsteem pointing to the test network with the proper chainId, addressPrefix, and endpoint. Because this tutorial is interactive, we will not publish test content to the main network. Instead, we’re using testnet and a predefined account to demonstrate post patching.

      + +

      2. Get latest post

      + +

      Next, we have a main function which fires at on-load and fetches latest blog post of @demo account and fills in the form with relevant information.

      + +
      const query = { tag: 'demo', limit: '1' };
      +client.database
      +    .call('get_discussions_by_blog', [query])
      +    .then(result => {
      +        document.getElementById('title').value = result[0].title;
      +        document.getElementById('body').value = result[0].body;
      +        document.getElementById('tags').value = JSON.parse(
      +            result[0].json_metadata
      +        ).tags.join(' ');
      +        o_body = result[0].body;
      +        o_permlink = result[0].permlink;
      +    })
      +    .catch(err => {
      +        console.log(err);
      +        alert('Error occured, please reload the page');
      +    });
      +
      + +

      Notice, we are only fetching a single blog post by specifying a limit and we have filled all necessary fields/variables with the old content.

      + +

      3. Creating patch

      + +

      We have created a small function called createPatch to patch edits to the old content.

      + +
      function createPatch(text, out) {
      +    if (!text && text === '') return undefined;
      +    //get list of patches to turn text to out
      +    const patch_make = dmp.patch_make(text, out);
      +    //turns patch to text
      +    const patch = dmp.patch_toText(patch_make);
      +    return patch;
      +}
      +
      + +

      The createPatch function computes a list of patches to turn old content to edited content.

      + +

      4. Submit a patch

      + +

      Next, we have the submitPost function, which executes when the Submit button is clicked.

      + +
      //get private key
      +const privateKey = dsteem.PrivateKey.fromString(
      +    document.getElementById('postingKey').value
      +);
      +//get account name
      +const account = document.getElementById('username').value;
      +//get title
      +const title = document.getElementById('title').value;
      +//get body
      +const edited_body = document.getElementById('body').value;
      +
      +let body = '';
      +
      +//computes a list of patches to turn o_body to edited_body
      +const patch = createPatch(o_body, edited_body);
      +
      +//check if patch size is smaller than original content
      +if (patch && patch.length < new Buffer(o_body, 'utf-8').length) {
      +    body = patch;
      +} else {
      +    body = o_body;
      +}
      +
      +//get tags and convert to array list
      +const tags = document.getElementById('tags').value;
      +const taglist = tags.split(' ');
      +//make simple json metadata including only tags
      +const json_metadata = JSON.stringify({ tags: taglist });
      +//generate random permanent link for post
      +const permlink = o_permlink;
      +
      +client.broadcast
      +    .comment(
      +        {
      +            author: account,
      +            body: body,
      +            json_metadata: json_metadata,
      +            parent_author: '',
      +            parent_permlink: taglist[0],
      +            permlink: permlink,
      +            title: title,
      +        },
      +        privateKey
      +    )
      +    .then(
      +        function(result) {
      +            document.getElementById('title').value = '';
      +            document.getElementById('body').value = '';
      +            document.getElementById('tags').value = '';
      +            document.getElementById('postLink').style.display = 'block';
      +            document.getElementById(
      +                'postLink'
      +            ).innerHTML = `<br/><p>Included in block: ${
      +                result.block_num
      +            }</p><br/><br/><a href="http://condenser.steem.vc/${
      +                taglist[0]
      +            }/@${account}/${permlink}">Check post here</a>`;
      +        },
      +        function(error) {
      +            console.error(error);
      +        }
      +    );
      +
      + +

      As you can see from the above function, we get the relevant values from the defined fields. Tags are separated by spaces in this example, but the structure of how to enter tags totally depends on your needs. We have separated tags with whitespaces and stored them in an array list called taglist, for later use. Posts on the blockchain can hold additional information in the json_metadata field, such as the tags list which we have assigned. Posts must also have a unique permanent link scoped to each account. In this case we are just creating a random character string.

      + +

      In the follow code, we patch the old content with new (or edited) content and make sure that the patch size is smaller than edited content, otherwise patching is unnecessary.

      + +
      //computes a list of patches to turn o_body to edited_body
      +const patch = createPatch(o_body, edited_body);
      +
      +//check if patch size is smaller than edited content itself
      +if (patch && patch.length < new Buffer(edited_body, 'utf-8').length) {
      +    body = patch;
      +} else {
      +    body = edited_body;
      +}
      +
      + +

      The next step is to pass all of these parameters to the client.broadcast.comment function. Note that in parameters you can see the parent_author and parent_permlink fields, which are used for replies (also known as comments). In our example, since we are publishing a post instead of a comment/reply, we will have to leave parent_author as an empty string and assign parent_permlink from the first tag.

      + +

      After the post has been broadcasted to the network, we can simply set all the fields to empty strings and show the post link to check it from a condenser instance running on the selected testnet. That’s it!

      + +

      To Run the tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/12_edit_content_patching
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/follow_a_user.html b/docs/tutorials-javascript/follow_a_user.html new file mode 100644 index 0000000000000000000000000000000000000000..39410cec9630640696627f558ac7253e5525b85e --- /dev/null +++ b/docs/tutorials-javascript/follow_a_user.html @@ -0,0 +1,496 @@ + + + + + + + + + + + + + + + + + + +JS: Follow A User | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Follow A User + + +

      + +

      Follow and unfollow a user / author.

      +
      + + +

      Full, runnable src of Follow A User can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will take you through the process of checking the follow status of an author and either follow or unfollow that user depending on the current status. This is done with the call operation as well as the broadcast.json operation.

      + +

      Intro

      + +

      We are using the broadcast.json operation provided by the dsteem library to follow or unfollow a selected author. There are 4 variables required to execute this operation:

      + +
        +
      1. follower - The specific user that will select the author to follow/unfollow (username).
      2. +
      3. privatekey - This is the private posting key of the user(postingKey).
      4. +
      5. following - The account/author that the user would like to follow (author).
      6. +
      7. what - The type of follow operation. This variable can have one of two values: blog, to follow an author, and a null value, unfollow the selected author.
      8. +
      + +

      A simple HTML UI is used to capture the required information, after which the broadcast operation can be compiled.

      + +

      Steps

      + +
        +
      1. Configure connection Configuration of dsteem to communicate with the Steem blockchain
      2. +
      3. Input variables Collecting the required inputs via an HTML UI
      4. +
      5. Get status Get the follow status for the specified author
      6. +
      7. Follow operation Execute the follow operation
      8. +
      + +

      1. Configure connection

      + +

      As usual, we have a public/app.js file which holds the Javascript segment of the tutorial. In the first few lines we define the configured library and packages:

      + +
      import { Client, PrivateKey } from 'dsteem';
      +import { Testnet as NetConfig } from '../../configuration'; //A Steem Testnet. Replace 'Testnet' with 'Mainnet' to connect to the main Steem blockchain.
      +
      +let opts = { ...NetConfig.net };
      +
      +//connect to a steem node, testnet in this case
      +const client = new Client(NetConfig.url, opts);
      +
      + +

      Above, we have dsteem pointing to the test network with the proper chainId, addressPrefix, and endpoint by importing from the configuration.js file. Because this tutorial is interactive, we will not publish test content to the main network. Instead, we’re using the testnet and a predefined account which is imported once the application loads, to demonstrate following of an author.

      + +
      window.onload = async () => {
      +    const account = NetConfig.accounts[0];
      +    const accountI = NetConfig.accounts[1];
      +    document.getElementById('username').value = account.address;
      +    document.getElementById('postingKey').value = account.privPosting;
      +    document.getElementById('author').value = accountI.address;
      +};
      +
      + +

      2. Input variables

      + +

      The required parameters for the follow operation is recorded via an HTML UI that can be found in the public/index.html file.

      + +

      The parameter values are allocated as seen below once the user clicks on the “Follow / Unfollow” button.

      + +
      window.submitFollow = async () => {
      +    //get private key
      +    const privateKey = dsteem.PrivateKey.fromString(
      +        document.getElementById('postingKey').value
      +    );
      +    //get account name
      +    const follower = document.getElementById('username').value;
      +    //get author permalink
      +    const following = document.getElementById('author').value;
      +
      + +

      3. Get status

      + +

      The current follow status for the author is called from the database and a variable is assigned in order to specify whether the follow operation should execute as follow or unfollow. For more information on this process you can refer to tutorial 19_get_follower_and_following_list.

      + +
      console.log({ follower: follower, following: following });
      +
      +    let status = await client.call('follow_api', 'get_following', [
      +        follower,
      +        following,
      +        'blog',
      +        1,
      +    ]);
      +
      +    console.log({ status: status });
      +
      +    if (status.length > 0 && status[0].following == following) {
      +        type = '';
      +    } else {
      +        type = 'blog';
      +    }
      +
      + +

      4. Follow operation

      + +

      A JSON with the collected input variables is created in order for the data object within the broadcast operation to be completed.

      + +
      const json = JSON.stringify([
      +    'follow',
      +    {
      +        follower: follower,
      +        following: following,
      +        what: [type], //null value for unfollow, 'blog' for follow
      +    },
      +]);
      +
      + +

      The broadcast.json operation requires a data object and private key in order the execute. For the follow/unfollow operation the variables in the object have predefined values. These values can change depending on the type of operation.

      + +
      const data = {
      +    id: 'follow',
      +    json: json,
      +    required_auths: [],
      +    required_posting_auths: [follower],
      +};
      +
      + +

      The broadcast operation is then executed with the created object and the private posting key. We also display the follow status on the UI in order for the user to know the whether the process was a success.

      + +
      client.broadcast.json(data, privateKey).then(
      +    function(result) {
      +        console.log('user follow result: ', result);
      +        document.getElementById('followResultContainer').style.display = 'flex';
      +        document.getElementById('followResult').className =
      +            'form-control-plaintext alert alert-success';
      +        if (type == 'blog') {
      +            document.getElementById('followResult').innerHTML =
      +                'Author followed';
      +        } else {
      +            document.getElementById('followResult').innerHTML =
      +                'Author unfollowed';
      +        }
      +    },
      +    function(error) {
      +        console.error(error);
      +        document.getElementById('followResultContainer').style.display = 'flex';
      +        document.getElementById('followResult').className =
      +            'form-control-plaintext alert alert-danger';
      +        document.getElementById('followResult').innerHTML = error.jse_shortmsg;
      +    }
      +);
      +
      + +

      If either of the values for the user or author does not exist the proper error result will be displayed on the UI. The result is also displayed in the console in order for the user to confirm that a block transaction has taken place. The status of the operation can be verified on the demo account.

      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/18_follow_user
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/get_account_comments.html b/docs/tutorials-javascript/get_account_comments.html new file mode 100644 index 0000000000000000000000000000000000000000..aaa9536a6bb2703904805975ad2781b894f0c128 --- /dev/null +++ b/docs/tutorials-javascript/get_account_comments.html @@ -0,0 +1,618 @@ + + + + + + + + + + + + + + + + + + +JS: Get Account Comments | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      + + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/get_account_replies.html b/docs/tutorials-javascript/get_account_replies.html new file mode 100644 index 0000000000000000000000000000000000000000..ef296534475296d391a68ae35298c797e6b64803 --- /dev/null +++ b/docs/tutorials-javascript/get_account_replies.html @@ -0,0 +1,610 @@ + + + + + + + + + + + + + + + + + + +JS: Get Account Replies | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      + + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/get_delegations_by_user.html b/docs/tutorials-javascript/get_delegations_by_user.html new file mode 100644 index 0000000000000000000000000000000000000000..5ec8818d868f339eaf48e81015c7a8fc6e716bbd --- /dev/null +++ b/docs/tutorials-javascript/get_delegations_by_user.html @@ -0,0 +1,503 @@ + + + + + + + + + + + + + + + + + + +JS: Get Delegations By User | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Get Delegations By User + + +

      + +

      View the vesting delegations made by a user as well as the delegations that are expiring.

      +
      + + +

      Full, runnable src of Get Delegations By User can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will take you through the process of calling delegation information from the steem blockchain using the database API. The account information provided has been chosen by random and the process is applicable to any user account on both the production server and the testnet.

      + +

      Intro

      + +

      This tutorial has two separate functions, one for viewing active delegations and one for viewing expiring delegations. Both of these use the database API to pull information from the steem blockchain. It should be noted that when a delegation is cancelled it will only be available after 7 days. The value of the delegation can also be changed at any time, either decreased or increased. The first function we use is getVestingDelegations for which we require the following parameters:

      + +
        +
      1. account - The username for which the query is done
      2. +
      3. from - The value from where to start the search. This can be used for paging. This parameter is optional
      4. +
      5. limit - The quantity of results that is queried from the blockchain. This parameter is optional
      6. +
      + +

      The second function is getExpiringVestingDelegations with parameters:

      + +
        +
      1. user - The account that the query is referencing
      2. +
      3. from time - The date from where the query will be run. Pending expirations clear after 7 days so it will never be older than that. This value can however be set to anytime before the 7 days of expiration and it will return the relevant transactions
      4. +
      5. limit - The quantity of results that is queried from the blockchain
      6. +
      + +

      Steps

      + +
        +
      1. Configure connection Configuration of dsteem to communicate with a Steem blockchain
      2. +
      3. Input variables Collecting the required inputs via an HTML UI
      4. +
      5. Database query Sending a query to the blockchain for the user delegations
      6. +
      7. Display results Display the results of the blockchain query
      8. +
      + +

      1. Configure connection

      + +

      As usual, we have a public/app.js file which holds the Javascript segment of the tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +let opts = {};
      +//define network parameters
      +opts.addressPrefix = 'STM';
      +opts.chainId =
      +    '0000000000000000000000000000000000000000000000000000000000000000';
      +//connect to a steem node, production in this case
      +const client = new dsteem.Client('https://api.steemit.com');
      +
      + +

      Above, we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint.

      + +

      2. Input variables

      + +

      The required parameters for the delegation query operation is recorded via an HTML UI that can be found in the public/index.html file. The values are pre-populated in this case but any account name can be used.

      + +

      Both of the query functions use the same input variables. The previous results are cleared each time at the start of the function. The parameter values are allocated as seen below, once the user clicks on either the “Display active delegations” or “Display expiring delegations” button.

      + +
      //active delegations function
      +window.createList = async () => {
      +    //clear list
      +    document.getElementById('delegationList').innerHTML = '';
      +
      +    //get username
      +    const delegator = document.getElementById('username').value;
      +
      + +

      3. Database query

      + +

      The queries are sent through to the steem blockchain using the database API and parameters as per the intro. The result of the query is displayed on the console as a control check.

      + +
      //active delegations function
      +delegationdata = await client.database.getVestingDelegations(delegator, "", 100);
      +    console.log(JSON.stringify(delegationdata));
      +
      + +
      //expiring delegations function
      +const delegationdata = await client.database.call('get_expiring_vesting_delegations',[delegator, "2018-01-01T00:00:00", 100]);
      +    console.log(delegationdata);
      +
      + +

      4. Display results

      + +

      Before the results are displayed a check is done whether there are in fact any transactions for the specific user.

      + +
      //active delegations function
      +if (delegationdata[0] == null) {
      +    console.log('No delegation information');
      +    document.getElementById('searchResultContainer').style.display = 'flex';
      +    document.getElementById('searchResult').className =
      +        'form-control-plaintext alert alert-danger';
      +    document.getElementById('searchResult').innerHTML =
      +        'No delegation information';
      +} else {
      +    document.getElementById('searchResultContainer').style.display = 'flex';
      +    document.getElementById('searchResult').className =
      +        'form-control-plaintext alert alert-success';
      +    document.getElementById('searchResult').innerHTML = 'Active Delegations';
      +}
      +
      + +
      //expiring delegations function
      +if (delegationdata[0] == null) {
      +    console.log('No delegation information');
      +    document.getElementById('searchResultContainer').style.display = 'flex';
      +    document.getElementById('searchResult').className =
      +        'form-control-plaintext alert alert-danger';
      +    document.getElementById('searchResult').innerHTML =
      +        'No delegation information';
      +} else {
      +    document.getElementById('searchResultContainer').style.display = 'flex';
      +    document.getElementById('searchResult').className =
      +        'form-control-plaintext alert alert-success';
      +    document.getElementById('searchResult').innerHTML = 'Expiring Delegations';
      +}
      +
      + +

      The result from the query is an array of objects. The results are displayed in a simple list.

      + +

      The active delegations functions returns the following values and are displayed on the UI as per below.

      + +
        +
      1. delegator - The user that made the delegation
      2. +
      3. delegatee - The user that the delegations has been made to
      4. +
      5. vesting_shares - The amount of VESTS that has been delegated
      6. +
      7. min_delegation_time - The time from which the delegation will be active
      8. +
      + +
      //active delegations function
      +delegationdata.forEach(newObj => {
      +    name = newObj.delegatee;
      +    shares = newObj.vesting_shares;
      +    document.getElementById('delegationList').innerHTML +=
      +        delegator + ' delegated ' + shares + ' to ' + name + '<br>';
      +});
      +
      + +

      The expiring delegations function returns the following values and are displayed on the UI as per below.

      + +
        +
      1. vesting_shares - The amount of VESTS that is pending expiration
      2. +
      3. expiration - The date at which the delegation will expire and the VESTS will be available again
      4. +
      + +
      //expiring delegations function
      +delegationdata.forEach(newObj => {
      +    shares = newObj.vesting_shares;
      +    date = expiration;
      +    document.getElementById('delegationList').innerHTML +=
      +        shares + ' will be released at ' + date + '<br>';
      +});
      +
      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/27_get_delegations_by_user
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/get_follower_and_following_list.html b/docs/tutorials-javascript/get_follower_and_following_list.html new file mode 100644 index 0000000000000000000000000000000000000000..582d3f97951833dd4673dcfba045bef62f7f98da --- /dev/null +++ b/docs/tutorials-javascript/get_follower_and_following_list.html @@ -0,0 +1,461 @@ + + + + + + + + + + + + + + + + + + +JS: Get Follower And Following List | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Get Follower And Following List + + +

      + +

      Get the followers of a user/author & the authors that user is following.

      +
      + + +

      Full, runnable src of Get Follower And Following List can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will take you through the process of calling both the follower and following functions from the STEEM API.

      + +

      Intro

      + +

      We are using the call operation provided by the dsteem library to pull the follow information for a specified user account. There are 4 variables required to execute this operation:

      + +
        +
      1. username - The specific user for which the follower(ing) list will be retrieved.
      2. +
      3. startFollower(ing) - The starting letter(s) or name for the search query.
      4. +
      5. followType - This value is set to blog and includes all users following or being followed by the user.
      6. +
      7. limit - The maximum number of lines to be returned by the query.
      8. +
      + +

      A simple HTML interface is used to capture the required information after which the function is executed.

      + +

      Steps

      + +
        +
      1. Configure connection Configuration of dsteem to communicate with the Steem blockchain
      2. +
      3. Input variables Collecting the required inputs via an HTML UI
      4. +
      5. Get followers/following Get the followers or users being followed
      6. +
      7. Display Display the array of results on the UI
      8. +
      + +

      1. Configure connection

      + +

      As usual, we have a public/app.js file which holds the Javascript segment of the tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +let opts = {};
      +//define network parameters
      +opts.addressPrefix = 'STM';
      +opts.chainId =
      +    '0000000000000000000000000000000000000000000000000000000000000000';
      +//connect to a steem node, production in this case
      +const client = new dsteem.Client('https://api.steemit.com');
      +
      + +

      Above, we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint.

      + +

      2. Input variables

      + +

      The required parameters for the follow operation is recorded via an HTML UI that can be found in the public/index.html file. The values have been pre-populated for ease of use but are editable.

      + +

      The parameter values are allocated as seen below once the user clicks on the “Get Followers” or “Get Following” button. +The two queries are very similar and run from two different functions activated from a button on the UI. The first line of both functions is used to clear the display before new information is queried.

      + +
      //Followers function
      +window.submitFollower = async () => {
      +    //clear list
      +    document.getElementById('followList').innerHTML = '';
      +
      +    //get user name
      +    const username = document.getElementById('username').value;
      +    //get starting letters / word
      +    const startFollow = document.getElementById('startFollow').value;
      +    //get limit
      +    var limit = document.getElementById('limit').value;
      +
      + +

      3. Get followers/following

      + +

      A list of followers or users being followed is called from the database with the follow_api available in the SteemJS library.

      + +
      //get list of followers
      +//getFollowers(following, startFollower, followType, limit)
      +    let followlist = await client.call('follow_api', 'get_followers', [
      +        username,
      +        startFollow,
      +        'blog',
      +        limit,
      +    ]);
      +
      +    document.getElementById('followResultContainer').style.display = 'flex';
      +    document.getElementById('followResult').className = 'form-control-plaintext alert alert-success';
      +    document.getElementById('followResult').innerHTML = 'Followers';
      +
      +
      +//get list of authors you are following
      +//getFollowing(follower, startFollowing, followType, limit)
      +    let followlist = await client.call('follow_api', 'get_following', [
      +        username,
      +        startFollow,
      +        'blog',
      +        limit,
      +    ]);
      +
      +    document.getElementById('followResultContainer').style.display = 'flex';
      +    document.getElementById('followResult').className = 'form-control-plaintext alert alert-success';
      +    document.getElementById('followResult').innerHTML = 'Following';
      +
      +
      + +

      4. Display

      + +

      The result returned from the query is an array of objects. The follower(ing) value from that array is displayed on both the UI and the console via a simple forEach array method.

      + +
      followlist.forEach(newObj => {
      +    name = newObj.follower;
      +    document.getElementById('followList').innerHTML += name + '<br>';
      +    console.log(name);
      +});
      +
      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/19_get_follower_and_following_list
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/get_post_comments.html b/docs/tutorials-javascript/get_post_comments.html new file mode 100644 index 0000000000000000000000000000000000000000..db9330bce7472f4a616d83451f202c7c9ed79749 --- /dev/null +++ b/docs/tutorials-javascript/get_post_comments.html @@ -0,0 +1,491 @@ + + + + + + + + + + + + + + + + + + +JS: Get Post Comments | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Get Post Comments + + +

      + +

      By the end of this tutorial you would know how to get comments made by others on any post.

      +
      + + +

      Full, runnable src of Get Post Comments can be downloaded as part of the JS tutorials repository. +

      + +

      The purpose of this tutorial is to a) demonstrate how to get a list of articles from the trending list on the blockchain, and b) fetch the contents of the selected post to display its title and body and c) fetch comments of the post and display them with author, body, created time and number of votes.

      + +

      We will also explain the most commonly used fields from the response object as well as parse body of each comment.

      + +

      Intro

      + +

      Each post might have comments/replies that is interesting and contributes to the topic and discussion. Steem offers out of box API for pulling replies for particular post with get_content_replies. We will fetch replies and list them in simple user interface.

      + +

      Steps

      + +
        +
      1. Fetching posts Getting trending posts
      2. +
      3. Post comments Open post and fetch comments
      4. +
      5. Query result Result of the query
      6. +
      + +

      1. Fetching post

      + +

      As mentioned in our previous tutorials we can fetch various lists of posts with different filters. Here, we are reusing some parts of that tutorial to list the top 5 trending posts. And we parse content of selected post to display few fields in a meaningful way.

      + +

      2. Post comments

      + +

      On selection of a particular post from the list, openPost function is fired as it is explained in Get Post Details tutorial. This function will call the get_content function to fetch content of the post. Right after root post is displayed properly, we use get_content_replies function to fetch comments made on that post, function requires author and permlink of the root post to fetch its comments.

      + +
      client.database.call('get_content_replies', [author, permlink]).then(result => {
      +    const comments = [];
      +    for (var i = 0; i < result.length; i++) {
      +        comments.push(
      +            `<div class="list-group-item list-group-item-action flex-column align-items-start">\
      +            <div class="d-flex w-100 justify-content-between">\
      +              <h5 class="mb-1">@${result[i].author}</h5>\
      +              <small class="text-muted">${new Date(
      +                  result[i].created
      +              ).toString()}</small>\
      +            </div>\
      +            <p class="mb-1">${md.render(result[i].body)}</p>\
      +            <small class="text-muted">&#9650; ${result[i].net_votes}</small>\
      +          </div>`
      +        );
      +    }
      +
      +    document.getElementById('postComments').style.display = 'block';
      +    document.getElementById('postComments').innerHTML = comments.join('');
      +});
      +
      + +

      We iterate each comment and format them properly in comments array. As mentioned in Get Post Details tutorial, we use remarkable library to parse the body of each comment into a readable format. Author, comment body, created time and number of votes on that comment is displayed with simple user interface.

      + +
      document.getElementById('postList').style.display = 'block';
      +document.getElementById('postBody').style.display = 'none';
      +document.getElementById('postComments').style.display = 'none';
      +
      + +

      The “go back” function simply hides and shows the post list.

      + +

      3. Query result

      + +

      The result is returned from the post content as a JSON object with the following properties:

      + +
      [
      +    {
      +        "id": 37338948,
      +        "author": "demo",
      +        "permlink": "re-join-team-steemit-at-tokenfest-20180500t181413163z",
      +        "category": "steemit",
      +        "parent_author": "steemit",
      +        "parent_permlink": "join-team-steemit-at-tokenfest",
      +        "title": "",
      +        "body": "Thank you for sharing",
      +        "json_metadata":
      +            "{\"tags\":[\"steemit\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}",
      +        "last_update": "2018-03-07T23:22:54",
      +        "created": "2018-05-00T20:56:36",
      +        "active": "2018-05-06T01:40:21",
      +        "last_payout": "1970-01-01T00:00:00",
      +        "depth": 1,
      +        "children": 1,
      +        "net_rshares": "11453442114933",
      +        "abs_rshares": "11454054795840",
      +        "vote_rshares": "11454054795840",
      +        "children_abs_rshares": "13568695606090",
      +        "cashout_time": "2018-05-07T20:56:36",
      +        "max_cashout_time": "1969-12-31T23:59:59",
      +        "total_vote_weight": 3462435,
      +        "reward_weight": 10000,
      +        "total_payout_value": "0.000 SBD",
      +        "curator_payout_value": "0.000 SBD",
      +        "author_rewards": 0,
      +        "net_votes": 77,
      +        "root_comment": 37338948,
      +        "max_accepted_payout": "0.000 SBD",
      +        "percent_steem_dollars": 10000,
      +        "allow_replies": true,
      +        "allow_votes": true,
      +        "allow_curation_rewards": true,
      +        "beneficiaries": [],
      +        "url":
      +            "/steemit/@steemitblog/join-team-steemit-at-tokenfest#@demo/re-join-team-steemit-at-tokenfest-20180500t181413163z",
      +        "root_title": "Join Team Steemit at TokenFest!",
      +        "pending_payout_value": "0.436 SBD",
      +        "total_pending_payout_value": "0.000 STEEM",
      +        "active_votes": [
      +            {
      +                "voter": "steemitblog",
      +                "weight": 0,
      +                "rshares": "1870813909383",
      +                "percent": 10000,
      +                "reputation": "128210130644387",
      +                "time": "2018-03-07T20:56:36"
      +            },
      +            {
      +                "voter": "kevinwong",
      +                "weight": 526653,
      +                "rshares": "2208942520687",
      +                "percent": 5000,
      +                "reputation": "374133832002581",
      +                "time": "2018-03-08T04:27:00"
      +            }
      +        ],
      +        "replies": [],
      +        "author_reputation": "128210130644387",
      +        "promoted": "0.000 SBD",
      +        "body_length": 0,
      +        "reblogged_by": []
      +    },
      +    {
      +        "id": 37338987,
      +        "etc.": "etc"
      +    }
      +]
      +
      + +

      From this result, you have access to comments made on selected post.

      + +

      To Run the tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/07_get_post_comments
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/get_post_details.html b/docs/tutorials-javascript/get_post_details.html new file mode 100644 index 0000000000000000000000000000000000000000..fe931747190c0dbaa18fb2fe97fa3156947c7bc3 --- /dev/null +++ b/docs/tutorials-javascript/get_post_details.html @@ -0,0 +1,533 @@ + + + + + + + + + + + + + + + + + + +JS: Get Post Details | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Get Post Details + + +

      + +

      By the end of this tutorial you would know how to get post details and use them appropriately.

      +
      + + +

      Full, runnable src of Get Post Details can be downloaded as part of the JS tutorials repository. +

      + +

      The purpose of this tutorial is to a) demonstrate how to get a list of articles from the trending list on the blockchain, and b) fetch the contents of the selected post to display its title and body.

      + +

      We will also explain the most commonly used fields from the response object as well as parse body of the post.

      + +

      Intro

      + +

      Accounts have unique permlink - permanent link for each of their posts. And Steem blockchain provides API to directly fetch current state of the post and its details. We will be using get_content to retrieve additional details. We can easily reformat data in a way that fits out application.

      + +

      Steps

      + +
        +
      1. Fetching posts Trending posts list
      2. +
      3. Post content Extract content of the selected post
      4. +
      5. Query result Returned data
      6. +
      + +

      1. Fetching posts

      + +

      As mentioned in our previous tutorial we can fetch various lists of posts with different filters. Here, we are reusing some parts of that tutorial to list the top 5 trending posts.

      + +
      var query = {
      +    tag: '', // This tag is used to filter the results by a specific post tag.
      +    limit: 5, // This allows us to limit the total to 5 items.
      +    truncate_body: 1, // This will truncate the body of each post to 1 character, which is useful if you want to work with lighter array.
      +};
      +
      + +

      2. Post content

      + +

      On selection of a particular post from the list, openPost function is fired. This function will call the get_content function to fetch content of the post. get_content requires author and permlink of the post to fetch its data.

      + +
      client.database.call('get_content', [author, permlink]).then(result => {
      +    const md = new Remarkable({ html: true, linkify: true });
      +
      +    const body = md.render(result.body);
      +
      +    const content = `<div class='pull-right'><button onclick=goback()>Close</button></div><br><h2>${
      +        result.title
      +    }</h2><br>${body}<br>`;
      +
      +    document.getElementById('postList').style.display = 'none';
      +    document.getElementById('postBody').style.display = 'block';
      +    document.getElementById('postBody').innerHTML = content;
      +});
      +
      + +

      Steem allows any text-based format for the body, but apps often follow standard markdown with mix of few html tags. After we have fetched the content, we can use the remarkable library to parse the body of the post into a readable format. The title and body of the post are then displayed with a button at the top right corner to switch back to the post list.

      + +
      document.getElementById('postList').style.display = 'block';
      +document.getElementById('postBody').style.display = 'none';
      +
      + +

      The “go back” function simply hides and shows the post list.

      + +

      3. Query result

      + +

      The result is returned from the post content as a JSON object with the following properties:

      + +
      {
      +    "id": 37338948,
      +    "author": "steemitblog",
      +    "permlink": "join-team-steemit-at-tokenfest",
      +    "category": "steemit",
      +    "parent_author": "",
      +    "parent_permlink": "steemit",
      +    "title": "Join Team Steemit at TokenFest!",
      +    "body":
      +        "<a href=\"https://tokenfest.adria.digital\"><img src=\"https://i.imgur.com/fOScDIW.png\"/></a>\n\nHello Steemians! If you’d like to meet Team Steemit live-in-person, or are just interested in attending what promises to be a great blockchain conference, join us at <a href=\"https://tokenfest.adria.digital/\">TokenFest</a> in San Francisco from March 15th to 16th. \n\nSteemit CEO, Ned Scott, will be participating in a fireside chat alongside Steemit’s CTO, Harry Schmidt, as well as the creator of Utopian.io, Diego Pucci. Steemit will also be hosting the opening party on Thursday night and we’d certainly love to meet as many of you as possible IRL, so head on over to https://tokenfest.adria.digital/ and get your tickets while you can. \n\n*Team Steemit*",
      +    "json_metadata":
      +        "{\"tags\":[\"steemit\",\"tokenfest\",\"conference\"],\"image\":[\"https://i.imgur.com/fOScDIW.png\"],\"links\":[\"https://tokenfest.adria.digital\",\"https://tokenfest.adria.digital/\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}",
      +    "last_update": "2018-03-07T23:22:54",
      +    "created": "2018-03-07T20:56:36",
      +    "active": "2018-03-13T01:40:21",
      +    "last_payout": "1970-01-01T00:00:00",
      +    "depth": 0,
      +    "children": 29,
      +    "net_rshares": "11453442114933",
      +    "abs_rshares": "11454054795840",
      +    "vote_rshares": "11454054795840",
      +    "children_abs_rshares": "13568695606090",
      +    "cashout_time": "2018-03-14T20:56:36",
      +    "max_cashout_time": "1969-12-31T23:59:59",
      +    "total_vote_weight": 3462435,
      +    "reward_weight": 10000,
      +    "total_payout_value": "0.000 SBD",
      +    "curator_payout_value": "0.000 SBD",
      +    "author_rewards": 0,
      +    "net_votes": 77,
      +    "root_comment": 37338948,
      +    "max_accepted_payout": "0.000 SBD",
      +    "percent_steem_dollars": 10000,
      +    "allow_replies": true,
      +    "allow_votes": true,
      +    "allow_curation_rewards": true,
      +    "beneficiaries": [],
      +    "url": "/steemit/@steemitblog/join-team-steemit-at-tokenfest",
      +    "root_title": "Join Team Steemit at TokenFest!",
      +    "pending_payout_value": "46.436 SBD",
      +    "total_pending_payout_value": "0.000 STEEM",
      +    "active_votes": [
      +        {
      +            "voter": "steemitblog",
      +            "weight": 0,
      +            "rshares": "1870813909383",
      +            "percent": 10000,
      +            "reputation": "128210130644387",
      +            "time": "2018-03-07T20:56:36"
      +        },
      +        {
      +            "voter": "kevinwong",
      +            "weight": 526653,
      +            "rshares": "2208942520687",
      +            "percent": 5000,
      +            "reputation": "374133832002581",
      +            "time": "2018-03-08T04:27:00"
      +        }
      +    ],
      +    "replies": [],
      +    "author_reputation": "128210130644387",
      +    "promoted": "0.000 SBD",
      +    "body_length": 754,
      +    "reblogged_by": []
      +}
      +
      + +

      From this result, you have access to everything associated with the selected post, including additional metadata which is a JSON string that must be decoded to use.

      + +
        +
      • id - Unique identifier that is mostly an implementation detail (best to ignore). To uniquely identify content, it’s best to use author/permlink.
      • +
      • author - The author account name of the content.
      • +
      • permlink - Permanent link of the content, must be unique in the scope of the author.
      • +
      • category - The main category/tag this content belongs to.
      • +
      • parent_author - Parent author, in case this content is a comment (reply).
      • +
      • parent_permlink - Parent permanent link, this will be the same as category for posts and will contain the permlink of the content being replied to in the case of a comment.
      • +
      • title - Title of the content.
      • +
      • body - Body of the content.
      • +
      • json_metadata - JSON metadata that holds extra information about the content. Note: The format for this field is not guaranteed to be valid JSON.
      • +
      • last_update - The date and time of the last update to this content.
      • +
      • created - The date and time this content was created.
      • +
      • active - The last time this content was “touched” by voting or reply.
      • +
      • last_payout - Time of last payout.
      • +
      • depth - Used to track max nested depth.
      • +
      • children - Used to track the total number of children, grandchildren, etc. …
      • +
      • net_rshares - Reward is proportional to liniar rshares, this is the sum of all votes (positive and negative reward sum)
      • +
      • abs_rshares - This was used to track the total absolute weight of votes for the purpose of calculating cashout_time.
      • +
      • vote_rshares - Total positive rshares from all votes. Used to calculate delta weights. Needed to handle vote changing and removal.
      • +
      • children_abs_rshares - This was used to calculate cashout time of a discussion.
      • +
      • cashout_time - 7 days from the created date.
      • +
      • max_cashout_time - Unused.
      • +
      • total_vote_weight - The total weight of voting rewards, used to calculate pro-rata share of curation payouts.
      • +
      • reward_weight - Weight/percent of reward.
      • +
      • total_payout_value - Tracks the total payout this content has received over time, measured in the debt asset.
      • +
      • curator_payout_value - Tracks the curator payout this content has received over time, measured in the debt asset.
      • +
      • author_rewards - Tracks the author payout this content has received over time, measured in the debt asset.
      • +
      • net_votes - Net positive votes
      • +
      • root_comment - ID of the original content.
      • +
      • max_accepted_payout - Value of the maximum payout this content will receive.
      • +
      • percent_steem_dollars - The percent of Steem Dollars to key, unkept amounts will be received as STEEM Power.
      • +
      • allow_replies - Allows content to disable replies.
      • +
      • allow_votes - Allows content to receive votes.
      • +
      • allow_curation_rewards - Allows curators of this content receive rewards.
      • +
      • beneficiaries - The list of up to 8 beneficiary accounts for this content as well as the percentage of the author reward they will receive in STEEM Power.
      • +
      • url - The end of the url to this content.
      • +
      • root_title - Title of the original content (useful in replies).
      • +
      • pending_payout_value - Pending payout amount if 7 days has not yet elapsed.
      • +
      • total_pending_payout_value - Total pending payout amount if 7 days has not yet elapsed.
      • +
      • active_votes - The entire voting list array, including upvotes, downvotes, and unvotes; used to calculate net_votes.
      • +
      • replies - Unused.
      • +
      • author_reputation - Author’s reputation.
      • +
      • promoted - If post is promoted, how much has been spent on promotion.
      • +
      • body_length - Total content length.
      • +
      • reblogged_by - Unused.
      • +
      + +

      That’s it!

      + +

      To Run the tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/05_get_post_details
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/get_posts.html b/docs/tutorials-javascript/get_posts.html new file mode 100644 index 0000000000000000000000000000000000000000..534659dbeea9124e2fe42e658c8e968e7e0666a6 --- /dev/null +++ b/docs/tutorials-javascript/get_posts.html @@ -0,0 +1,537 @@ + + + + + + + + + + + + + + + + + + +JS: Get Posts | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Get Posts + + +

      + +

      Query for the most recent posts having a specific tag, using a Steem filter

      +
      + + +

      Full, runnable src of Get Posts can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial pulls a list of the posts from different tags or filters and displays them. +Tags and filters are different. It’s important to understand them.

      + +

      Intro

      + +

      Tags & Filters are two different.

      + +

      A tag in Steem is much like a tag in Gmail, or Twitter. It’s a way to describe a +post as being relevant to a particular topic. Posts may have up to five tags on them, but there are limits when +querying (more on this later).

      + +

      A filter in Steem is a kind of built-in ‘view’ or ordering of posts. You can use the following filters: +trending, hot, new, active, and promoted. You’ll get a feel for the subtleties of each as you create your +application.

      + +

      Steps

      + +
        +
      1. UI - A brief description of the UI and inputting our query values
      2. +
      3. Construct query - Assemble the information from the UI into our filter & query
      4. +
      5. API call - Make the call to Steem
      6. +
      7. Handle response - Accept the response in a promise callback, then render the results
      8. +
      9. Example post object - An example post object from the response list
      10. +
      + +

      1. UI

      + +

      The source HTML for our UI can be found in public/index.html

      + +

      There are three input components to the UI.

      + +
        +
      • +

        Filters: where we select one of the five built in filter types.

        + +

        <select id="filters" class="form-control" >...

        +
      • +
      • +

        Tag: where we type in a single, arbitrary tag. (The Steem blockchain does not support searching on multiple tags)

        + +

        <input id="tag" class="form-control"/>

        +
      • +
      • +

        Get Posts: It’s a button. You click it, and we move on to assembling our post. +<button class="btn btn-primary" onclick="getPosts()">Get Posts</button>

        +
      • +
      + +

      Step-01-UI.png

      + +

      2. Construct query

      + +

      The filter and query are constructed within the async, globally available function getPosts

      + +

      The limit property you see below limits the total number of posts we’ll get back to something +managable. In this case, five.

      + +
      const filter = document.getElementById('filters').value;
      +const query = {
      +    tag: document.getElementById('tag').value,
      +    limit: 5,
      +};
      +
      + +

      3. API call

      + +

      The api call itself is fairly simple. We use getDiscussions. +The first argument, filter, is a simple string. +The second argument is our query object. +Like most of dsteem’s api functions, getDiscussions returns a Promise.

      + +
      client.database
      +    .getDiscussions(filter, query)
      +    .th..
      +
      + +

      4. Handle response

      + +

      When the promise returned by getDiscussions completes successfully, the function we pass to .then() +iterates over the entries response, and constructs html from it.

      + +
      ...ery)
      +.then(result => {
      +            console.log("Response received:", result);
      +            if (result) {
      +                var posts = [];
      +                result.forEach(post => {
      +                    const json = JSON.parse(post.json_metadata);
      +                    const image = json.image ? json.image[0] : '';
      +                    const title = post.title;
      +                    const author = post.author;
      +                    const created = new Date(post.created).toDateString();
      +                    posts.push(
      +                        `<div class="list-group-item"><h4 class="list-group-item-heading">${title}</h4><p>by ${author}</p><center><img src="${image}" class="img-responsive center-block" style="max-width: 450px"/></center><p class="list-group-item-text text-right text-nowrap">${created}</p></div>`
      +                    );
      +                });
      +
      +                document.getElementById('postList').innerHTML = posts.join('');
      +            } else {
      +                document.getElementById('postList').innerHTML = "No result.";
      +            }
      +        })
      +
      + +

      5. Example post object

      + +

      The result returned from the service is a JSON list. This is an example list with one entry.

      + +
      [
      +    {
      +        "id": 37338948,
      +        "author": "steemitblog",
      +        "permlink": "join-team-steemit-at-tokenfest",
      +        "category": "steemit",
      +        "parent_author": "",
      +        "parent_permlink": "steemit",
      +        "title": "Join Team Steemit at TokenFest!",
      +        "body":
      +            "<a href=\"https://tokenfest.adria.digital\"><img src=\"https://i.imgur.com/fOScDIW.png\"/></a>\n\nHello Steemians! If you’d like to meet Team Steemit live-in-person, or are just interested in attending what promises to be a great blockchain conference, join us at <a href=\"https://tokenfest.adria.digital/\">TokenFest</a> in San Francisco from March 15th to 16th. \n\nSteemit CEO, Ned Scott, will be participating in a fireside chat alongside Steemit’s CTO, Harry Schmidt, as well as the creator of Utopian.io, Diego Pucci. Steemit will also be hosting the opening party on Thursday night and we’d certainly love to meet as many of you as possible IRL, so head on over to https://tokenfest.adria.digital/ and get your tickets while you can. \n\n*Team Steemit*",
      +        "json_metadata":
      +            "{\"tags\":[\"steemit\",\"tokenfest\",\"conference\"],\"image\":[\"https://i.imgur.com/fOScDIW.png\"],\"links\":[\"https://tokenfest.adria.digital\",\"https://tokenfest.adria.digital/\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}",
      +        "last_update": "2018-03-07T23:22:54",
      +        "created": "2018-03-07T20:56:36",
      +        "active": "2018-03-13T01:40:21",
      +        "last_payout": "1970-01-01T00:00:00",
      +        "depth": 0,
      +        "children": 29,
      +        "net_rshares": "11453442114933",
      +        "abs_rshares": "11454054795840",
      +        "vote_rshares": "11454054795840",
      +        "children_abs_rshares": "13568695606090",
      +        "cashout_time": "2018-03-14T20:56:36",
      +        "max_cashout_time": "1969-12-31T23:59:59",
      +        "total_vote_weight": 3462435,
      +        "reward_weight": 10000,
      +        "total_payout_value": "0.000 SBD",
      +        "curator_payout_value": "0.000 SBD",
      +        "author_rewards": 0,
      +        "net_votes": 77,
      +        "root_comment": 37338948,
      +        "max_accepted_payout": "0.000 SBD",
      +        "percent_steem_dollars": 10000,
      +        "allow_replies": true,
      +        "allow_votes": true,
      +        "allow_curation_rewards": true,
      +        "beneficiaries": [],
      +        "url": "/steemit/@steemitblog/join-team-steemit-at-tokenfest",
      +        "root_title": "Join Team Steemit at TokenFest!",
      +        "pending_payout_value": "46.436 SBD",
      +        "total_pending_payout_value": "0.000 STEEM",
      +        "active_votes": [
      +            {
      +                "voter": "steemitblog",
      +                "weight": 0,
      +                "rshares": "1870813909383",
      +                "percent": 10000,
      +                "reputation": "128210130644387",
      +                "time": "2018-03-07T20:56:36"
      +            },
      +            {
      +                "voter": "kevinwong",
      +                "weight": 526653,
      +                "rshares": "2208942520687",
      +                "percent": 5000,
      +                "reputation": "374133832002581",
      +                "time": "2018-03-08T04:27:00"
      +            }
      +        ],
      +        "replies": [],
      +        "author_reputation": "128210130644387",
      +        "promoted": "0.000 SBD",
      +        "body_length": 754,
      +        "reblogged_by": []
      +    }
      +    ...
      +]
      +
      + +

      And that’s all there is to getting top-level posts. See Get post comments for getting comments

      + +

      To Run the tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/04_get_posts
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/get_state_replacement_api.html b/docs/tutorials-javascript/get_state_replacement_api.html new file mode 100644 index 0000000000000000000000000000000000000000..043cf803c7d0cf581b62bf877343d0b87afb34b6 --- /dev/null +++ b/docs/tutorials-javascript/get_state_replacement_api.html @@ -0,0 +1,878 @@ + + + + + + + + + + + + + + + + + + +JS: Get State Replacement Api | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Get State Replacement Api + + +

      + +

      This is a list of replacement API calls for each of the different routes available from the getState function.

      +
      + + +

      Full, runnable src of Get State Replacement Api can be downloaded as part of the JS tutorials repository. +

      + +

      Intro

      + +

      With the getState API call retrieving ALL block information and now being deprecated, a more efficient process is required to call only the dataset that you require for a your specific application. There are a couple different routes (data groupings) that can be found within the getState function. Each of these will be described and a replacement API call will be discussed.

      + +

      Included in this single getState call is the list of content being requested, the latest Dynamic Global Properties, the latest Account Data for the authors included in the results, and the current feed price. The getState function is great in order to get the first 20 posts (and account information based on the post authors) based on the selected tag. If the query field is left empty getState automatically calls info based on the trending tag. getState can also be used to call information for a specific account.

      + +

      The call routes that will be covered are for:

      + +
        +
      1. accounts
      2. +
      3. content
      4. +
      5. feed_price
      6. +
      7. props
      8. +
      9. tags
      10. +
      11. tag_idx
      12. +
      13. witness_schedule
      14. +
      15. witnesses
      16. +
      + +

      Current getState() result:

      + +
      {
      +  "current_route": "",
      +  "props": {
      +    "head_block_number": 0,
      +    "head_block_id": "0000000000000000000000000000000000000000",
      +    "time": "1970-01-01T00:00:00",
      +    "current_witness": "",
      +    "total_pow": "18446744073709551615",
      +    "num_pow_witnesses": 0,
      +    "virtual_supply": "0.000 STEEM",
      +    "current_supply": "0.000 STEEM",
      +    "confidential_supply": "0.000 STEEM",
      +    "current_sbd_supply": "0.000 STEEM",
      +    "confidential_sbd_supply": "0.000 STEEM",
      +    "total_vesting_fund_steem": "0.000 STEEM",
      +    "total_vesting_shares": "0.000 STEEM",
      +    "total_reward_fund_steem": "0.000 STEEM",
      +    "total_reward_shares2": "0",
      +    "pending_rewarded_vesting_shares": "0.000 STEEM",
      +    "pending_rewarded_vesting_steem": "0.000 STEEM",
      +    "sbd_interest_rate": 0,
      +    "sbd_print_rate": 10000,
      +    "maximum_block_size": 0,
      +    "current_aslot": 0,
      +    "recent_slots_filled": "0",
      +    "participation_count": 0,
      +    "last_irreversible_block_num": 0,
      +    "vote_power_reserve_rate": 40,
      +    "average_block_size": 0,
      +    "current_reserve_ratio": 1,
      +    "max_virtual_bandwidth": "0"
      +  },
      +  "tag_idx": {"trending": []},
      +  "tags": {},
      +  "content": {},
      +  "accounts": {},
      +  "witnesses": {},
      +  "discussion_idx": {},
      +  "witness_schedule": {
      +    "id": 0,
      +    "current_virtual_time": "0",
      +    "next_shuffle_block_num": 1,
      +    "current_shuffled_witnesses": [],
      +    "num_scheduled_witnesses": 1,
      +    "top19_weight": 1,
      +    "timeshare_weight": 5,
      +    "miner_weight": 1,
      +    "witness_pay_normalization_factor": 25,
      +    "median_props": {
      +      "account_creation_fee": "0.000 STEEM",
      +      "maximum_block_size": 131072,
      +      "sbd_interest_rate": 1000
      +    },
      +    "majority_version": "0.0.0",
      +    "max_voted_witnesses": 19,
      +    "max_miner_witnesses": 1,
      +    "max_runner_witnesses": 1,
      +    "hardfork_required_witnesses": 17
      +  },
      +  "feed_price": {"base": "0.000 STEEM", "quote": "0.000 STEEM"},
      +  "error": ""
      +}
      +
      + +

      Use cases and data sets

      + +

      Route: getState(‘accounts’)

      + +
        +
      • +

        Purpose: Returns a list of account objects for the top 20 trending post authors or a single account if specified.

        +
      • +
      • +

        Replacement API call:

        +
      • +
      + +
      databaseAPI.getAccounts(['username'])
      +
      + +

      In order to get the full compliment of account information for a specified account, getAccounts can be used as in the example above. If you require this information for the top 20 trending authors, you can use the function as per getState('content') to retrieve the author names and then get the information per individual. The account information can be used to track balances, vesting, followers, witness votes and pending rewards among others.

      + +
        +
      • Expected result:
      • +
      + +
      {
      +  "active": {
      +    "weight_threshold": 1,
      +    "account_auths": [],
      +    "key_auths": []
      +  },
      +  "average_bandwidth": 0,
      +  "average_market_bandwidth": 0,
      +  "balance": "0.000 STEEM",
      +  "can_vote": true,
      +  "comment_count": 0,
      +  "created": "2016-03-26T08:26:21",
      +  "curation_rewards": 396530808,
      +  "delegated_vesting_shares": "505881.492379 VESTS",
      +  "guest_bloggers": [],
      +  "id": 340,
      +  "json_metadata": {"profile":{"name":,"profile_image":}},
      +  "last_account_recovery": "1970-01-01T00:00:00",
      +  "last_account_update": "2018-08-30T01:48:15",
      +  "last_bandwidth_update": "1970-01-01T00:00:00",
      +  "last_market_bandwidth_update": "1970-01-01T00:00:00",
      +  "last_owner_update": "2017-11-22T03:58:09",
      +  "last_post": "2018-09-26T18:32:30",
      +  "last_root_post": "2018-09-26T16:07:51",
      +  "last_vote_time": "2018-09-26T16:23:09",
      +  "lifetime_bandwidth": 0,
      +  "lifetime_market_bandwidth": 0,
      +  "lifetime_vote_count": 0,
      +  "market_history": [],
      +  "memo_key": "",
      +  "mined": true,
      +  "name": "",
      +  "next_vesting_withdrawal": "1969-12-31T23:59:59",
      +  "other_history": [],
      +  "owner": {
      +    "weight_threshold": 1,
      +    "account_auths": [],
      +    "key_auths": []
      +  },
      +  "pending_claimed_accounts": 0,
      +  "post_bandwidth": 10000,
      +  "post_count": 6289,
      +  "post_history": [],
      +  "posting": {
      +    "weight_threshold": 1,
      +    "account_auths": [],
      +    "key_auths": []
      +  },
      +  "posting_rewards": 30925563,
      +  "proxied_vsf_votes": ["1466563679903716", "754759334883", 0, 0],
      +  "proxy": "",
      +  "received_vesting_shares": "0.000000 VESTS",
      +  "recovery_account": "steem",
      +  "reputation": "",
      +  "reset_account": "null",
      +  "reward_sbd_balance": "0.000 SBD",
      +  "reward_steem_balance": "0.000 STEEM",
      +  "reward_vesting_balance": "967.889424 VESTS",
      +  "reward_vesting_steem": "0.479 STEEM",
      +  "savings_balance": "0.000 STEEM",
      +  "savings_sbd_balance": "0.000 SBD",
      +  "savings_sbd_last_interest_payment": "1970-01-01T00:00:00",
      +  "savings_sbd_seconds": "0",
      +  "savings_sbd_seconds_last_update": "1970-01-01T00:00:00",
      +  "savings_withdraw_requests": 0,
      +  "sbd_balance": "0.000 SBD",
      +  "sbd_last_interest_payment": "2018-09-08T13:46:15",
      +  "sbd_seconds": "79984344",
      +  "sbd_seconds_last_update": "2018-09-26T17:36:15",
      +  "tags_usage": [],
      +  "to_withdraw": 0,
      +  "transfer_history": [],
      +  "vesting_balance": "0.000 STEEM",
      +  "vesting_shares": "26772189.757016 VESTS",
      +  "vesting_withdraw_rate": "0.000000 VESTS",
      +  "vote_history": [],
      +  "voting_manabar": {"current_mana": "5514091390534", "last_update_time": 1537978989},
      +  "voting_power": 2099,
      +  "withdraw_routes": 0,
      +  "withdrawn": 0,
      +  "witness_votes": [],
      +  "witnesses_voted_for": 24
      +}
      +
      + +

      Route: getState(‘content’)

      + +
        +
      • +

        Purpose: The content in getState calls the top 20 trending posts

        +
      • +
      • +

        Replacement API call:

        +
      • +
      + +
      databaseAPI.call('get_discussions_by_trending',[{limit:20}])
      +
      + +

      While getState() truncates the post body at 1024 characters, getDiscussionsBy will not truncate the body unless you provide a truncate_body value in the query structure. getDiscussionsBy can be executed by trending, created, active, cashout, payout, votes, children, hot, feed, blog or comments. This provides a wide range by which the posts can be called depending on the specific needs. Within the query parameter specific tags, filters, authors and permlinks can be provided. The limit can also be increased to a maximum of 100 posts where getState is limited to the first 20. You can also refer to the get post tutorial for a simplified database call for posts. The detail provided by this statement can be used to track pending payouts, curator rewards and votes for the trending, or specified posts.

      + +
        +
      • Expected result:
      • +
      + +
      {
      +  "abs_rshares": "60411661082705",
      +  "active": "2018-09-26T19:47:15",
      +  "active_votes": [],
      +  "allow_curation_rewards": true,
      +  "allow_replies": true,
      +  "allow_votes": true,
      +  "author": "therealwolf",
      +  "author_reputation": "100096076084764",
      +  "author_rewards": 0,
      +  "beneficiaries": [],
      +  "body": "......",
      +  "body_length": 4577,
      +  "cashout_time": "2018-10-02T13:52:24",
      +  "category": "witness-update",
      +  "children": 7,
      +  "children_abs_rshares": "60493226759117",
      +  "created": "2018-09-25T13:52:24",
      +  "curator_payout_value": "0.000 SBD",
      +  "depth": 0,
      +  "id": 63318715,
      +  "json_metadata": {"tags":[]},
      +  "last_payout": "1970-01-01T00:00:00",
      +  "last_update": "2018-09-26T19:17:33",
      +  "max_accepted_payout": "100000.000 SBD",
      +  "max_cashout_time": "1969-12-31T23:59:59",
      +  "net_rshares": "60411661082705",
      +  "net_votes": 179,
      +  "parent_author": "",
      +  "parent_permlink": "witness-update",
      +  "pending_payout_value": "80.490 SBD",
      +  "percent_steem_dollars": 10000,
      +  "permlink": "witness-essentials-hf20-ready",
      +  "promoted": "0.000 SBD",
      +  "reblogged_by": [],
      +  "replies": [],
      +  "reward_weight": 10000,
      +  "root_author": "therealwolf",
      +  "root_permlink": "witness-essentials-hf20-ready",
      +  "root_title": "Witness Essentials: HF20 Ready",
      +  "title": "Witness Essentials: HF20 Ready",
      +  "total_payout_value": "0.000 SBD",
      +  "total_pending_payout_value": "0.000 STEEM",
      +  "total_vote_weight": 7795119,
      +  "url": "/witness-update/@therealwolf/witness-essentials-hf20-ready",
      +  "vote_rshares": "60411661082705"
      +}
      +
      + +

      Route: getState(‘feed_price’)

      + +
        +
      • +

        Purpose: The price feed is used by the Steem blockchain when it calculates how many SBD it owes for its author rewards. It is also used to calculate the worth in $US displayed in the wallet. The price feed is the median price feed of the last 3.5 days of all the top 20 witnesses’ price feed.

        +
      • +
      • +

        Replacement API call:

        +
      • +
      + +
      databaseAPI.getCurrentMedianHistoryPrice()
      +
      + +

      This provides the same data as getState but is executed much faster due to the limited amount of information provided by this function.

      + +
        +
      • Expected result:
      • +
      + +
      {
      +  "base": {"amount": 0.887, "symbol": "SBD"},
      +  "quote": {"amount": 1, "symbol": "STEEM"}
      +}
      +
      + +

      Route: getState(‘props’)

      + +
        +
      • +

        Purpose: Provides detailed information of the block properties. Block number, witness, current STEEM and SBD supply, pending rewards and total vesting fund and shares among others.

        +
      • +
      • +

        Replacement API call:

        +
      • +
      + +
      //all block info
      +databaseAPI.getDynamicGlobalProperties()
      +//head block number only
      +blockchainAPI.getCurrentBlockNum()
      +//simple head block info
      +databaseAPI.getBlock(HeadBlockNum)
      +
      + +

      getDynamicGlobalProperties() provides the same level of information and tracks the same values for each created block. You can also call a simplified version of block info containing only the block_id, previous block_id, signing_key, timestamp, witness and witness signature by using the current head block number with the getBlock database call.

      + +
        +
      • Expected result:
      • +
      + +
      {
      +  "average_block_size":122,
      +  "confidential_sbd_supply":"0.000 SBD",
      +  "confidential_supply":"0.000 STEEM",
      +  "current_aslot":26372251,
      +  "current_reserve_ratio":200000000,
      +  "current_sbd_supply":"14921682.900 SBD",
      +  "current_supply":"277501868.004 STEEM",
      +  "current_witness":"ausbitbank",
      +  "delegation_return_period":432000,
      +  "head_block_id":"0190f89c584661d6ffc78e17395df17ea5653197",
      +  "head_block_number":26278044,
      +  "last_irreversible_block_num":26278024,
      +  "max_virtual_bandwidth":"264241152000000000000",
      +  "maximum_block_size":65536,
      +  "num_pow_witnesses":172,
      +  "participation_count":126,
      +  "pending_rewarded_vesting_shares":"483834672.069834 VESTS",
      +  "pending_rewarded_vesting_steem":"237227.812 STEEM",
      +  "recent_slots_filled":"340282366911034938426725082362930003967",
      +  "reverse_auction_seconds":900,
      +  "sbd_interest_rate":0,
      +  "sbd_print_rate":10000,
      +  "sbd_start_percent":900,
      +  "sbd_stop_percent":1000,
      +  "time":"2018-09-26T08:52:33",
      +  "total_pow":514415,
      +  "total_reward_fund_steem":"0.000 STEEM",
      +  "total_reward_shares2":"0",
      +  "total_vesting_fund_steem":"196777383.890 STEEM",
      +  "total_vesting_shares":"397621943253.336916 VESTS",
      +  "virtual_supply":"294324509.379 STEEM",
      +  "vote_power_reserve_rate":10
      +}
      +
      + +

      Route: getState(‘tags’)

      + +
        +
      • +

        Purpose: Calls a list of trending tags with detailed information on each tag. The list is displayed alphabetically.

        +
      • +
      • +

        Replacement API call:

        +
      • +
      + +
      databaseAPI.call('get_trending_tags',[startingValue, limit])
      +
      + +

      The getTrendingTags function calls the same information as with getState but can be limited in the number of results. The data on each tag includes the number of votes and comments made with that tag as well as the total payouts for that tag. This is useful to determine which tags are most popular to assist in effective post creation.

      + +
        +
      • Expected result:
      • +
      + +
      {
      +  "comments": 31203776,
      +  "name": "life",
      +  "net_votes": 54671586,
      +  "top_posts": 4996200,
      +  "total_payouts": "61584243.124 SBD",
      +  "trending": "114450355665"
      +}
      +
      + +

      Route: getState(‘tag_idx’)

      + +
        +
      • +

        Purpose: Provides a list of names (index) of the current tags (according to trending) available on the blockchain with no additional information.

        +
      • +
      • +

        Replacement API call:

        +
      • +
      + +
      databaseAPI.call('get_trending_tags',[startingValue, limit])
      +
      + +

      This information can be gained by the using the same method as for getState('tags') and then only displaying the name object of the array of tags provided. You can refer to the tutorial search tags for a detailed example of this.

      + +
        +
      • Expected result:
      • +
      + +
      {
      +  "life"
      +  "photography"
      +  "kr"
      +  "steemit"
      +  "bitcoin"
      +}
      +
      + +

      Route: getState(‘witness_schedule’)

      + +
        +
      • +

        Purpose: Calls the current round’s schedule. Every round consists of 21 3-second blocks. This includes the top 19 witnesses, a miner witness, and a backup witness. The current_virtual_time is used to aid in choosing the next witness. next_shuffle_block_num indicates when the current list will be shuffled.

        +
      • +
      • +

        Replacement API call:

        +
      • +
      + +
      //full info
      +databaseAPI.call('get_witness_schedule',[])
      +//median props only
      +databaseAPI.getChainProperties()
      +
      + +

      If required you can also call the median_props values as standalone via the second function listed above.

      + +
        +
      • Expected result:
      • +
      + +
      {
      +  "account_subsidy_rd": {
      +    "resource_unit": 10000,
      +    "budget_per_time_unit": 797,
      +    "pool_eq": 157691079,
      +    "max_pool_size": 157691079,
      +    "decay_params": {},
      +  },
      +  "account_subsidy_witness_rd": {
      +    "resource_unit": 10000,
      +    "budget_per_time_unit": 996,
      +    "pool_eq": 9384019,
      +    "max_pool_size": 9384019,
      +    "decay_params": {},
      +  },
      +  "current_shuffled_witnesses": ["followbtcnews", "good-karma", "smooth.witness", "anyx", "thecryptodrive", "jesta", "utopian-io", "cervantes", "roelandp", "aggroed", "blocktrades", "gtg", "xeldal", "lukestokes.mhth", "someguy123", "pfunk", "ausbitbank", "furion", "curie", "timcliff", "clayop"],
      +  "current_virtual_time": "376982753287696133965407589",
      +  "elected_weight": 1,
      +  "hardfork_required_witnesses": 17,
      +  "id": 0,
      +  "majority_version": "0.20.3",
      +  "max_miner_witnesses": 0,
      +  "max_runner_witnesses": 1,
      +  "max_voted_witnesses": 20,
      +  "median_props": {
      +    "account_creation_fee": "3.000 STEEM",
      +    "maximum_block_size": 65536,
      +    "sbd_interest_rate": 0,
      +    "account_subsidy_budget": 797,
      +    "account_subsidy_decay": 347321
      +  },
      +  "min_witness_account_subsidy_decay": 0,
      +  "miner_weight": 1,
      +  "next_shuffle_block_num": 26313756,
      +  "num_scheduled_witnesses": 21,
      +  "timeshare_weight": 5,
      +  "witness_pay_normalization_factor": 25
      +}
      +
      + +

      Route: getState(‘witnesses’)

      + +
        +
      • +

        Purpose: Calls a list of active witnesses with extended details, listed alphabetically

        +
      • +
      • +

        Replacement API call:

        +
      • +
      + +
      databaseAPI.call('get_witnesses_by_vote',['',limit])
      +
      + +

      This detailed information can be used to track the performance of a specific witness when deciding for who to vote or for your own witness statistics. The detail includes the amount of votes, blocks missed and also the SBD exchange rate (feed price) that this witness is reporting. This function calls the info listed according to total votes.

      + +
        +
      • Expected result:
      • +
      + +
      {
      +  "available_witness_account_subsidies": 9138354,
      +  "created": "1970-01-01T00:00:00",
      +  "hardfork_time_vote": "2018-09-25T15:00:00",
      +  "hardfork_version_vote": "0.20.0",
      +  "id": 9493,
      +  "last_aslot": 26387405,
      +  "last_confirmed_block_num": 26293189,
      +  "last_sbd_exchange_update": "2018-09-26T19:54:36",
      +  "last_work": "0000000048bf77f525731f28db7c1aa9ad853a475ccc78e71ea952a7782e5459",
      +  "owner": "gtg",
      +  "pow_worker": 0,
      +  "props": {
      +    "account_creation_fee": "3.000 STEEM",
      +    "maximum_block_size": 65536,
      +    "sbd_interest_rate": 0,
      +    "account_subsidy_budget": 797,
      +    "account_subsidy_decay": 347321
      +  },
      +  "running_version": "0.20.3",
      +  "sbd_exchange_rate": {"base": "0.893 SBD", "quote": "1.000 STEEM"},
      +  "signing_key": "STM5T98tp8jZRbs7zzyCg74o2siqBw2SXxoYaE1MCuwuCPeQwKrju",
      +  "total_missed": 535,
      +  "url": "https://steemit.com/witness-category/@gtg/witness-gtg",
      +  "virtual_last_update": "376717145948220892034052885",
      +  "virtual_position": "240558419146717570415939163840356145056",
      +  "virtual_scheduled_time": "376718433464807443533288610",
      +  "votes": "77454495589313361"
      +}
      +
      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/34_get_state_replacement_api
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/get_voters_list_on_post.html b/docs/tutorials-javascript/get_voters_list_on_post.html new file mode 100644 index 0000000000000000000000000000000000000000..87cda57f1b48d7a1d108d2878edbb1b73c8d39a2 --- /dev/null +++ b/docs/tutorials-javascript/get_voters_list_on_post.html @@ -0,0 +1,448 @@ + + + + + + + + + + + + + + + + + + +JS: Get Voters List On Post | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Get Voters List On Post + + +

      + +

      By the end of this tutorial you would know how to get voters list on any content.

      +
      + + +

      Full, runnable src of Get Voters List On Post can be downloaded as part of the JS tutorials repository. +

      + +

      The purpose of this tutorial is to a) demonstrate how to get a list of articles from the trending list on the blockchain, and b) fetch the voters of the selected post to display the account and date at which they voted.

      + +

      We will also explain the most commonly used fields from the response object.

      + +

      Intro

      + +

      Each post has voters that support content and play big role in reward distribution. Getting details of each voter and their vote value, time, etc. is another crucial information for authors and app developers. We will be using get_active_votes API call to retrieve that information right from Steem blockchain.

      + +

      Steps

      + +
        +
      1. Fetching posts Get trending post list
      2. +
      3. Voter information Voters information on selected post
      4. +
      5. Query result Example of result from query
      6. +
      + +

      1. Fetching posts

      + +

      As mentioned in our previous tutorial we can fetch various lists of posts with different filters. Here, we are reusing some parts of that tutorial to list the top 5 trending posts.

      + +
      var query = {
      +    tag: '', // This tag is used to filter the results by a specific post tag.
      +    limit: 5, // This allows us to limit the total to 5 items.
      +    truncate_body: 1, // This will truncate the body of each post to 1 character, which is useful if you want to work with lighter array.
      +};
      +
      + +

      2. Voter information

      + +

      On selection of a particular post from the list, openPost function is fired. This function will call the get_active_votes function to fetch the voters of the post. get_active_votes requires author and permlink of the post to fetch its data.

      + +
      client.database.call('get_active_votes', [author, permlink]).then(result => {
      +    console.log('votes', result, JSON.stringify(result));
      +
      +    var voters = [];
      +    voters.push(
      +        `<div class='pull-right'><button onclick=goback()>Close</button></div><br>`
      +    );
      +    result.forEach(voter => {
      +        const name = voter.voter;
      +        const time = new Date(voter.time).toDateString();
      +        voters.push(`${name} (${time})`);
      +    });
      +
      +    document.getElementById('postList').style.display = 'none';
      +    document.getElementById('postBody').style.display = 'block';
      +    document.getElementById('postBody').innerHTML = voters.join('<li>');
      +});
      +
      + +
      document.getElementById('postList').style.display = 'block';
      +document.getElementById('postBody').style.display = 'none';
      +
      + +

      The “go back” function simply hides and shows the post list.

      + +

      3. Query result

      + +

      The result is returned from the post content as a JSON object with the following properties:

      + +
      [
      +    {
      +        "voter": "gekko",
      +        "weight": 157,
      +        "rshares": 2626899959,
      +        "percent": 10000,
      +        "reputation": "1185517433922",
      +        "time": "2018-05-08T07:16:09"
      +    },
      +    {
      +        "voter": "embat",
      +        "weight": 154,
      +        "rshares": 2578364521,
      +        "percent": 10000,
      +        "reputation": "161340267374",
      +        "time": "2018-05-08T07:38:24"
      +    }
      +]
      +
      + +

      From this result, you have access to everything associated with the selected post, including additional metadata which is a JSON string that must be decoded to use.

      + +
        +
      • voter - The author account name of the vote.
      • +
      • weight - Weight of the voting power.
      • +
      • rshares - Reward shares.
      • +
      • percent - Percent of vote.
      • +
      • reputation - The reputation of the account that voted.
      • +
      • time - Time the vote was submitted.
      • +
      + +

      To Run the tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/06_get_voters_list_on_post
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/getting_started.html b/docs/tutorials-javascript/getting_started.html new file mode 100644 index 0000000000000000000000000000000000000000..226c2b1f1467a35a2c403260f12df0b4e4603988 --- /dev/null +++ b/docs/tutorials-javascript/getting_started.html @@ -0,0 +1,386 @@ + + + + + + + + + + + + + + + + + + +JS: Getting Started | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Getting Started + + +

      + +

      Prepare your development environment to use Javascript with the Steem blockchain.

      +
      + + +

      Full, runnable src of Getting Started can be downloaded as part of the JS tutorials repository. +

      + +

      For Javascript tutorials, we will use the opensource library dsteem.

      + +

      Node.js

      + +

      To get the most out of these tutorials, you should be familiar with Node.js, ES6 aka es2015, the DOM, and modern Javascript programming practices. +You can still learn a lot of these if they aren’t in your base skill-set; it’ll be much easier if they are.

      + +

      Your Dev Environment

      + +

      These tutorials require Node.js 8.7+. Yarn is nice, but not required. Runnable versions of the tutorials are located in this github repo. +If you haven’t chosen an editor, you can use Atom, Sublime, Intellij, Vi, etc.

      + +

      If you want to keep multiple versions of Node on your system try Node Version Manager.

      + +

      Running a typical Tutorial

      + +

      Let’s say you wanted to run the very first tutorial, 01_blog_feed. Here’s how you’d do it:

      + +
        +
      1. +

        From Bash:

        + +
        git clone https://github.com/steemit/devportal-tutorials-js.git
        +
        +cd devportal-tutorials-js/tutorials/01_blog_feed
        +npm i
        +npm run dev-server
        +
        +
      2. +
      3. +

        open http://localhost:3000/ in your web browser

        +
      4. +
      + +
      ### Github
      +
      +If you'd rather clone projects in a windowed environment rather than the terminal, consider [Github Desktop](https://desktop.github.com/).
      +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/grant_active_permission.html b/docs/tutorials-javascript/grant_active_permission.html new file mode 100644 index 0000000000000000000000000000000000000000..1f3dfc01edb02e58ea88dd557ff892dc4a9c1aef --- /dev/null +++ b/docs/tutorials-javascript/grant_active_permission.html @@ -0,0 +1,521 @@ + + + + + + + + + + + + + + + + + + +JS: Grant Active Permission | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Grant Active Permission + + +

      + +

      How to grant and revoke active permission to another user.

      +
      + + +

      Full, runnable src of Grant Active Permission can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will take you through the process of checking a specific users’ data, altering the array pertaining to the active account_auths, and then broadcasting the changes to the blockchain. Demo account information has been provided to assist with the tutorial. This tutorial has been set up for the testnet but can be easily be changed for production.

      + +

      Providing another user active permission for your account enables them to do fund transfers from your account. This can be usefull in setting up a secondary account(s) to manage funds for a main account or having a backup should you lose passwords for the main account.

      + +

      One of the common practice nowadays is to lend/delegate SP to another account, above same technique can be used to create market around it with minimum 3rd party trust. All your funds stay in your account. You can use/create automated system where you can lease for certain period of time and system can take care of payments and release of delegations (notify clients). Even better, you can use multi-signature feature to establish 100% trust where clients will have to confirm, approve transactions.

      + +

      Active permissions and authority should be used with utmost care, you don’t want to loose your funds. It is really not easy to hack Steem accounts, let alone take control over it. But without careful use (revealing private keys) loosing liquid funds are not that difficult and it takes only couple seconds to do that, keeping most value powered up always helps.

      + +

      this article has more detail around active authorities

      + +

      Intro

      + +

      This tutorial uses the database API to gather account information for the user that is granting active permission to a secondary user. This information is used to check current permissions as well as to build the broadcast operation. Granting or revoking active permission works by changing the array of usernames containing this information and then pushing those changes to the blockchain. The parameters for this updateAccount function are:

      + +
        +
      1. account - The username of the main account
      2. +
      3. active - Optional parameter to denote changes to the active authority type. This is the parameter that we will be changing in this tutorial
      4. +
      5. jsonMetadata - This is a string value obtained from the current account info
      6. +
      7. memoKey - This is the public memoKey of the user
      8. +
      9. owner - Optional parameter to denote changes to the owner authority type
      10. +
      11. posting - Optional parameter to denote changes to the posting authority type
      12. +
      13. privateKey - The private active key of the user
      14. +
      + +

      The only other information required is the username of the account that the active permission is being granted to.

      + +

      The tutorial is set up with three individual functions for each of the required operations - checking permission status, granting permission and revoking permission.

      + +

      Steps

      + +
        +
      1. Configure connection Configuration of dsteem to communicate with a Steem blockchain
      2. +
      3. Input variables Collecting the required inputs via an HTML UI.
      4. +
      5. Database query Sending a query to the blockchain for the active permissions (status)
      6. +
      7. Object creation Create the array and subsequent data object for the broadcast operation
      8. +
      9. Broadcast operation Broadcasting the changes to the blockchain
      10. +
      + +

      1. Configure connection

      + +

      As usual, we have a public/app.js file which holds the Javascript segment of the tutorial. In the first few lines we define the configured library and packages:

      + +
      import { Client, PrivateKey } from 'dsteem';
      +import { Testnet as NetConfig } from '../../configuration'; //A Steem Testnet. Replace 'Testnet' with 'Mainnet' to connect to the main Steem blockchain.
      +
      +let opts = { ...NetConfig.net };
      +
      +//connect to a steem node, testnet in this case
      +const client = new Client(NetConfig.url, opts);
      +
      + +

      Above, we have dsteem pointing to the testnet with the proper chainId, addressPrefix, and endpoint by importing it from the configuration.js file. Due to this tutorial altering the blockchain it is preferable to not work on production.

      + +

      2. Input variables

      + +

      The required parameters for the account status query is recorded via an HTML UI that can be found in the public/index.html file. Any active account information can be used for this tutorial but to make things easier we populate these fields once the UI loads.

      + +
      window.onload = async () => {
      +    const account = NetConfig.accounts[0];
      +    const accountI = NetConfig.accounts[1];
      +    document.getElementById('username').value = account.address;
      +    document.getElementById('privateKey').value = account.privActive;
      +    document.getElementById('newAccount').value = accountI.address;
      +};
      +
      + +

      All of the functions use the same input variables. Once the function is activated via the UI the variables are allocated as seen below.

      + +
      //get username
      +const username = document.getElementById('username').value;
      +//get private active key
      +const privateKey = PrivateKey.fromString(
      +    document.getElementById('privateKey').value
      +);
      +//get account to provide active auth
      +const newAccount = document.getElementById('newAccount').value;
      +
      + +

      3. Database query

      + +

      The queries are sent through to the steem blockchain with the database API using the getAccounts function. The results of the query is used to check the status of the current active authorisations and parameters as per the intro.

      + +
      //query database for active array
      +var _data = new Array
      +_data = await client.database.getAccounts([username]);
      +const activeAuth = _data[0].active;
      +
      +//check for username duplication
      +const checkAuth = _data[0].active.account_auths;
      +var arrayindex = -1;
      +var checktext = " does not yet have active permission"
      +for (var i = 0,len = checkAuth.length; i<len; i++) {
      +    if (checkAuth[i][0]==newAccount) {
      +        arrayindex = i
      +        var checktext = " already has active permission"
      +    }
      +}
      +
      + +

      The result of this status query is then displayed on the UI along with the array on the console as a check.

      + +
      document.getElementById('permCheckContainer').style.display = 'flex';
      +document.getElementById('permCheck').className = 'form-control-plaintext alert alert-success';
      +document.getElementById('permCheck').innerHTML = newAccount + checktext;
      +console.log(checkAuth);
      +
      + +

      4. Object creation

      + +

      The database query is the same for all the functions and is required to create an updated array to broadcast to the blockchain. This is how we determine whether a user permission will be added or revoked. The actual operation is the same apart from the array variable as can be seen below. The difference is in that when creating a permission, an element is added to the account_auths array where revoking removes an element from it.

      + +
      //add account permission
      +activeAuth.account_auths.push([
      +    newAccount,
      +    parseInt(activeAuth.weight_threshold)
      +]);
      +activeAuth.account_auths.sort();
      +
      +//revoke permission
      +activeAuth.account_auths.splice(arrayindex, 1);
      +
      + +

      When adding to the array (creaing permission) it is required to sort the array before we can broadcast. The Steem blockchain does not accept the new fields in the array if it’s not alphabetically sorted. +After the active array has been defined, the broadcast object can be created. This holds all the required information for a successful transaction to be sent to the blockchain. Where there is no change in the authority types, the parameter can be omitted or in the case of required parameters, allocated directly from the database query.

      + +
      //object creation
      +const accObj = {
      +    account: username,
      +    json_metadata: _data[0].json_metadata,
      +    memo_key: _data[0].memo_key,
      +    active: activeAuth,
      +}
      +
      + +

      5. Broadcast operation

      + +

      With all the parameters assigned, the transaction can be broadcast to the blockchain. As stated before, the actual broadcast operation for both new permissions and to revoke permissions use the same parameters.

      + +
      //account update broadcast
      +client.broadcast.updateAccount(accObj, privateKey).then(
      +    function(result) {
      +        console.log(
      +            'included in block: ' + result.block_num,
      +            'expired: ' + result.expired
      +        );
      +        document.getElementById('permCheckContainer').style.display = 'flex';
      +        document.getElementById('permCheck').className = 'form-control-plaintext alert alert-success';
      +        document.getElementById('permCheck').innerHTML = "permission has been revoked for " + newAccount;
      +    },
      +    function(error) {
      +        console.error(error);
      +        document.getElementById('permCheckContainer').style.display = 'flex';
      +        document.getElementById('permCheck').className = 'form-control-plaintext alert alert-danger';
      +        document.getElementById('permCheck').innerHTML = error.jse_shortmsg;
      +    }
      +);
      +
      + +

      The results of the operation is displayed on the UI along with a block number in the console to confirm a successful operation. If you add permission to an account that already has permission, or if your private key has been entered incorrectly, an error of “Missing Active Authority” will be displayed.

      + +

      Steemconnect offers an alternative to revoking active permission with a “simple link” solution. Instead of running through a list of operations on your account, you can simply use a link similar to the one below. You will be prompted to enter your usename and password and the specified user will have their permissions removed instantly. +https://v2.steemconnect.com/revoke/@username +This is similar to the steemconnect links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://v2.steemconnect.com/sign

      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/31_grant_active_permission
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/grant_posting_permission.html b/docs/tutorials-javascript/grant_posting_permission.html new file mode 100644 index 0000000000000000000000000000000000000000..c20aa0b89315cae11b44d85d5d66b5aba468683b --- /dev/null +++ b/docs/tutorials-javascript/grant_posting_permission.html @@ -0,0 +1,511 @@ + + + + + + + + + + + + + + + + + + +JS: Grant Posting Permission | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Grant Posting Permission + + +

      + +

      How to grant and revoke posting permission to another user.

      +
      + + +

      Full, runnable src of Grant Posting Permission can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will take you through the process of checking a specific users’ data, altering the array pertaining to the posting account_auths, and then broadcasting the changes to the blockchain. Demo account information has been provided to assist with the tutorial. This tutorial has been set up for the testnet but can be easily be changed for production.

      + +

      Providing another user posting permission for your account can be used to allow multiple users to submit posts on a single steemit community. @Utopian-Io is an example of such a community. There are also applications that allows you to schedule posts by automatically publishing on your behalf.

      + +

      Intro

      + +

      This tutorial uses the database API to gather account information for the user that is granting posting permission to another user. This information is used to check current permissions as well as to build the broadcast operation. Granting or revoking posting permission works by changing the array of usernames containing this information and then pushing those changes to the blockchain. The parameters for this updateAccount function are:

      + +
        +
      1. account - The username of the main account
      2. +
      3. active - Optional parameter to denote changes to the active authority type
      4. +
      5. jsonMetadata - This is a string value obtained from the current account info
      6. +
      7. memoKey - This is the public memoKey of the user
      8. +
      9. owner - Optional parameter to denote changes to the owner authority type
      10. +
      11. posting - Optional parameter to denote changes to the posting authority type. This is the parameter that we will be changing in this tutorial
      12. +
      13. privateKey - The private active key of the user
      14. +
      + +

      The only other information required is the username of the account that the posting permission is being granted to.

      + +

      The tutorial is set up with three individual functions for each of the required operations - checking permission status, granting permission and revoking permission.

      + +

      Steps

      + +
        +
      1. Configure connection Configuration of dsteem to communicate with a Steem blockchain
      2. +
      3. Input variables Collecting the required inputs via an HTML UI.
      4. +
      5. Database query Sending a query to the blockchain for the posting permissions (status)
      6. +
      7. Object creation Create the array and subsequent data object for the broadcast operation
      8. +
      9. Broadcast operation Broadcasting the changes to the blockchain
      10. +
      + +

      1. Configure connection

      + +

      As usual, we have a public/app.js file which holds the Javascript segment of the tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +//define network parameters
      +let opts = {};
      +opts.addressPrefix = 'STX';
      +opts.chainId =
      +    '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673';
      +//connect to a steem node, testnet in this case
      +const client = new dsteem.Client('https://testnet.steem.vc', opts);
      +
      + +

      Above, we have dsteem pointing to the testnet with the proper chainId, addressPrefix, and endpoint. Due to this tutorial altering the blockchain it is preferable to not work on production.

      + +

      2. Input variables

      + +

      The required parameters for the account status query is recorded via an HTML UI that can be found in the public/index.html file. The values are pre-populated in this case but any account name can be used.

      + +

      All of the functions use the same input variables. Once the function is activated via the UI the variables are allocated as seen below.

      + +
      //get username
      +const username = document.getElementById('username').value;
      +//get private active key
      +const privateKey = dsteem.PrivateKey.fromString(
      +    document.getElementById('privateKey').value
      +);
      +//get account to provide posting auth
      +const newAccount = document.getElementById('newAccount').value;
      +
      + +

      3. Database query

      + +

      The queries are sent through to the steem blockchain with the database API using the getAccounts function. The results of the query is used to check the status of the current posting authorisations and parameters as per the intro.

      + +
          //query database for posting array
      +    _data = new Array
      +    _data = await client.database.getAccounts([username]);
      +    const postingAuth = _data[0].posting;
      +
      +     //check for username duplication
      +    const checkAuth = _data[0].posting.account_auths;
      +    var arrayindex = -1;
      +    var checktext = " does not yet have posting permission"
      +    for (var i = 0,len = checkAuth.length; i<len; i++) {
      +        if (checkAuth[i][0]==newAccount) {
      +            arrayindex = i
      +            var checktext = " already has posting permission"
      +        }
      +    }
      +
      + +

      The result of this status query is then displayed on the UI along with the array on the console as a check.

      + +
      document.getElementById('permCheckContainer').style.display = 'flex';
      +document.getElementById('permCheck').className =
      +    'form-control-plaintext alert alert-success';
      +document.getElementById('permCheck').innerHTML = newAccount + checktext;
      +console.log(checkAuth);
      +
      + +

      4. Object creation

      + +

      The database query is the same for all the functions and is required to create an updated array to broadcast to the blockchain. This is how we determine whether a user permission will be added or revoked. The actual operation is the same apart from the array variable as can be seen below. The difference is in that when creating a permission, an element is added to the account_auths array where revoking removes an element from it.

      + +
      //add account permission
      +postingAuth.account_auths.push([
      +    newAccount,
      +    parseInt(postingAuth.weight_threshold),
      +]);
      +postingAuth.account_auths.sort();
      +
      +//revoke permission
      +postingAuth.account_auths.splice(arrayindex, 1);
      +
      + +

      When adding to the array (creaing permission) it is required to sort the array before we can broadcast. The steem blockchain does not accept the new fields in the array if it’s not alphabetically sorted. +After the posting array has been defined, the broadcast object can be created. This holds all the required information for a successful transaction to be sent to the blockchain. Where there is no change in the authority types, the parameter can be omitted or in the case of required parameters, allocated directly from the database query.

      + +
      //object creation
      +const accObj = {
      +    account: username,
      +    json_metadata: _data[0].json_metadata,
      +    memo_key: _data[0].memo_key,
      +    posting: postingAuth,
      +};
      +
      + +

      5. Broadcast operation

      + +

      With all the parameters assigned, the transaction can be broadcast to the blockchain. As stated before, the actual broadcast operation for both new permissions and to revoke permissions use the same parameters.

      + +
      //account update broadcast
      +client.broadcast.updateAccount(accObj, privateKey).then(
      +    function(result) {
      +        console.log(
      +            'included in block: ' + result.block_num,
      +            'expired: ' + result.expired
      +        );
      +        document.getElementById('permCheckContainer').style.display = 'flex';
      +        document.getElementById('permCheck').className =
      +            'form-control-plaintext alert alert-success';
      +        document.getElementById('permCheck').innerHTML =
      +            'posting permission has been granted to ' + newAccount;
      +    },
      +    function(error) {
      +        console.error(error);
      +        document.getElementById('permCheckContainer').style.display = 'flex';
      +        document.getElementById('permCheck').className =
      +            'form-control-plaintext alert alert-danger';
      +        document.getElementById('permCheck').innerHTML = error.jse_shortmsg;
      +    }
      +);
      +
      + +

      The results of the operation is displayed on the UI along with a block number in the console to confirm a successful operation. If you add permission to an account that already has permission will display an error of “Missing Active Authority”.

      + +

      Steemconnect offers an alternative to revoking posting permission with a “simple link” solution. Instead of running through a list of opetions on your account, you can simply use a link similar to the one below. You will be prompted to enter your usename and password and the specified user will have their posting permission removed instantly. +https://v2.steemconnect.com/revoke/@username +This is similar to the steemconnect links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://v2.steemconnect.com/sign

      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/28_grant_posting_permission
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/power_down.html b/docs/tutorials-javascript/power_down.html new file mode 100644 index 0000000000000000000000000000000000000000..394beb26b7fd7f2d1b618f7292877da4c931370f --- /dev/null +++ b/docs/tutorials-javascript/power_down.html @@ -0,0 +1,460 @@ + + + + + + + + + + + + + + + + + + +JS: Power Down | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Power Down + + +

      + +

      Perform a power down on all or part of an account’s VESTS using either Steemconnect or client-side signing.

      +
      + + +

      Full, runnable src of Power Down can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial runs on the main Steem blockchain. Therefore, any accounts used here will affect real funds on the live network. Use with caution.

      + +

      Intro

      + +

      This tutorial will demonstrate a few functions such as querying account by name and determining the vesting balance of the related account. We are using the call function provided by the dsteem library to pull account data from the Steem blockchain. We then calculate STEEM Power from the VESTS (vesting shares) for the convenience of the user. We will use a simple HTML interface to capture the account and its VESTS. It also has an interactive UI to perform a power down in full or in part.

      + +

      Steps

      + +
        +
      1. App setup Setup dsteem to use the proper connection and network.
      2. +
      3. Search account Get account details after input has account name
      4. +
      5. Calculate and Fill form Calculate available vesting shares and fill the form with details
      6. +
      7. Power down Power down VESTS with Steemconnect or client-side signing.
      8. +
      + +

      1. App setup

      + +

      Below, we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint. There is a public/app.js file which holds the Javascript segment of this tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +let opts = {};
      +//connect to production server
      +opts.addressPrefix = 'STM';
      +opts.chainId =
      +    '0000000000000000000000000000000000000000000000000000000000000000';
      +//connect to server which is connected to the network/production
      +const client = new dsteem.Client('https://api.steemit.com');
      +
      + +

      2. Search account

      + +

      After the account name field has been filled with a name, we automatically search for the account by name when the input is focused out. The related HTML input forms can be found in the index.html file. The values are pulled from that screen with the following:

      + +
          const accSearch = document.getElementById('username').value;
      +    const _account = await client.database.call('get_accounts', [[accSearch]]);
      +    console.log(`_account:`, _account);
      +
      + +

      3. Calculate and Fill form

      + +

      Once the account data has been fetched, we will fill the form with VESTS balance and show current balance details. Note, that in order to get the available vesting shares we will have to check a few things:

      + +
        +
      • if account is already powering down
      • +
      • how much is currently powering down
      • +
      • how much has been delegated (because active delegation locks those funds from being powered down)
      • +
      + +

      Available balance will be in the avail variable.

      + +

      For the convenience of the user, we will convert available VESTS to STEEM with getDynamicGlobalProperties function and fill the form fields accordingly.

      + +
          const name = _account[0].name;
      +    const avail = parseFloat(_account[0].vesting_shares) - (parseFloat(_account[0].to_withdraw) - parseFloat(_account[0].withdrawn)) / 1e6 - parseFloat(_account[0].delegated_vesting_shares);
      +
      +    const props = await client.database.getDynamicGlobalProperties();
      +    const vestSteem = parseFloat(parseFloat(props.total_vesting_fund_steem) *
      +        (parseFloat(avail) / parseFloat(props.total_vesting_shares)),6);
      +
      +    const balance = `Available Vests for ${name}: ${avail} VESTS ~ ${vestSteem} STEEM POWER<br/><br/>`;
      +    document.getElementById('accBalance').innerHTML = balance;
      +    document.getElementById('steem').value = avail+' VESTS';
      +
      + +

      Once form is filled with the maximum available VESTS balance, we can choose the amount of VESTS to power down.

      + +

      4. Power down

      + +

      We have two options on how to Power down: Steemconnect and client-side signing. By default we generate a Steemconnect link to Power down (withdraw vesting), but we can also choose the client signing option to Power down right inside tutorial. Note: client-side signing will require Active Private key to perform the operation.

      + +

      In order to enable client signing, we will generate the operation and also show Active Private key (wif) field to sign transaction right there, client side.

      + +

      Below, we can see an example of the operation and signing transaction. After a successful broadcast, the result will be shown in user interface. It will show the block number that the transaction was included in.

      + +
      window.submitTx = async () => {
      +    const privateKey = dsteem.PrivateKey.fromString(
      +        document.getElementById('wif').value
      +    );
      +    const op = [
      +        'withdraw_vesting',
      +        {
      +            account: document.getElementById('username').value,
      +            vesting_shares: document.getElementById('steem').value,
      +        },
      +    ];
      +    client.broadcast.sendOperations([op], privateKey).then(
      +        function(result) {
      +            document.getElementById('result').style.display = 'block';
      +            document.getElementById(
      +                'result'
      +            ).innerHTML = `<br/><p>Included in block: ${
      +                result.block_num
      +            }</p><br/><br/>`;
      +        },
      +        function(error) {
      +            console.error(error);
      +        }
      +    );
      +};
      +
      + +

      That’s it!

      + +

      To run this tutorial

      + +
        +
      1. git clone https://github.com/steemit/devportal-tutorials-js.git
      2. +
      3. cd devportal-tutorials-js/tutorials/23_power_down
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/power_up_steem.html b/docs/tutorials-javascript/power_up_steem.html new file mode 100644 index 0000000000000000000000000000000000000000..73ea6adfbe6d116043ce04db820bcccd0b7cb397 --- /dev/null +++ b/docs/tutorials-javascript/power_up_steem.html @@ -0,0 +1,444 @@ + + + + + + + + + + + + + + + + + + +JS: Power Up Steem | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Power Up Steem + + +

      + +

      Power up an account’s Steem using either Steemconnect or a client-side signing.

      +
      + + +

      Full, runnable src of Power Up Steem can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial runs on the main Steem blockchain. And accounts queried are real users with liquid STEEM balances.

      + +

      Intro

      + +

      This tutorial will show few functions such as querying account by name and getting account balance. We are using the call function provided by the dsteem library to pull account from the Steem blockchain. A simple HTML interface is used to capture the account and its STEEM balance as well as allowing interactively power up part or all of STEEM to choose account.

      + +

      Steps

      + +
        +
      1. App setup Setup dsteem to use the proper connection and network.
      2. +
      3. Search account Get account details after input has account name
      4. +
      5. Fill form Fill form with account reward balances
      6. +
      7. Power up Power up STEEM with Steemconnect or Client-side signing.
      8. +
      + +

      1. App setup

      + +

      Below we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint. There is a public/app.js file which holds the Javascript segment of this tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +let opts = {};
      +//connect to production server
      +opts.addressPrefix = 'STM';
      +opts.chainId =
      +    '0000000000000000000000000000000000000000000000000000000000000000';
      +//connect to server which is connected to the network/production
      +const client = new dsteem.Client('https://api.steemit.com');
      +
      + +

      2. Search account

      + +

      After account name field is filled with some name, we do automatic search for account by name when input is focused out. HTML input forms can be found in the index.html file. The values are pulled from that screen with the below:

      + +
          const accSearch = document.getElementById('username').value;
      +    const _account = await client.database.call('get_accounts', [[accSearch]]);
      +    console.log(`_account:`, _account);
      +
      + +

      3. Fill form

      + +

      After we fetched account data, we will fill form with STEEM balance and show current balance details.

      + +
      const name = _account[0].name;
      +const steem_balance = _account[0].balance;
      +const balance = `Available Steem balance for ${name}: ${steem_balance}<br/>`;
      +document.getElementById('accBalance').innerHTML = balance;
      +document.getElementById('steem').value = steem_balance;
      +const receiver = document.getElementById('receiver').value;
      +
      + +

      4. Power up

      + +

      We have 2 options on how to Power up. Steemconnect and Client-side signing options. By default we generate Steemconnect link to Power up (transfer to vesting), but you can use client signing option to Power up right inside tutorial, note client-side signing will require Active private key to perform operation.

      + +

      In order to enable client signing, we will generate operation and also show Active Private key (wif) field to sign transaction right there client side. +Below you can see example of operation and signing transaction, after successful operation broadcast result will be shown in user interface. It will be block number that transaction was included.

      + +
      window.submitTx = async () => {
      +    const privateKey = dsteem.PrivateKey.fromString(
      +        document.getElementById('wif').value
      +    );
      +    const op = [
      +        'transfer_to_vesting',
      +        {
      +            from: document.getElementById('username').value,
      +            to: document.getElementById('receiver').value,
      +            amount: document.getElementById('steem').value,
      +        },
      +    ];
      +    client.broadcast.sendOperations([op], privateKey).then(
      +        function(result) {
      +            document.getElementById('result').style.display = 'block';
      +            document.getElementById(
      +                'result'
      +            ).innerHTML = `<br/><p>Included in block: ${
      +                result.block_num
      +            }</p><br/><br/>`;
      +        },
      +        function(error) {
      +            console.error(error);
      +        }
      +    );
      +};
      +
      + +

      That’s it!

      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/22_power_up_steem
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/reblogging_post.html b/docs/tutorials-javascript/reblogging_post.html new file mode 100644 index 0000000000000000000000000000000000000000..ad3548a19d44a9379eaed2b31feb7b25ac30753c --- /dev/null +++ b/docs/tutorials-javascript/reblogging_post.html @@ -0,0 +1,482 @@ + + + + + + + + + + + + + + + + + + +JS: Reblogging Post | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Reblogging Post + + +

      + +

      By the end of this tutorial you should know how to reblog (resteem) a blog from steem

      +
      + + +

      Full, runnable src of Reblogging Post can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will show the method of obtaining the relevant inputs for the reblog process followed by broadcasting the info to the steem blockchain using a demo account on the production server.

      + +

      Intro

      + +

      We are using the client.broadcast function provided by dsteem to reblog the selected blogpost. There are 4 variables that are required to perform this action:

      + +
        +
      • The account name that is doing the reblog
      • +
      • The private posting key of the account that is doing the reblog (this is not your main key)
      • +
      • The author of the post that is being reblogged
      • +
      • The title of the post that is being reblogged
      • +
      + +

      A simple HTML interface is used to capture the required information after which the transaction is submitted. There are two prerequisites within the reblog process in Steem that have to be adhered to, namely, the post must not be older than 7 days, and the post can only be reblogged once by a specific account. The fields have been populated with information to give an example of what it would look like but care has to be taken to provide correct details before the function is executed.

      + +

      This tutorial makes use of the This function is taken from the tutorial Blog Feed to get a list of trending posts.

      + +

      Steps

      + +
        +
      1. Configure connection Configuration of dsteem to use the proper connection and network.
      2. +
      3. Collecting information Generating relevant posting information with an HTML interface.
      4. +
      5. Broadcasting the reblog Assigning variables and executing the reblog.
      6. +
      + +

      1. Configure connection**

      + +

      Below we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint. Although this tutorial is interactive, we will not post to the testnet due to the prerequisites of reblogging. +There is a public/app.js file which holds the Javascript segment of this tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +
      +//define network parameters
      +let opts = {};
      +opts.addressPrefix = 'STM';
      +opts.chainId =
      +    '0000000000000000000000000000000000000000000000000000000000000000';
      +//connect to a Steem node. This is currently setup on production, but we recommend using a testnet like https://testnet.steem.vc
      +const client = new dsteem.Client('https://api.steemit.com', opts);
      +
      + +

      2. Collecting information

      + +

      Next we have the submitPost function that collects the required fields for the reblog process via an HTML interface +after wich we assign them to variables for use later.

      + +
      //this function will execute when the HTML form is submitted
      +window.submitPost = async () => {
      +    //get private key
      +    const privateKey = dsteem.PrivateKey.fromString(
      +        document.getElementById('postingKey').value
      +    );
      +    //get account name
      +    const myAccount = document.getElementById('username').value;
      +    //get blog author
      +    const theAuthor = document.getElementById('theAuthor').value;
      +    //get blog permLink
      +    const thePermLink = document.getElementById('thePermLink').value;
      +
      + +

      3. Broadcasting the reblog

      + +

      Finally we create two variables to simply the client.broadcast function line and broadcast the reblog instruction.

      + +
      const jsonOp = JSON.stringify([
      +    'reblog',
      +    {
      +        account: myAccount,
      +        author: theAuthor,
      +        permlink: thePermLink,
      +    },
      +]);
      +
      +const data = {
      +    id: 'follow',
      +    json: jsonOp,
      +    required_auths: [],
      +    required_posting_auths: [myAccount],
      +};
      +
      +client.broadcast.json(data, privateKey).then(
      +    function(result) {
      +        console.log('client broadcast result: ', result);
      +    },
      +    function(error) {
      +        console.error(error);
      +    }
      +);
      +
      + +

      There are also two console functions an a ui output under Resteem Results defined in order to track if the reblog +as successful or not. If the broadcast succeeds the console.log will show the following:

      + +

      client broadcast result:

      + +
      {
      +    id: "f10d69ac521cf34b0f5d18d938e68c89e77bb31d",
      +    block_num: 22886453,
      +    trx_num: 35,
      +    expired: false
      +}
      +
      + +

      This indicates the block number at which the broadcast was sent as well as the transaction ID for the reblog.

      + +

      If the reblog fails the console.log will present a long line of error code:

      + +
      {
      +    name: "RPCError",
      +    jse_shortmsg: "blog_itr == blog_comment_idx.end(): Account has already reblogged this post",
      +    jse_info: {
      +        ode: 10,
      +        name: "assert_exception",
      +        message: "Assert Exception",
      +        stack: Array(6)
      +    },
      +    message: "blog_itr == blog_comment_idx.end(): Account has already reblogged this post",
      +    stack: "RPCError: blog_itr == blog_comment_idx.end(): Acco…lled (http://localhost:3000/bundle.js:440:690874)"
      +}
      +
      + +

      There is a line in the error log indicating “Account has already reblogged this post” indicating exactly that. This process can be run until a positive result is found.

      + +

      It should be noted that reblogging a post does not create a new post on the blockchain but merely shares the post to whomever is following the user doing the reblog. Along with reblogging the custom_json broadcast operation also includes options for following users and editing blog content. More information on how to use the broadcast operation and options surrounding the operation can be found on the Steem Devportal

      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/14_reblogging_post
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/search_accounts.html b/docs/tutorials-javascript/search_accounts.html new file mode 100644 index 0000000000000000000000000000000000000000..27e5bc84bc440a3b46075d86221b936cb53aa03a --- /dev/null +++ b/docs/tutorials-javascript/search_accounts.html @@ -0,0 +1,418 @@ + + + + + + + + + + + + + + + + + + +JS: Search Accounts | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Search Accounts + + +

      + +

      By the end of this tutorial you should know how to call a list of user names from the steem blockchain

      +
      + + +

      Full, runnable src of Search Accounts can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will show the method of capturing a queried user name, matching that to the steem database and then displaying the matching names. This tutorial will be run on the production server.

      + +

      Intro

      + +

      We are using the call function provided by the dsteem library to pull user names from the steem blockchain. The information being pulled is dependent on two variables:

      + +
        +
      1. The max number of user names that needs to be displayed by the search
      2. +
      3. The string representing the first characters of the user name you are searching for
      4. +
      + +

      A simple HTML interface is used to both capture the string query as well as display the completed search. The layout can be found in the “index.html” file.

      + +

      Steps

      + +
        +
      1. Configure connection Configuration of dsteem to use the proper connection and network.
      2. +
      3. Collecting input variables Assigning and collecting the necessary variables
      4. +
      5. Blockchain query Finding the data on the blockchain based on the inputs
      6. +
      7. Output Displaying query results
      8. +
      + +

      1. Configure connection

      + +

      Below we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint. There is a public/app.js file which holds the Javascript segment of this tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +let opts = {};
      +//connect to production server
      +opts.addressPrefix = 'STM';
      +opts.chainId =
      +	'0000000000000000000000000000000000000000000000000000000000000000';
      +//connect to server which is connected to the network/production
      +const client = new dsteem.Client('https://api.steemit.com');
      +
      + +

      2. Collecting input variables

      + +

      Next we assign the max number of lines that will be returned by the query. We also use getElementById to retrieve the requested user name for searching from the HTML interface. The max value can very easily also be attained from the HTML side simply by adding another input line in index.html and a second getElementById line.

      + +
      const max = 10;
      +window.submitAcc = async () => {
      +    const accSearch = document.getElementById("username").value;
      +
      + +

      3. Blockchain query

      + +

      The next step is to pull the user names from the blockchain that matches the “username” variable that was retrieved. This is done using the database.call function and assigning the result to an array.

      + +
      const _accounts = await client.database.call('lookup_accounts',[accSearch, max]);
      +    console.log(`_accounts:`, _accounts);
      +
      + +

      4. Output

      + +

      Finally we create a list from the “_accounts” array generated in step 3.

      + +
      document.getElementById('accList').innerHTML = _accounts.join('<br>');
      +}
      +
      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/15_search_accounts
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/search_tags.html b/docs/tutorials-javascript/search_tags.html new file mode 100644 index 0000000000000000000000000000000000000000..aa997ee257dab94fdb623a8fd6d91af3c8a43311 --- /dev/null +++ b/docs/tutorials-javascript/search_tags.html @@ -0,0 +1,421 @@ + + + + + + + + + + + + + + + + + + +JS: Search Tags | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Search Tags + + +

      + +

      By the end of this tutorial you should know how to run a search for trending tags

      +
      + + +

      Full, runnable src of Search Tags can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial runs on the main Steem blockchain.

      + +

      Intro

      + +

      This tutorial will show the method of capturing a queried tag name and matching it to the steem database. We are using the call function provided by the dsteem library to pull tags from the steem blockchain. A simple HTML interface is used to both capture the string query as well as display the completed search.

      + +

      steps

      + +
        +
      1. Configure connection Configuration of dsteem to use the proper connection and network.
      2. +
      3. Search input Collecting the relevant search criteria
      4. +
      5. Run Search Running the search on the blockchain
      6. +
      7. Output Displaying the results of the search query
      8. +
      + +

      1. Configure connection

      + +

      Below we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint. There is a public/app.js file which holds the Javascript segment of this tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +let opts = {};
      +//connect to production server
      +opts.addressPrefix = 'STM';
      +opts.chainId =
      +    '0000000000000000000000000000000000000000000000000000000000000000';
      +//connect to server which is connected to the network/production
      +const client = new dsteem.Client('https://api.steemit.com');
      +
      + +

      2. Search input

      + +

      Collecting of the search criteria happens via an HTML input. The form can be found in the index.html file. The values are pulled from that screen with the below:

      + +
      const max = 10;
      +window.submitTag = async () => {
      +    const tagSearch = document.getElementById("tagName").value;
      +
      + +

      3. Run Search

      + +

      In order to access the blockchain to run the search a call function is used with the search field and maximum list items as parameters.

      + +
      const _tags = await client.database.call('get_trending_tags',[tagSearch, max]);
      +
      + +

      The result of the search is an array of tags along with their respective vital data like comments, payouts, etc.

      + +

      4. Output

      + +

      Due to the output from the call function being an array, we can’t use a simple post function to display the tags. The specific fields within the array needs to be selected and then displayed.

      + +
      console.log('tags: ', _tags);
      +var posts = [];
      +_tags.forEach(post => {
      +    posts.push(
      +        `<div class="list-group-item"><h5 class="list-group-item-heading">${
      +            post.name
      +        }</h5></div>`
      +    );
      +});
      +//disply list of tags with line breaks
      +document.getElementById('tagList').innerHTML = posts.join('<br>');
      +
      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/16_search_tags
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/set_withdraw_route.html b/docs/tutorials-javascript/set_withdraw_route.html new file mode 100644 index 0000000000000000000000000000000000000000..3f1aaff98df162bd10fdffd6c71ef0f38d5d0c50 --- /dev/null +++ b/docs/tutorials-javascript/set_withdraw_route.html @@ -0,0 +1,463 @@ + + + + + + + + + + + + + + + + + + +JS: Set Withdraw Route | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Set Withdraw Route + + +

      + +

      Set routes to an account’s power downs or withdraws.

      +
      + + +

      Full, runnable src of Set Withdraw Route can be downloaded as part of the JS tutorials repository. +

      + +

      We will learn how to allocate a percentage for withdrawal to other accounts using Steemconnect as well as with the client-side signing method. This tutorial runs on the main Steem blockchain. Therefore, any accounts used here will affect real funds on the live network. Use with caution.

      + +

      Intro

      + +

      This tutorial will demonstrate a few functions such as querying account by name and determining the vesting balance of the related account. This will allow us to set “withdraw routes” to other accounts with a percent selection and auto power up function. This feature is quite useful if you want to withdraw a portion of your STEEM to a separate account or POWER UP other accounts as you withdraw from one account.

      + +

      Steps

      + +
        +
      1. App setup Setup dsteem to use the proper connection and network.
      2. +
      3. Get account routes Get account’s current routes
      4. +
      5. Fill form Fill form with appropriate data
      6. +
      7. Set withdraw route Set route with Steemconnect or client-side signing
      8. +
      + +

      1. App setup

      + +

      Below, we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint. There is a public/app.js file which holds the Javascript segment of this tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +let opts = {};
      +//connect to production server
      +opts.addressPrefix = 'STM';
      +opts.chainId =
      +    '0000000000000000000000000000000000000000000000000000000000000000';
      +//connect to server which is connected to the network/production
      +const client = new dsteem.Client('https://api.steemit.com');
      +
      + +

      2. Get account routes

      + +

      After the account name field is provided, using the Get withdraw routes button, we can fetch the current withdraw routes, if they exist. The related HTML input forms can be found in the index.html file. The values are pulled from that screen with the following:

      + +
          const accSearch = document.getElementById('username').value;
      +
      +    const _account = await client.database.call('get_withdraw_routes', [accSearch]);
      +    console.log(`_account:`, _account);
      +
      + +

      3. Fill form

      + +

      After we have fetched the account data, we will show a list of current routes, if they exist, and display information to the user about how many much they can apply to other accounts.

      + +
      let info = '';
      +let sum = 0;
      +if (_account.length > 0) {
      +    for (var i = 0; i < _account.length; i++) {
      +        info += `${_account[i].to_account} - ${_account[i].percent / 100}%<br>`;
      +        sum += _account[i].percent / 100;
      +    }
      +} else {
      +    info += `No route is available!<br>`;
      +}
      +info += `You can set ${100 - sum}% remaining part to other accounts!`;
      +document.getElementById('accInfo').innerHTML = info;
      +
      + +

      Previous routes can be overwritten by changing and submitting a new transaction to the same account.

      + +

      We also generate a Steemconnect signing link.

      + +
      window.openSC = async () => {
      +    const link = `https://steemconnect.com/sign/set-withdraw-vesting-route?from_account=${
      +        document.getElementById('username').value
      +    }&percent=${document.getElementById('steem').value * 100}&to_account=${
      +        document.getElementById('account').value
      +    }&auto_vest=${document.getElementById('percent').checked}`;
      +    window.open(link);
      +};
      +
      + +

      4. Set withdraw route

      + +

      We have two options on how to Power down: Steemconnect and client-side signing. Since this action requires Active authority, both client-side and Stemconnect signing will require the Active Private key to sign the transaction. The transaction submission function appears as follows:

      + +
      window.submitTx = async () => {
      +    const privateKey = dsteem.PrivateKey.fromString(
      +        document.getElementById('wif').value
      +    );
      +    const op = [
      +        'set_withdraw_vesting_route',
      +        {
      +            from_account: document.getElementById('username').value,
      +            to_account: document.getElementById('account').value,
      +            percent: document.getElementById('steem').value * 100,
      +            auto_vest: document.getElementById('percent').checked,
      +        },
      +    ];
      +    client.broadcast.sendOperations([op], privateKey).then(
      +        function(result) {
      +            document.getElementById('result').style.display = 'block';
      +            document.getElementById(
      +                'result'
      +            ).innerHTML = `<br/><p>Included in block: ${
      +                result.block_num
      +            }</p><br/><br/>`;
      +        },
      +        function(error) {
      +            console.error(error);
      +        }
      +    );
      +};
      +
      + +

      That’s it!

      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/26_set_withdraw_route
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/steemconnect.html b/docs/tutorials-javascript/steemconnect.html new file mode 100644 index 0000000000000000000000000000000000000000..d62f77e47e4c984f409ea26a52c1b3c07c6ed804 --- /dev/null +++ b/docs/tutorials-javascript/steemconnect.html @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + + + + + +JS: Steemconnect | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Steemconnect + + +

      + +

      Understand the basics of using Steemconnect with your Steem application.

      +
      + + +

      Full, runnable src of Steemconnect can be downloaded as part of the JS tutorials repository. +

      + +

      In this tutorial we will setup Steemconnect for demo application and step by step show the process of setting up dedicated account for your app to use Steemconnect Dashboard and setup backend of your application to use Steemconnect authorization properly.

      + +

      Intro

      + +

      The application in this tutorial asks the user to grant an access to demo-app and get token from Steemconnect. Once permission is granted, demo-app can get details of user via an api call that requires access token. +Purpose is to allow any application request permission from user and perform action via access token.

      + +

      Some other calls that require an access token (or login) are:

      + +
        +
      • Vote
      • +
      • Comment
      • +
      • Post
      • +
      • Follow
      • +
      • Reblog
      • +
      + +

      Learn more about Steemconnect operations here

      + +

      Steps

      + +
        +
      1. Steemconnect Dashboard Create account for application and set up dashboard
      2. +
      3. Initialize Steemconnect Initialize SDK in your application code
      4. +
      5. Login URL Form login url for user
      6. +
      7. Request token Request token with login url
      8. +
      9. Set token Set or save token for future requests
      10. +
      11. Get user data Get user details with token
      12. +
      13. Logout Logout user and clear token
      14. +
      + +

      1. Steemconnect Dashboard

      + +

      Steemconnect is unified authentification system built on top of Steem built in collaboration of Busy.org and Steemit Inc. +Layer to ensure easy access and setup for all application developers as well as secure way for users to interact with Steem apps.

      + +

      Setting up Steemconnect in your app is straight-forward process and never been this easy.

      + +

      Here are the steps that helps you to setup new app:

      + +

      1a. Visit Steemconnect Dashboard and login with your Steem credentials

      + +

      steemconnect_login

      + +

      1b. You will see Applications and Developers section, in Developers section click on My Apps

      + +

      steemconnect_dashboard

      + +

      steemconnect_new_app

      + +

      1c. Create New App using Steemconnect, which will help you create new Steem account for your application. Let’s call it demo-app for this tutorial purpose.

      + +

      steemconnect_account_create

      + +

      Account creation fee will be deducted from your balance, make sure you have enough funds to complete account creation.

      + +

      Next step is to login with account which has enough balance to pay for account creation fee.

      + +

      steemconnect_signin

      + +

      1d. Give your app name, description, icon image link, website (if available) and Redirect URI(s)

      + +

      steemconnect_myapps

      + +

      Application name and description should give users clear understanding what permissions it requires and what is the purpose of the app.

      + +

      App Icon field should be publicly accessible and available link to your logo or icon.

      + +

      Website field is homepage for the application if exist.

      + +

      Redirect URI(s) will be used within your application to forward user after authentification is successful. You can specify multiple callback URLs with each new line. Callback in Steemconnect SDK should match exactly one of URI(s) specified on this page. Due to security reasons if redirect URI(s) used in SDK is other than you specified, it will not work. +This is typical backend web development, we hope you know how to set up your backend/app to handle callback URLs.

      + +
        +
      • Disclaimer: All images/screenshots of user interface may change as Steemconnect evolves
      • +
      + +

      2. Initialize Steemconnect

      + +

      Once you have setup account for new application, you can setup application with Steemconnect authentification and API processes. +To do that, you will need to install sc2-sdk nodejs package with npm i sc2-sdk. +Within application you can initialize Steemconnect

      + +
      +

      app - is account name for application that we have created in Step I.3, callbackURL - is Redirect URI that we have defined in Step I.4, scope - permissions application is requiring/asking from users

      +
      + +

      Now that sc2-sdk is initialized we can start authentication and perform simple operations with Steemconnect.

      + +

      3. Login URL

      + +
      +

      getLoginURL function you see on the right side, returns login URL which will redirect user to sign in with Steem connect screen. Successfull login will redirect user to Redirect URI or callbackURL. Result of successful login will return access_token, expires_in and username information, which application will start utilizing.

      +
      + +

      4. Request token

      + +
      +

      Application can request returned link into popup screen or relevant screen you have developed. Popup screen will ask user to identify themselves with their username and password. Once login is successful, you will have Results

      +
      + +

      5. Set token

      + +
      +

      Returned data has access_token - which will be used in future api calls, expires_in - how long access token is valid in seconds and username of logged in user.

      +
      + +
      +

      After getting access_token, we can set token for future Steemconnect API requests.

      +
      + +

      6. Get user data

      + +
      +

      Users info can be checked with me which will return object +account - current state of account and its details on Steem blockchain, name - username, scope - permissions allowed with current login, user - username, user_metadata - additional information user has setup.

      +
      + +

      7. Logout

      + +
      +

      In order to logout, you can use revokeToken function from sc2-sdk.

      +
      + +

      That’s all there is to it.

      + +

      To Run the tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/02_steemconnect
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/stream_blockchain_transactions.html b/docs/tutorials-javascript/stream_blockchain_transactions.html new file mode 100644 index 0000000000000000000000000000000000000000..2f2dce723cb93413293288388be8b8750d00e8f0 --- /dev/null +++ b/docs/tutorials-javascript/stream_blockchain_transactions.html @@ -0,0 +1,468 @@ + + + + + + + + + + + + + + + + + + +JS: Stream Blockchain Transactions | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Stream Blockchain Transactions + + +

      + +

      By the end of this tutorial you should know how to stream transactions and blocks from Steem blockchain.

      +
      + + +

      Full, runnable src of Stream Blockchain Transactions can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will take you through the process of preparing and streaming blocks using the blockchain.getBlockStream() operation. Being able to stream blocks is crucial if you are building automated or follow up scripts or detect certain type of transactions on network or simply use it for your backend application to sync and/or work with data in real-time.

      + +

      Intro

      + +

      Tutorial is demonstrating the typical process of streaming blocks on Steem. We will show some information from each block that is being streamed to give you an idea. Each block contains transactions objects as well but we will not show each of this data in user interface.

      + +

      We are using the blockchain.getBlockStream function provided by dsteem which returns each block after it has been accepted by witnesses. By default it follows irreversible blocks which was accepted by all witnesses. Function follows or gets blocks every 3 seconds so it would not miss any new blocks. We will then extract part of this data and show it in list.

      + +

      Steps

      + +
        +
      1. App setup Configure proper settings for dsteem
      2. +
      3. Stream blocks Stream blocks
      4. +
      5. Display result Show results in proper UI
      6. +
      + +

      1. App setup

      + +

      As usual, we have a file called public/app.js, which holds the Javascript segment of the tutorial. In the first few lines, we have defined the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +
      +let opts = {};
      +
      +//connect to production server
      +opts.addressPrefix = 'STM';
      +opts.chainId =
      +    '0000000000000000000000000000000000000000000000000000000000000000';
      +
      +//connect to server which is connected to the network/production
      +const client = new dsteem.Client('https://api.steemit.com');
      +
      + +

      Above, we have dsteem pointing to the live network with the proper chainId, addressPrefix, and endpoint. Because this tutorial requires active transactions to see some data.

      + +

      2. Stream blocks

      + +

      Next, we have a main function which fires at on-load and starts streaming blocks from network.

      + +
      stream = client.blockchain.getBlockStream();
      +stream
      +    .on('data', function(block) {
      +        //console.log(block);
      +        blocks.unshift(
      +            `<div class="list-group-item"><h5 class="list-group-item-heading">Block id: ${
      +                block.block_id
      +            }</h5><p>Transactions in this block: ${
      +                block.transactions.length
      +            } <br>Witness: ${
      +                block.witness
      +            }</p><p class="list-group-item-text text-right text-nowrap">Timestamp: ${
      +                block.timestamp
      +            }</p></div>`
      +        );
      +        document.getElementById('blockList').innerHTML = blocks.join('');
      +    })
      +    .on('end', function() {
      +        // done
      +        console.log('END');
      +    });
      +
      + +

      We have also defined Pause and Resume functions for relevant buttons to pause/resume stream at any moment.

      + +
      //pause stream
      +window.pauseStream = async () => {
      +    state = stream.pause();
      +};
      +
      +//resume stream
      +window.resumeStream = async () => {
      +    state = state.resume();
      +};
      +
      + +

      3. Display result

      + +

      In above scection, following line of code populates object with the data coming from Stream:

      + +
      blocks.unshift(
      +    `<div class="list-group-item"><h5 class="list-group-item-heading">Block id: ${
      +        block.block_id
      +    }</h5><p>Transactions in this block: ${
      +        block.transactions.length
      +    } <br>Witness: ${
      +        block.witness
      +    }</p><p class="list-group-item-text text-right text-nowrap">Timestamp: ${
      +        block.timestamp
      +    }</p></div>`
      +);
      +
      + +

      Example of output:

      + +
      {
      +    block_id: "015d34f12bced299cec068500fdbf3070016160c",
      +    extensions:[],
      +    previous:"015d34f021e85b437c9fcb8cf47d9e258a1ad7e4",
      +    signing_key:"STM5zNNjMyCKbhcPgo5ca7jq9UBGVzpq6yoaHw1R2dKaZdxhcuwuW",
      +    timestamp:"2018-05-30T14:27:36",
      +    transaction_ids:
      +        ["0e7ce7445884c44346da4dafdef99ea7fda60bd0", "194f404d3dab66459421792045625334f7465da1"],
      +    transaction_merkle_root:"bc39f1fb9edbb02200d1ab0e68d3dbc4afc62aca",
      +    transactions:[{}, {}],
      +    witness:"good-karma",
      +    witness_signature:"2005f2d5f9d4000ca2ba76db5e555982e3ca47d6f6516ea1bacb316545b478d6617987afd71b5bf0b3f231fdc140453f9043b8ea981220cecf44118d50eedbe870"
      +}
      +
      + +

      That’s it!

      + +

      To Run the tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/13_stream_blockchain_transactions
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/submit_comment_reply.html b/docs/tutorials-javascript/submit_comment_reply.html new file mode 100644 index 0000000000000000000000000000000000000000..f0cb99046f56a8bc0b889c7416ec45022dfb9524 --- /dev/null +++ b/docs/tutorials-javascript/submit_comment_reply.html @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + + + + + +JS: Submit Comment Reply | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Submit Comment Reply + + +

      + +

      By the end of this tutorial you should know how to post a simple comment to Steem.

      +
      + + +

      Full, runnable src of Submit Comment Reply can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will take you through the process of preparing and posting comment using the broadcast.comment operation. +Being able to post a comment is critical to most social applications built on Steem.

      + +

      Intro

      + +

      We are using the broadcast.comment function provided by the dsteem library which generates, signs, and broadcasts the transaction to the network. On the Steem platform, posts and comments are all internally stored as a comment object, differentiated by whether or not a parent_author exists. When there is no parent_author, the it’s a post, when there is, it’s a comment. An account can broadcast a comment on the blockchain every 3 seconds (with every new block) enabling the user to comment as they wish with almost no wait time between commits.

      + +

      Steps

      + +
        +
      1. App setup Import dsteem into app.js and prepare it to communicate with a Steem blockchain
      2. +
      3. Choose parent post Choose a parent post on which to comment. Parse the author and permlink from it.
      4. +
      5. Add content Add body content to your comment
      6. +
      7. Get comment data Collect values from the UI
      8. +
      9. Create comment permlink Create a permlink for your comment
      10. +
      11. Build comment object Assemble the information into a valid comment object
      12. +
      13. Post comment Send the new comment to the blockchain & render the result.
      14. +
      + +

      1. App setup

      + +

      As usual, we have a public/app.js file which holds the Javascript segment of the tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +let opts = {};
      +//connect to community testnet
      +opts.addressPrefix = 'STX';
      +opts.chainId =
      +    '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673';
      +//connect to server which is connected to the network/testnet
      +const client = new dsteem.Client('https://testnet.steem.vc', opts);
      +
      + +

      Above, we have dsteem pointing to the test network with the proper chainId, addressPrefix, and endpoint.
      +Because this tutorial modifies the blockchain, we will use a testnet and a predefined account to demonstrate comment publishing.

      + +

      2. Choose parent post

      + +

      We need to choose a parent post and parse out the parent author and parent permlink. +Below is a url that uses an instance of condenser pointed at our testnet.

      + +
      http://condenser.steem.vc/qbvxoy72qfc/@demo/dsf0yxlox2d
      +
      + +

      In this case. dsf0yxlox2d will be our parent permlink and @demo will be the the parent author.

      + +

      3. Add content

      + +

      We’ve added the parent post info and Some amazing content in our UI via the keyboard. +comment_reply_user_input.png

      + +

      4. Get Comment Data

      + +

      In the submitComment function, (runs when “Submit comment!” is clicked) +We gather information from the UI.

      + +
      //get private key
      +const privateKey = dsteem.PrivateKey.fromString(
      +    document.getElementById('postingKey').value
      +);
      +//get account name
      +const account = document.getElementById('username').value;
      +//get body
      +const body = document.getElementById('body').value;
      +//get parent author permalink
      +const parent_author = document.getElementById('parent_author').value;
      +//get parent author permalink
      +const parent_permlink = document.getElementById('parent_permlink').value;
      +
      + + + +

      Every post needs a unique permalink. +Because comments don’t typically have a title, we recommend using a random number for ours.

      + +

      Note: Take care of your users: Because permlinks are unique within an author’s scope, we recommend random numbers for comments; or at least making it a default in your settings.

      + +
      //generate random permanent link for post
      +const permlink = Math.random()
      +    .toString(36)
      +    .substring(2);
      +
      + +

      6. Build comment object

      + +

      We take the information we gathered from the UI and put it into a well structured comment object.

      + +
      const comment = {
      +    author: account,
      +    title: '',
      +    body: body,
      +    parent_author: parent_author,
      +    parent_permlink: parent_permlink,
      +    permlink: permlink,
      +    json_metadata: '',
      +};
      +
      + +

      7. Post comment

      + +

      We post the comment to the blockchain and render the resulting block number if successful, +or output an error to the console if there’s a failure.

      + +
      console.log('comment broadcast object', comment);
      +client.broadcast.comment(comment, privateKey).then(
      +    function(result) {
      +        console.log('comment broadcast result', result);
      +        document.getElementById(
      +            'postLink'
      +        ).innerHTML = `<br/><p>Included in block: ${
      +            result.block_num
      +        }</p><br/><br/><a href="http://condenser.steem.vc/@${parent_author}/${parent_permlink}">Check post here</a>`;
      +    },
      +    function(error) {
      +        console.error(error);
      +    }
      +);
      +
      + +

      A successful comment will output something like the following to the console: +successful console output

      + +

      That’s all there is to it.

      + +

      The broadcast operation has more to offer than just committing a post/comment to the blockchain. It provides a mulititude of options that can accompany this commit. The max payout and percent of steem dollars can be set. When authors don’t want all of the benifits from a post, they can set the payout factors to zero or beneficiaries can be set to receive part of the rewards. You can also set whether votes are allowed or not. The broadcast to the blockchain can be modified to meet the exact requirements of the author. More information on how to use the broadcast operation can be found on the Steem Devportal with a list of the available broadcast options under the specific Appbase API

      + +

      To Run the tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/11_submit_comment_reply
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/submit_post.html b/docs/tutorials-javascript/submit_post.html new file mode 100644 index 0000000000000000000000000000000000000000..4f2239eeaf632f4b675a6418053bd972436fd281 --- /dev/null +++ b/docs/tutorials-javascript/submit_post.html @@ -0,0 +1,457 @@ + + + + + + + + + + + + + + + + + + +JS: Submit Post | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Submit Post + + +

      + +

      By the end of this tutorial you should know how to prepare comments for Steem and then submit using the broadcast.comment function.

      +
      + + +

      Full, runnable src of Submit Post can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will show the method of properly formatting content followed by broadcasting the information to the steem blockchain using a demo account on the testnet.

      + +

      Intro

      + +

      We are using the client.broadcast.comment function provided by dsteem which generates, signs, and broadcasts the transaction to the network. On the Steem platform, posts and comments are all internally stored as a comment object, differentiated by whether or not a parent_author exists. When there is no parent_author, then it’s a post, otherwise it’s a comment.

      + +

      Steps

      + +
        +
      1. App setup Configuration of dsteem to use the proper connection and network.
      2. +
      3. Fetch Steem Post or Comment data Defining information variables with the submitpost function.
      4. +
      5. Format and Broadcast Formatting the comments and submitting to the blockchain.
      6. +
      + +

      1. App setup

      + +

      Below we have dsteem pointing to the test network with the proper chainId, addressPrefix, and endpoint. Because this tutorial is interactive, we will not publish test content to the main network. Instead, we’re using the testnet and a predefined account to demonstrate post publishing. +There is a public/app.js file which holds the Javascript segment of this tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +let opts = {};
      +//connect to community testnet
      +opts.addressPrefix = 'STX';
      +opts.chainId =
      +    '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673';
      +//connect to server which is connected to the network/testnet
      +const client = new dsteem.Client('https://testnet.steem.vc', opts);
      +
      + +

      2. Fetch Steem Post or Comment data

      + +

      Next, we have the submitPost function which executes when the Submit post button is clicked.

      + +
      //get private key
      +const privateKey = dsteem.PrivateKey.fromString(
      +    document.getElementById('postingKey').value
      +);
      +//get account name
      +const account = document.getElementById('username').value;
      +//get title
      +const title = document.getElementById('title').value;
      +//get body
      +const body = document.getElementById('body').value;
      +//get tags and convert to array list
      +const tags = document.getElementById('tags').value;
      +const taglist = tags.split(' ');
      +//make simple json metadata including only tags
      +const json_metadata = JSON.stringify({ tags: taglist });
      +//generate random permanent link for post
      +const permlink = Math.random()
      +    .toString(36)
      +    .substring(2);
      +
      + +

      The getElementById function is used to obtain data from the HTML elements and assign them to constants. Tags are separated by spaces in this example and stored in an array list called taglist for later use. However, the structure of how to enter tags depends on your needs. Posts on the blockchain can hold additional information in the json_metadata field, such as the tags list which we have assigned. Posts must also have a unique permanent link scoped to each account. In this case we are just creating a random character string.

      + +

      3. Format and Broadcast

      + +

      The next step is to pass all of these elements in 2. to the client.broadcast.comment function.

      + +
      //broadcast post to the testnet
      +client.broadcast
      +    .comment(
      +        {
      +            author: account,
      +            body: body,
      +            json_metadata: json_metadata,
      +            parent_author: '',
      +            parent_permlink: taglist[0],
      +            permlink: permlink,
      +            title: title,
      +        },
      +        privateKey
      +    )
      +    .then(
      +        function(result) {
      +            document.getElementById('title').value = '';
      +            document.getElementById('body').value = '';
      +            document.getElementById('tags').value = '';
      +            document.getElementById('postLink').style.display = 'block';
      +            document.getElementById(
      +                'postLink'
      +            ).innerHTML = `<br/><p>Included in block: ${
      +                result.block_num
      +            }</p><br/><br/><a href="http://condenser.steem.vc/${
      +                taglist[0]
      +            }/@${account}/${permlink}">Check post here</a>`;
      +        },
      +        function(error) {
      +            console.error(error);
      +        }
      +    );
      +
      + +

      Note that the parent_author and parent_permlink fields are used for replies (also known as comments). In this example, since we are publishing a post instead of a comment/reply, we will have to leave parent_author as an empty string and assign the first tag to parent_permlink.

      + +

      After the post has been broadcast to the network, we can simply set all the fields to empty strings and show the post link to check it from a condenser instance running on the selected testnet.

      + +

      The broadcast operation has more to offer than just committing a post/comment to the blockchain. It provides a mulititude of options that can accompany this commit. The max payout and percent of steem dollars can be set. When authors don’t want all of the benifits from a post, they can set the payout factors to zero or beneficiaries can be set to receive part of the rewards. You can also set whether votes are allowed or not. The broadcast to the blockchain can be modified to meet the exact requirements of the author. More information on how to use the broadcast operation can be found on the Steem Devportal with a list of the available broadcast options under the specific Appbase API

      + +

      To Run the tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/10_submit_post
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/transfer_steem_and_sbd.html b/docs/tutorials-javascript/transfer_steem_and_sbd.html new file mode 100644 index 0000000000000000000000000000000000000000..2192a6771d605dfef6aa468f5c461c504e10015d --- /dev/null +++ b/docs/tutorials-javascript/transfer_steem_and_sbd.html @@ -0,0 +1,468 @@ + + + + + + + + + + + + + + + + + + +JS: Transfer Steem And Sbd | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Transfer Steem And Sbd + + +

      + +

      Transfer both STEEM and SBD from one account to another.

      +
      + + +

      Full, runnable src of Transfer Steem And Sbd can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will take you through the process of preparing and submitting a transfer using the broadcast operation. Two demo accounts are provided to use on the testnet but all variables can be easily changed and applied to the production server.

      + +

      There is also an alternative method to transfer from one account to another using a hot signing link that can be generated via Steemconnect. You create a link using the to account, the amount, and a memo (optional comments). This link then allows you to do a transfer simply by adding the login details of the from account. This is a very simple way to send a payment request to any other user with the correct details already provided by the link.

      + +

      Intro

      + +

      We are using the broadcast.transfer function provided by the dsteem library to send the transaction through to the network. In order to do the transfer, two accounts are required. One the sender and the other the recipient. You also can’t transfer from and to the same account, which is why two accounts have been provided for this tutorial. There are 6 parameters required for the transfer operation:

      + +
        +
      1. Username - The username of the account making the transfer (from account)
      2. +
      3. Privatekey - This is the private active key of the sender
      4. +
      5. Recipient - The account that is receiving the STEEM or SBD (to account)
      6. +
      7. Memo - This is a text field which can be used for a comment on the transfer or it can be left empty
      8. +
      9. Amount - This is the amount of STEEM to transfer. This has to be a positive value with 3 decimals in order for the transaction to be completed
      10. +
      11. Type - This is the currency of the transfer, STEEM or SBD. This value has to be written ALL CAPS in order for the transaction to be completed
      12. +
      + +

      It is noteworthy that Steem Power (VESTS) cannot be transferred with this operation.

      + +

      Steps

      + +
        +
      1. Configure connection Configuration of dsteem to communicate with a Steem blockchain
      2. +
      3. Input variables Collecting the required inputs via an HTML UI
      4. +
      5. Object creation Creating an object to use in the broadcast operation
      6. +
      7. Broadcast Broadcasting the transfer to the blockchain
      8. +
      + +

      1. Configure connection

      + +

      As usual, we have a public/app.js file which holds the Javascript segment of the tutorial. In the first few lines we define the configured library and packages:

      + +
      const dsteem = require('dsteem');
      +//define network parameters
      +let opts = {};
      +opts.addressPrefix = 'STX';
      +opts.chainId =
      +    '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673';
      +//connect to a steem node, testnet in this case
      +const client = new dsteem.Client('https://testnet.steem.vc', opts);
      +
      + +

      Above, we have dsteem pointing to the test network with the proper chainId, addressPrefix, and endpoint.
      +Because this tutorial modifies the blockchain, we will use a testnet and predefined accounts to demonstrate the transfer process.

      + +

      2. Input variables

      + +

      The required parameters for the transfer operation is recorded via an HTML UI that can be found in the public/index.html file. The values are prepopulated in this case with testnet demo accounts. The transfer amount is set to 1.000 but any value can be input as long as the sender has enough STEEM to send.

      + +

      The parameter values are allocated as seen below, once the user clicks on the “Transfer” button.

      + +
      window.submitTransfer = async () => {
      +    //get all values from the UI
      +    //get account name of sender
      +    const username = document.getElementById('username').value;
      +    //get private active key
      +    const privateKey = dsteem.PrivateKey.fromString(
      +        document.getElementById('privateKey').value
      +    );
      +    //get recipient
      +    const recipient = document.getElementById('recipient').value;
      +    //get comments
      +    const comments = document.getElementById('comments').value;
      +    //get transfer amount
      +    const quantity = document.getElementById('quantity').value;
      +    //get transfer type
      +    const type = document.getElementById('type').value;
      +
      + +

      3. Object creation

      + +

      In the broadcast.transfer operation, the amount parameter is a combination of the transfer value and type which is why we concatenate the two values into a single variable. We then create a transfer object with the input variables to use within the broadcast operation.

      + +
      const transfer = quantity.concat(' ', type);
      +
      +//create transfer object
      +const transf = new Object();
      +transf.from = username;
      +transf.to = recipient;
      +transf.amount = transfer;
      +transf.memo = comments;
      +
      + +

      4. Broadcast

      + +

      We can complete the broadcast operation using the created object and the private active key received from the input UI. The result of the transfer is displayed on the UI to confirm whether it was a success or an error occurred. The result is also displayed in the console with the relevant block number or transfer error.

      + +
      client.broadcast.transfer(transf, privateKey).then(
      +    function(result) {
      +        console.log(
      +            'included in block: ' + result.block_num,
      +            'expired: ' + result.expired
      +        );
      +        document.getElementById('transferResultContainer').style.display =
      +            'flex';
      +        document.getElementById('transferResult').className =
      +            'form-control-plaintext alert alert-success';
      +        document.getElementById('transferResult').innerHTML = 'Success';
      +    },
      +    function(error) {
      +        console.error(error);
      +        document.getElementById('transferResultContainer').style.display =
      +            'flex';
      +        document.getElementById('transferResult').className =
      +            'form-control-plaintext alert alert-danger';
      +        document.getElementById('transferResult').innerHTML =
      +            error.jse_shortmsg;
      +    }
      +);
      +
      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/20_transfer_STEEM_and_SBD
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/vote_on_content.html b/docs/tutorials-javascript/vote_on_content.html new file mode 100644 index 0000000000000000000000000000000000000000..ae4b1f3efe4c225ac3c39b0534b4bb1607542f41 --- /dev/null +++ b/docs/tutorials-javascript/vote_on_content.html @@ -0,0 +1,562 @@ + + + + + + + + + + + + + + + + + + +JS: Vote On Content | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Vote On Content + + +

      + +

      Create a weighted up or down vote on a comment/post.

      +
      + + +

      Full, runnable src of Vote On Content can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will take you through the process of preparing and submitting a vote using the broadcast operation. +Because this tutorial essentially produces spam, it will be pointed at a Steem testnet. The testnet is an open resource, +so the default account and posting key in this tutorial may have been changed by another developer learning the ropes. +If that happens, you’ll want to create a new account on the testnet and use that account’s credentials instead.

      + +

      To learn more about the testnet, including an easy way to create a play account, visit https://testnet.steem.vc/

      + +

      Intro

      + +

      We are using the broadcast.vote function provided by the dsteem library to send the transaction through to the +network. On the Steem platform, posts and comments are all internally stored as a comment object, differentiated by +whether or not a parent_author exists. When there is no parent_author, then it’s a post, when there is, it’s a +comment. Voting is done on either of the two based on the author and permlink of the comment. There are 5 parameters +required for the voting operation:

      + +
        +
      1. Username - The username of the account making the vote (the voter)
      2. +
      3. Privatekey - This is the private posting key of the voter
      4. +
      5. Author - The author of the comment/post that the voter is voting on
      6. +
      7. Permlink - The unique identifier of the comment/post of the author
      8. +
      9. Weight - This is the weight that the vote will carry. The value ranges from -10000 (100% flag) to 10000 (100% upvote)
      10. +
      + +

      Due to the low amount of posts on the testnet we added an additional step to create a post before we vote on it. The values are auto loaded in the respective input boxes. A full tutorial on how to create a new post can be found on the Steem Devportal

      + +

      Steps

      + +
        +
      1. Configure connection Configuration of dsteem to communicate with a Steem blockchain
      2. +
      3. Create new post Creating a new post on the testnet
      4. +
      5. Input variables Collecting the required inputs via an HTML UI
      6. +
      7. Broadcast Creating an object and broadcasting the vote to the blockchain
      8. +
      + +

      1. Configure connection

      + +

      As usual, we have a public/app.js file which holds the Javascript segment of the tutorial. In the first few lines we define the configured library and packages:

      + +
      import { Client, PrivateKey } from 'dsteem';
      +import { Testnet as NetConfig } from '../../configuration'; //A Steem Testnet. Replace 'Testnet' with 'Mainnet' to connect to the main Steem blockchain.
      +
      +let opts = { ...NetConfig.net };
      +
      +//connect to a steem node, testnet in this case
      +const client = new Client(NetConfig.url, opts);
      +
      + +

      Above, we have dsteem pointing to the test network with the proper chainId, addressPrefix, and endpoint by importing from the configuration.js file. Because this tutorial is interactive, we will not publish test content to the main network. Instead, we’re using the testnet and a predefined account which is imported once the application loads, to demonstrate voting on content.

      + +
      window.onload = () => {
      +    const account = NetConfig.accounts[0];
      +    document.getElementById('username').value = account.address;
      +    document.getElementById('postingKey').value = account.privPosting;
      +};
      +
      + +

      2. Create new post

      + +

      A new blog post is created on the testnet with the necessary variables for the vote function being allocated as well. If a post is successfully created it will display a block number and a value will be assigned to the permlink variable.

      + +
      //refer to "10_submit_post" in the tutorials folder for creating a post on steemit
      +//create post function
      +window.createPost = async () => {
      +    //get private key
      +    const privateKey = createPrivateKey();
      +    //get account name
      +    const account = document.getElementById('username').value;
      +    //for content
      +    const time = new Date().getTime();
      +    //get title
      +    const title = `developers.steem.io - JS-T:17 ${time}`;
      +    //get body
      +    const body = `Go to [developers.steem.io](https://developers.steem.io) for the latest in Steem tutorials! This post was created by someone using the active version of those tutorials at  [https://github.com/steemit/devportal-tutorials-js](https://github.com/steemit/devportal-tutorials-js)
      +        
      +        ${time}`;
      +    //get tags and convert to array list
      +    const tags = 'blog';
      +    const taglist = tags.split(' ');
      +    //make simple json metadata including only tags
      +    const json_metadata = JSON.stringify({ tags: taglist });
      +    //generate random permanent link for post
      +    const permlink = Math.random()
      +        .toString(36)
      +        .substring(2);
      +
      +    client.broadcast
      +        .comment(
      +            {
      +                author: account,
      +                body: body,
      +                json_metadata: json_metadata,
      +                parent_author: '',
      +                parent_permlink: tags,
      +                permlink: permlink,
      +                title: title,
      +            },
      +            privateKey
      +        )
      +        .then(
      +            function(result) {
      +                document.getElementById('permlink').innerHTML = permlink;
      +                document.getElementById(
      +                    'postLink'
      +                ).innerHTML = `Included in block: <a href="http://condenser.steem.vc/${
      +                    taglist[0]
      +                }/@${account}/${permlink}" target="_blank">${
      +                    result.block_num
      +                }</a>`;
      +                document.getElementById('postResult').style.display = 'flex';
      +                document.getElementById('permlink').value = permlink;
      +            },
      +            function(error) {
      +                console.error(error);
      +            }
      +        );
      +};
      +
      + +

      You may have noted the mystery function createPrivateKey(). It’s a convenience function that allows us to give the +user some meaningful UI feedback if they put in a bad posting key. The important part of it is +return dsteem.PrivateKey.fromString(<somestring>) but its full glory can be seen in the snippet below

      + +
      const createPrivateKey = function() {
      +    try {
      +        return dsteem.PrivateKey.fromString(
      +            document.getElementById('postingKey').value
      +        );
      +    } catch (e) {
      +        const resultEl = document.getElementById('result');
      +        resultEl.className = 'form-control-plaintext alert alert-danger';
      +        resultEl.innerHTML = e.message + ' - See console for full error.';
      +        throw e;
      +    }
      +};
      +
      + +

      3. Input variables

      + +

      The required parameters for the vote operation is recorded via an HTML UI that can be found in the public/index.html file. The values are pre-populated in this case with a testnet demo account. The vote weight is input via a slider as this value can range between -10000 and 10000 denoting either a 100% flag or 100% upvote.

      + +

      The parameter values are allocated as seen below, once the user clicks on the “Submit” button.

      + +
      window.submitVote = async () => {
      +    //we'll make use of resultEl in multiple child scopes. This is generally good practice.
      +    const resultEl = document.getElementById('result');
      +    resultEl.innerHTML = 'pending...';
      +
      +    //get all values from the UI//
      +    //get account name of voter
      +    const voter = document.getElementById('username').value;
      +    //get private posting key
      +    const privateKey = createPrivateKey();
      +    //get author of post/comment to vote
      +    const author = document.getElementById('author').value;
      +    //get post permalink to vote
      +    const permlink = document.getElementById('permlink').value;
      +    //get weight of vote
      +    const weight = parseInt(
      +        document.getElementById('currentWeight').innerHTML,
      +        10
      +    );
      +    ....
      +
      + +

      The weight parameter is required to be an interger for the vote operation so we parse it from the UI text field. The permlink value is retrieved from the create post function.

      + +

      4. Broadcast

      + +

      We create a vote object with the input variables before we can broadcast to the blockchain.

      + +
      const vote = {
      +    voter,
      +    author,
      +    permlink,
      +    weight, //needs to be an integer for the vote function
      +};
      +
      + +

      After which we can complete the broadcast.vote operation with the created object and private posting key received from the input UI. The result of the vote is displayed on the UI to confirm whether it was a success or failed with details of that process being displayed on the console.

      + +
      client.broadcast.vote(vote, privateKey).then(
      +        function(result) {
      +            console.log('success:', result);
      +            resultEl.className = 'form-control-plaintext alert alert-success';
      +            resultEl.innerHTML = 'Success! See console for full response.';
      +        },
      +        function(error) {
      +            console.log('error:', error);
      +            resultEl.className = 'form-control-plaintext alert alert-danger';
      +            resultEl.innerHTML =
      +                error.jse_shortmsg + ' - See console for full response.';
      +        }
      +    );
      +
      +window.onload = () => {
      +    var voteWeightSlider = document.getElementById('voteWeight');
      +    var currentWeightDiv = document.getElementById('currentWeight');
      +    currentWeightDiv.innerHTML = voteWeightSlider.value;
      +    voteWeightSlider.oninput = function() {
      +        currentWeightDiv.innerHTML = this.value;
      +    };
      +
      + +

      More information on how to use the broadcast operation and options surrounding the operation can be found on the Steem Devportal

      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/17_vote_on_content
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-javascript/witness_listing_and_voting.html b/docs/tutorials-javascript/witness_listing_and_voting.html new file mode 100644 index 0000000000000000000000000000000000000000..85ea03f9a7a1e4aa80665de9c7cedc7ac95f0ecd --- /dev/null +++ b/docs/tutorials-javascript/witness_listing_and_voting.html @@ -0,0 +1,525 @@ + + + + + + + + + + + + + + + + + + +JS: Witness Listing And Voting | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + JS: Witness Listing And Voting + + +

      + +

      Create a list of available witnesses as well as vote for and remove your vote for a witness.

      +
      + + +

      Full, runnable src of Witness Listing And Voting can be downloaded as part of the JS tutorials repository. +

      + +

      This tutorial will take you through the process of preparing and submitting a vote using the broadcast operation. A demo account is provided to use on the testnet but all variables can be easily changed and applied to the production server.

      + +

      There is also an alternative method to vote for a witness using a hot signing link that can be generated via Steemconnect. You create a link using the witness name and the approve fields which denotes whether you want to vote for or remove the vote. This link then allows you to vote simply by signing in with your account details. This is a very simple way to send a vote request to any other user with the correct details already provided by the link.

      + +

      Intro

      + +

      We are using the account witness vote function to create the vote which we then commit to the steem blockchain with a broadcast operation from dsteem. We also look at the vote status for a specific user using the getAccounts function. The parameters required for the witness voting operation are:

      + +
        +
      1. limit - Used in creating the witness list. Denotes the maximum number of witnesses to display
      2. +
      3. voter - This is the account making the vote
      4. +
      5. privatekey - The private active key of the voter account
      6. +
      7. witness - The name of the witness being voted for
      8. +
      9. approve - This is a boolean value determining whether the voting opration is to vote for, or to remove a vote
      10. +
      + +

      Steps

      + +
        +
      1. Configure connection Configuration of dsteem to communicate with a Steem blockchain
      2. +
      3. Create witness list Displaying a list of active witnesses
      4. +
      5. Input variables Collecting the required inputs via an HTML UI
      6. +
      7. Voting status Confirming the current vote status for the selected witness
      8. +
      9. Broadcast Creating an object and broadcasting the vote to the blockchain
      10. +
      + +

      1. Configure connection

      + +

      As usual, we have a public/app.js file which holds the Javascript segment of the tutorial. In the first few lines we define the configured library and packages:

      + +
      import { Client, PrivateKey } from 'dsteem';
      +import { Testnet as NetConfig } from '../../configuration'; //A Steem Testnet. Replace 'Testnet' with 'Mainnet' to connect to the main Steem blockchain.
      +
      +let opts = { ...NetConfig.net };
      +//connect to a steem node, testnet in this case
      +const client = new Client(NetConfig.url, opts);
      +
      + +

      Above, we have dsteem pointing to the test network with the proper chainId, addressPrefix, and endpoint by importing from the configuration.js file. Because this tutorial is interactive, we will not publish test content to the main network. Instead, we’re using the testnet and a predefined account which is imported once the application loads, to demonstrate witness voting.

      + +
      window.onload = async () => {
      +    const account = NetConfig.accounts[0];
      +    document.getElementById('username').value = account.address;
      +    document.getElementById('activeKey').value = account.privActive;
      +};
      +
      + +

      2. Create witness list

      + +

      We create a list of the current active witnesses available. This gives a list from which to select a witness to vote for. The list retrieved from the blockchain has a maximum length of 100 witnesses. We query the blockchain with the getState function and then use a for loop to display the list. This function is initiated once the user inputs a value for the limit variable and clicks on the “Fetch current Witnesses” button.

      + +
      window.createList = async () => {
      +    //get list limit
      +    const limit = document.getElementById('limit').value;
      +
      +    const witnessdata = await client.database.getState('witnesses');
      +    var witnesses = [];
      +
      +    for (const witness in witnessdata.witnesses) {
      +        console.log('witness', witness);
      +        witnesses.push(
      +            `<li><a href="#" onclick="document.getElementById('witness').value = '${witness}';">${witness}</a></li>`
      +        );
      +    }
      +    console.log('witnesses', witnesses);
      +    document.getElementById('witnessList').innerHTML = witnesses.join('');
      +    document.getElementById('witnessListContainer').style.display = 'flex';
      +};
      +
      + +

      3. Input variables

      + +

      The required parameters for the vote operation is recorded via an HTML UI that can be found in the public/index.html file. The values are pre-populated in this case with a testnet demo account.

      + +

      The parameter values are allocated as seen below, once the user clicks on the “Submit Vote” button.

      + +
      window.submitVote = async () => {
      +    //get all values from the UI
      +    //get account name of voter
      +    const voter = document.getElementById('username').value;
      +    //get private active key
      +    const privateKey = dsteem.PrivateKey.fromString(
      +        document.getElementById('activeKey').value
      +    );
      +    //get witness name
      +    const witness = document.getElementById('witness').value;
      +
      + +

      4. Voting status

      + +

      The approve parameter within the vote function determines whether the user is voting for the witness or removing its vote. In order to get the correct value for this parameter we first need to identify whether the user has already voted for the specified witness or not. One of the fields from the account information (blockchain query) holds an array of all the witnesses currently voted for by the user. The check returns true if the user has already voted for the selected witness. The result of this query is displayed and the user is given a choice whether to proceed with the vote/unvote process or stop the process activating a new function for each of those choices.

      + +
          //check if witness is already voted for
      +    _data = new Array
      +    _data = await client.database.getAccounts([voter]);
      +    const witnessvotes = _data[0]["witness_votes"];
      +    const approve = witnessvotes.includes(witness);
      +    if (approve) {
      +        checkresult = "Witness has already been voted for, would you like to remove vote?"
      +        votecheck = "Vote removed"
      +    } else {
      +        checkresult = "Witness has not yet been voted for, would you like to vote?"
      +        votecheck = "Vote added"
      +    }
      +
      +    document.getElementById('voteCheckContainer').style.display = 'flex';
      +    document.getElementById('voteCheck').className = 'form-control-plaintext alert alert-success';
      +    document.getElementById('voteCheck').innerHTML = checkresult;
      +
      +    document.getElementById("submitYesBtn").style.visibility = "visible";
      +    document.getElementById("submitNoBtn").style.visibility = "visible";
      +
      + +

      5. Broadcast

      + +

      When the user decides to continue with the voting process the actual vote function is triggered and we create a vote object with the input variables before we can broadcast to the blockchain.

      + +
      window.submitYes = async () => {
      +        //create vote object
      +        const vote = [
      +        'account_witness_vote',
      +        { account: voter, witness: witness, approve: !approve },
      +        ];
      +
      + +

      The array cotains the function for the witness vote along with an object containing the needed parameters. We have to use the opposite of the approve variable that we created in the previous step. That variable is true if the user has already voted, and a value of true for the approve parameter means that the user is voting for the specified witness which will then return an error.

      + +

      After the object has been created we can broadcast the operation to the steem blockchain along with the private active key of the user. The result of the vote is displayed on the UI to confirm whether you voted for or removed a vote for the witness as well as error details should there be one.

      + +
      //broadcast the vote
      +client.broadcast.sendOperations([vote], privateKey).then(
      +    function(result) {
      +        console.log(
      +            'included in block: ' + result.block_num,
      +            'expired: ' + result.expired
      +        );
      +        document.getElementById('voteCheckContainer').style.display = 'flex';
      +        document.getElementById('voteCheck').className =
      +            'form-control-plaintext alert alert-success';
      +        document.getElementById('voteCheck').innerHTML = votecheck;
      +    },
      +    function(error) {
      +        console.error(error);
      +        document.getElementById('voteCheckContainer').style.display = 'flex';
      +        document.getElementById('voteCheck').className =
      +            'form-control-plaintext alert alert-danger';
      +        document.getElementById('voteCheck').innerHTML = error.jse_shortmsg;
      +    }
      +);
      +document.getElementById('submitYesBtn').style.visibility = 'hidden';
      +document.getElementById('submitNoBtn').style.visibility = 'hidden';
      +
      + +

      Should the user choose to stop the process the following function is executed.

      + +
      window.submitNo = async () => {
      +    document.getElementById('voteCheckContainer').style.display = 'flex';
      +    document.getElementById('voteCheck').className =
      +        'form-control-plaintext alert alert-success';
      +    document.getElementById('voteCheck').innerHTML =
      +        'Vote process has ben cancelled';
      +    document.getElementById('submitYesBtn').style.visibility = 'hidden';
      +    document.getElementById('submitNoBtn').style.visibility = 'hidden';
      +};
      +
      + +

      The option buttons (continue with voting process or stop) are disabled at the end of the process in order to remove confusion on what to do next or what the option buttons will do.

      + +

      To run this tutorial

      + +
        +
      1. clone this repo
      2. +
      3. cd tutorials/22_witness_listing_and_voting
      4. +
      5. npm i
      6. +
      7. npm run dev-server or npm run start
      8. +
      9. After a few moments, the server should be running at http://localhost:3000/
      10. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/account_recovery.html b/docs/tutorials-python/account_recovery.html new file mode 100644 index 0000000000000000000000000000000000000000..880a3cae520da968e57a705878f0ed4bfd5238ba --- /dev/null +++ b/docs/tutorials-python/account_recovery.html @@ -0,0 +1,572 @@ + + + + + + + + + + + + + + + + + + +PY: Account Recovery | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      + + +
      + + + + + + + + diff --git a/docs/tutorials-python/account_reputation.html b/docs/tutorials-python/account_reputation.html new file mode 100644 index 0000000000000000000000000000000000000000..7bf548d7d771a303ead2aa5fa037964506c91f32 --- /dev/null +++ b/docs/tutorials-python/account_reputation.html @@ -0,0 +1,444 @@ + + + + + + + + + + + + + + + + + + +PY: Account Reputation | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      + + +
      + + + + + + + + diff --git a/docs/tutorials-python/claim_rewards.html b/docs/tutorials-python/claim_rewards.html new file mode 100644 index 0000000000000000000000000000000000000000..d92803b6e2f360f2ab9d0ef4b80714c76bee11b8 --- /dev/null +++ b/docs/tutorials-python/claim_rewards.html @@ -0,0 +1,509 @@ + + + + + + + + + + + + + + + + + + +PY: Claim Rewards | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Claim Rewards + + +

      + +

      How to claim rewards using Python.

      +
      + + +

      Full, runnable src of Claim Rewards can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we show you how to check the STEEM, SBD and STEEM POWER rewards balances of an account on the Steem blockchain, and how to claim either a portion or all of the rewards for an account using the commit class found within the steem-python library.

      + +

      Intro

      + +

      The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the claim_reward_balance method found within the commit class in the library. Before we transmit a claim, we use the get_account function to check the current rewards balance of the account to see what is available to claim. The claim method has 4 parameters:

      + +
        +
      1. reward steem - The amount of STEEM to claim
      2. +
      3. reward sbd - The amount of SBD to claim
      4. +
      5. reward vests - The amount of VESTS (STEEM POWER) to claim
      6. +
      7. account - The source account for the claim
      8. +
      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to testnet
      2. +
      3. User information and steem node - Input user information and connection to Steem node
      4. +
      5. Check reward balance - Check current rewards balances of user account
      6. +
      7. Claim commit - Input amount of rewards to claim and commit to blockchain
      8. +
      9. Balance update - Check new rewards balances after completed claim
      10. +
      + +

      1. App setup

      + +

      In this tutorial we use 2 packages:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • pick - helps select the query type interactively
      • +
      + +

      We import the libraries and connect to the testnet.

      + +
      import steembase
      +import steem
      +from pick import pick
      +from steem.amount import Amount
      +
      +steembase.chains.known_chains['STEEM'] = {
      +    'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
      +    'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
      +}
      +
      + +

      Because this tutorial alters the blockchain we connect to a testnet so we don’t create spam on the production server.

      + +

      2. User information and steem node

      + +

      We require the private active key of the user in order for the claim to be committed to the blockchain. This is why we are using a testnet. The values are supplied via the terminal/console before we initialise the steem class. There are some demo accounts available but we encourage you to create your own accounts on this testnet and create balances you can claim; it’s good practice.

      + +
      #capture user information
      +username = input('Enter username: ') #demo account: cdemo
      +wif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3
      +
      +#connect node
      +client = steem.Steem(nodes=['https://testnet.steem.vc'],keys=[wif])
      +
      + +

      3. Check reward balance

      + +

      We send a query to the blockchain using the get_account function to check if the username exists on the blockchain. We also use this function to get a clear picture of the available rewards that can be claimed and display this on the console/terminal.

      + +
      #get account reward balances
      +userinfo = client.get_account(username)
      +
      +if(userinfo is None) :
      +    print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!')
      +    exit()
      +
      +reward_steem = userinfo['reward_steem_balance']
      +reward_sbd = userinfo['reward_sbd_balance']
      +reward_sp = userinfo['reward_vesting_steem']
      +reward_vests = userinfo['reward_vesting_balance']
      +
      +print('Reward Balances:' + '\n' + 
      +    'STEEM: ' + reward_steem + '\n' + 
      +    'SBD: ' + reward_sbd + '\n' + 
      +    'STEEM POWER: ' + reward_sp + '\n' +
      +    'VESTS: ' + reward_vests
      +    )
      +
      +input('\n' + 'Press enter to continue to claim selection')
      +
      + +

      4. Claim commit

      + +

      An option is provided to either claim all rewards at once or to specify specific amounts to be claimed for each individual reward balance. If you are using one of Steemit’s demo accounts, please leave some rewards for others to claim!

      + +
      #choice of claim
      +title = 'Please choose claim type: '
      +options = ['ALL', 'SELECTED', 'CANCEL']
      +option, index = pick(options, title)
      +
      + +

      When the option to claim all rewards is selected, the claim parameters are automatically assigned from the get_accounts query. We also check that there are in fact outstanding rewards balances before we commit the claim.

      + +
      #commit claim based on selection
      +if option == 'ALL':
      +    if Amount(reward_steem).amount + Amount(reward_sbd).amount + Amount(reward_vests).amount == 0:
      +        print('\n' + 'No rewards to claim')
      +        exit()
      +    else:
      +        client.claim_reward_balance(reward_steem, reward_sbd, reward_vests, username)
      +        print('\n' + 'All reward balances have been claimed. New reward balances are:' + '\n')
      +else:
      +    if option == 'CANCEL':
      +        print('\n' + 'Operation cancelled')
      +        exit()
      +    else:
      +        claim_steem = input('\n' + 'Please enter the amount of STEEM to claim: ') + ' STEEM'
      +        claim_sbd = input('Please enter the amount of SBD to claim: ') + ' SBD'
      +        claim_vests = input('Please enter the amount of VESTS to claim: ') + ' VESTS'
      +        if Amount(claim_steem).amount + Amount(claim_sbd).amount + Amount(claim_vests).amount == 0:
      +            print('\n' + 'Zero values entered, no claim to submit')
      +            exit()
      +        else:
      +            if claim_steem > reward_steem or claim_sbd > reward_sbd or claim_vests > reward_vests:
      +                print('\n' + 'Requested claim value higher than available rewards')
      +                exit()
      +            else:
      +                client.claim_reward_balance(claim_steem, claim_sbd, claim_vests, username)
      +                print('\n' + 'Claim has been processed. New reward balances are:' + '\n')
      +
      +
      + +

      When doing only a selected claim of available rewards, the values are captured in the console/terminal. The inputs cannot be negative, must be less than or equal to the available reward and at least ONE of the inputs needs to be greater than zero for the claim to be able to transmit. The result of the selected option is printed on the UI.

      + +

      5. Balance update

      + +

      As a final check we run the account query again to get updated values for the available rewards balances.

      + +
      #get updated account reward balances
      +input("Press enter for new account balances")
      +
      +userinfo = client.get_account(username)
      +
      +reward_steem = userinfo['reward_steem_balance']
      +reward_sbd = userinfo['reward_sbd_balance']
      +reward_sp = userinfo['reward_vesting_steem']
      +reward_vests = userinfo['reward_vesting_balance']
      +
      +print('STEEM: ' + reward_steem + '\n' + 
      +    'SBD: ' + reward_sbd + '\n' + 
      +    'STEEM POWER: ' + reward_sp + '\n' +
      +    'VESTS: ' + reward_vests
      +    )
      +
      + +

      We encourage users to play around with different values and data types to fully understand how this process works. You can also check the balances and transaction history on the testnet portal.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/23_claim_rewards
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/convert_sbd_to_steem.html b/docs/tutorials-python/convert_sbd_to_steem.html new file mode 100644 index 0000000000000000000000000000000000000000..df31a8e6145b272d52ead3cfbe6e7439b6eb1651 --- /dev/null +++ b/docs/tutorials-python/convert_sbd_to_steem.html @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + +PY: Convert Sbd To Steem | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Convert Sbd To Steem + + +

      + +

      How to convert your SBD to STEEM using Python.

      +
      + + +

      Full, runnable src of Convert Sbd To Steem can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we will explain and show you how to convert some or all of your available SBD balance into STEEM on the Steem blockchain using the commit class found within the steem-python library.

      + +

      It should be noted that the converted STEEM will not be available instantly as it takes 3.5 days for the transaction to be processed. It is also not possible to stop a conversion once initialised. During the 3.5 days for it to be converted and as the conversion price fluctuates you could actually be receiving less STEEM than what you should. Because of this, the method in this tutorial is NOT the preferred or most efficient way of converting SBD to STEEM. This tutorial just illustrates that it can be done in this manner.

      + +

      There is a marketplace on Steemit that allows you to “sell” your SBD instantly. With this process you can get your STEEM immediately and at the exact price that you expect. The market place is the better way to convert your SBD. This article provides more information on using the market to exchange your SBD to STEEM

      + +

      Steemconnect offers an alternative to converting SBD with a “simple link” solution. Instead of running through a list of operations on your account, you can simply use a link similar to the one below substituting the three parameters for your own details. You will be prompted to enter your username and password before the transaction will be executed. +https://steemconnect.com/sign/convert?owner=username&requestid=1234567&amount=0.000%20SBD +This is similar to the steemconnect links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://v2.steemconnect.com/sign +This article has more information on using steemconnect

      + +

      Intro

      + +

      The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the convert method found within the commit class in the library. Before we do the conversion, we check the current balance of the account to check how much SBD is available. This is not strictly necessary as the process will automatically abort with the corresponding error, but it does give some insight into the process as a whole. We use the get_account function to check for this. The convert method has 3 parameters:

      + +
        +
      1. amount - The amount of SBD that will be converted
      2. +
      3. account - The specified user account for the conversion
      4. +
      5. request-id - An identifier for tracking the conversion. This parameter is optional
      6. +
      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to testnet
      2. +
      3. User information and steem node - Input user information and connection to Steem node
      4. +
      5. Check balance - Check current STEEM and SBD balance of user account
      6. +
      7. Conversion amount and commit - Input of SBD amount to convert and commit to blockchain
      8. +
      + +

      1. App setup

      + +

      In this tutorial we only use 1 package:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      + +

      We import the libraries and connect to the testnet.

      + +
      import steembase
      +import steem
      +
      +steembase.chains.known_chains['STEEM'] = {
      +    'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
      +    'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
      +}
      +
      + +

      Because this tutorial alters the blockchain we connect to the testnet so we don’t create spam on the production server.

      + +

      2. User information and steem node

      + +

      We require the private active key of the user in order for the conversion to be committed to the blockchain. This is why we have to specify this alongside the testnet node. The values are supplied via the terminal/console before we initialise the steem class. There is a demo account available to use with this tutorial but any account that is set up on the testnet can be used.

      + +
      #capture user information
      +username = input('Enter username: ') #demo account: demo01
      +wif = input('Enter private ACTIVE key: ') #demo account: 5HxTntgeoLm4trnTz94YBsY6MpAap1qRVXEKsU5n1v2du1gAgVH
      +
      +#connect node and private active key
      +client = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])
      +
      + +

      3. Check balance

      + +

      In order to give the user enough information to make the conversion we check the current balance of the account using the get_account function.

      + +
      #get account balance for STEEM and SBD
      +userinfo = client.get_account(username)
      +total_steem = userinfo['balance']
      +total_sbd = userinfo['sbd_balance']
      +
      +print('CURRENT ACCOUNT BALANCE:' + '\n' + total_steem + '\n' + total_sbd + '\n')
      +
      + +

      The result of the query is displayed in the console/terminal.

      + +

      4. Conversion amount and commit

      + +

      The final step before we can commit the transaction to the blockchain is to assign the amount parameter. We do this via a simple input from the terminal/console.

      + +
      #get recipient name
      +convert_amount = input('Enter the amount of SBD to convert to STEEM: ')
      +
      + +

      This value must be greater than zero in order for the transaction to execute without any errors. Now that we have all the parameters we can do the actual transmission of the transaction to the blockchain.

      + +
      #parameters: amount, account, request_id
      +client.convert(float(convert_amount), username)
      +
      +print('\n' + convert_amount + ' SBD has been converted to STEEM')
      +
      + +

      If no errors are encountered a simple confirmation is printed on the UI.

      + +

      As an added confirmation we check the balance of the user again and display it on the UI. This is not required at all but it serves as a more definitive confirmation that the conversion has been completed correctly.

      + +
      #get remaining account balance for STEEM and SBD
      +userinfo = client.get_account(username)
      +total_steem = userinfo['balance']
      +total_sbd = userinfo['sbd_balance']
      +
      +print('\n' + 'REMAINING ACCOUNT BALANCE:' + '\n' + total_steem + '\n' + total_sbd)
      +
      + +

      The STEEM balance will not yet have been updated as it takes 3.5 days to settle. The SBD will however show the new balance.

      + +

      We encourage users to play around with different values and data types to fully understand how this process works. You can also check the balances and transaction history on the testnet portal.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/32_convert_sbd_to_steem
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/delegate_power.html b/docs/tutorials-python/delegate_power.html new file mode 100644 index 0000000000000000000000000000000000000000..1f63b395e338ef4963c3aa6c8b43b21239105239 --- /dev/null +++ b/docs/tutorials-python/delegate_power.html @@ -0,0 +1,483 @@ + + + + + + + + + + + + + + + + + + +PY: Delegate Power | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Delegate Power + + +

      + +

      How to delegate or remove delegation of STEEM POWER to another user using Python.

      +
      + + +

      Full, runnable src of Delegate Power can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we show you how to delegate a portion of an accounts available VESTS (STEEM POWER) to another user on the Steem blockchain using the commit class found within the steem-python library.

      + +

      Intro

      + +

      The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the delegate_vesting_shares method found within the commit class in the library. When you delegate power you make a portion of your VESTS available to another user. This can empower an application, author, or curator to make higher votes. Before we do the delegation, we use the get_account function to check the current VESTS balance of the account to see what is available. This is not strictly necessary but adds to the useability of the process. It should be noted that when a delegation is cancelled the VESTS will only be available again after 7 days. The delegate_vesting_shares method has 3 parameters:

      + +
        +
      1. to_account - The account we are delegating shares to (delegatee)
      2. +
      3. vesting_shares - The amount of VESTS to delegate. This is required to be a string value
      4. +
      5. account - The source user account for the delegation (delegator)
      6. +
      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to testnet
      2. +
      3. User information and steem node - Input user information and connection to Steem node
      4. +
      5. Check balance - Check current VESTS balance of user account
      6. +
      7. Delegation amount and commit - Input delegation amount and commit to blockchain
      8. +
      + +

      1. App setup

      + +

      In this tutorial we use 3 packages:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • pick - helps select the query type interactively
      • +
      • pprint - print results in better format
      • +
      + +

      We import the libraries and connect to the testnet.

      + +
      import steembase
      +import steem
      +from pick import pick
      +import pprint
      +from steem.amount import Amount
      +
      +steembase.chains.known_chains['STEEM'] = {
      +    'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
      +    'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
      +}
      +
      + +

      Because this tutorial alters the blockchain we connect to a testnet so we don’t create spam on the production server.

      + +

      2. User information and steem node

      + +

      We require the private active key of the user in order for the transaction to be committed to the blockchain. This is why we are using a testnet. The values are supplied via the terminal/console before we initialise the steem class. We also check if the user name provided is active on the chain. There are some demo accounts available but we encourage you to create your own accounts on this testnet and create balances you can delegate.

      + +
      #capture user information
      +username = input('Enter username: ') #demo account: cdemo
      +wif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3
      +
      +#connect node and private active key
      +client = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])
      +
      +#check valid user
      +userinfo = client.get_account(username)
      +if(userinfo is None) :
      +    print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!')
      +    exit()
      +
      + +

      3. Check balance

      + +

      In order to give the user enough information to make the delegation we check the current VESTS balance of the account using the get_account function. We also display a list of currently active delegations should the user choose to remove a delegation. You can refer to tutorial 29_get_delegations_by_user to see how this is done.

      + +
      #display active delegations (refer to tutorial #29_get_delegations_by_user)
      +delegations = client.get_vesting_delegations(username, '', 100)
      +if len(delegations) == 0:
      +	print('No active delegations')
      +else:
      +	pprint.pprint(delegations)
      +
      +#available VESTS
      +avail_vests = (Amount(userinfo['vesting_shares']).amount - 
      +    ((userinfo['to_withdraw']-userinfo['withdrawn'])/1000000)-
      +    Amount(userinfo['delegated_vesting_shares']).amount)
      +print('\n' + 'Available VESTS : ' + str(avail_vests))
      +
      +input('Press enter to continue' + '\n')
      +
      + +

      The result of the query is displayed in the console/terminal.

      + +

      4. Delegation amount and commit

      + +

      Both the vesting_shares and the to_account parameters are assigned via input from the terminal/console. The user is given the option to delegate power to or remove a currently active delegation from another user. We also check the to_account to make sure it’s a valid account name.

      + +
      #choice of action
      +title = ('Please choose action')
      +options = ['DELEGATE POWER', 'UN-DELEGATE POWER', 'CANCEL']
      +option, index = pick(options, title)
      +
      +if (option == 'CANCEL') :
      +    print('operation cancelled')
      +    exit()
      +
      +#get account to authorise and check if valid
      +delegatee = input('Please enter the account name to ADD / REMOVE delegation: ')
      +delegatee_userinfo = client.get_account(delegatee)
      +if(delegatee_userinfo is None) :
      +    print('Oops. Looks like user ' + delegatee + ' doesn\'t exist on this chain!')
      +    exit()
      +
      + +

      Any amount of VESTS delegated to a user will overwrite the amount of VESTS currently delegated to that user. This means that to cancel a delegation we transmit to the blockchain a vesting_shares value of zero. The inputs and function execution is based on the users choice. If you are using one of Steemit’s demo accounts, please leave some VESTS for others to delegate!

      + +
      if (option == 'DELEGATE POWER') :
      +    vesting_value = input('Please enter the amount of VESTS to delegate: ')
      +    vesting_shares = (str(vesting_value) + ' VESTS')
      +    client.delegate_vesting_shares(to_account=delegatee, vesting_shares=vesting_shares, account=username)
      +    print('\n' + str(vesting_shares) + ' have been successfully been delegated to ' + delegatee)
      +else :
      +    vesting_shares = '0 VESTS'
      +    client.delegate_vesting_shares(to_account=delegatee, vesting_shares=vesting_shares, account=username)
      +    print('Delegated VESTS have been successfully removed from ' + delegatee)
      +
      + +

      A confirmation of the transaction is displayed on the UI.

      + +

      We encourage users to play around with different values and data types to fully understand how this process works. You can also check the balances and transaction history on the testnet portal.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/27_delegate_power
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/edit_content_patching.html b/docs/tutorials-python/edit_content_patching.html new file mode 100644 index 0000000000000000000000000000000000000000..4a07e1475c08f374390e45b11b417998bd6d2599 --- /dev/null +++ b/docs/tutorials-python/edit_content_patching.html @@ -0,0 +1,490 @@ + + + + + + + + + + + + + + + + + + +PY: Edit Content Patching | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Edit Content Patching + + +

      + +

      How to edit post content with diff_match_patch using Python.

      +
      + + +

      Full, runnable src of Edit Content Patching can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we show you how to patch and update posts/comments on the Steem blockchain using the commit class found within the steem-python library.

      + +

      Intro

      + +

      Being able to patch a post is critical to save resources on Steem. The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the diff_match_patch class for python to create a patch for a post or comment. We then use the post method found within the commit class in the library. It should be noted that comments and new post are both treated as commit.post operation with the only difference being that a comment/reply has got an additional parameter containing the parent post/comment. There is already a tutorial on how to create a new post so the focus of this tutorial will be on patching the content of the post. We will be using a couple of methods within the diff_match_patch class.

      + +

      diff_main - This compares two text fields to find the differences. +diff_cleanupSemantic - This reduces the number of edits by eliminating semantically trivial equalities. +diff_levenshtein - Computes the Levenshtein distance: the number of inserted, deleted or substituted characters +patch_make - Creates a patch based on the calculated differences. This method can be executed in 3 different ways based on the parameters. By using the two separate text fields in question, by using only the calculated difference, or by using the original text along with the calculated difference. +patch_apply - This applies the created patch to the original text field.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to testnet
      2. +
      3. User information and steem node - Input user information and connection to Steem node
      4. +
      5. Post to update - Input and retrieve post information
      6. +
      7. Patching - Create the patch to update the post
      8. +
      9. New post commit - Commit the post to the blockchain
      10. +
      + +

      1. App setup

      + +

      In this tutorial we use 2 packages:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • diff_match_patch - used to compute the difference between two text fields to create a patch
      • +
      + +

      We import the libraries and connect to the testnet.

      + +
      import steembase
      +import steem
      +from diff_match_patch import diff_match_patch
      +
      +steembase.chains.known_chains['STEEM'] = {
      +    'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
      +    'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
      +}
      +
      + +

      Because this tutorial alters the blockchain we connect to a testnet so we don’t create spam on the production server.

      + +

      2. User information and steem node

      + +

      We require the private posting key of the user in order for the transfer to be committed to the blockchain. This is why we are using a testnet. The values are supplied via the terminal/console before we initialise the steem class. There are some demo accounts available but we encourage you to create your own accounts on this testnet and create balances you can claim; it’s good practice.

      + +
      #capture user information
      +username = input('Enter username: ') #demo account: cdemo
      +wif = input('Enter private POSTING key: ') #demo account: 5JEZ1EiUjFKfsKP32b15Y7jybjvHQPhnvCYZ9BW62H1LDUnMvHz
      +
      +#connect node and private active key
      +client = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])
      +
      + +

      3. Post to update

      + +

      The user inputs the author and permlink of the post that they wish to edit. It should be noted that a post cannot be patched once it has been archived. We suggest referring to the submit post tutorial to create a new post before trying the patch process.

      + +
      #check valid username
      +userinfo = client.get_account(username)
      +if(userinfo is None) :
      +    print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!')
      +    exit()
      +
      +post_author = input('Please enter the AUTHOR of the post you want to edit: ')
      +post_permlink = input('Please enter the PERMLINK of the post you want to edit: ')
      +
      +#get details of selected post
      +details = client.get_content(post_author, post_permlink)
      +
      +print('\n' + 'Title: ' + details['title'])
      +o_body = details['body']
      +print('Body:' + '\n' + o_body + '\n')
      +
      +n_body = input('Please enter new post content:' + '\n')
      +
      + +

      The user also inputs the updated text in the console/terminal. This will then give us the two text fields to compare.

      + +

      4. Patching

      + +

      The module is initiated and the new post text is checked for validity.

      + +
      #initialise the diff match patch module
      +dmp = diff_match_patch()
      +
      +#Check for null input
      +if (n_body == '') :
      +    print('\n' + 'No new post body supplied. Operation aborted')
      +    exit()
      +else :
      +    # Check for equality
      +    if (o_body == n_body) :
      +        print('\n' + 'No changes made to post body. Operation aborted')
      +        exit()
      +
      + +

      The diff is calculated and a test is done to check the diff length against the total length of the new text to determine if it will be better to patch or just replace the text field. The value to be sent to the blockchain is then assigned to the new_body parameter.

      + +
      #check for differences in the text field
      +diff = dmp.diff_main(o_body, n_body)
      +#Reduce the number of edits by eliminating semantically trivial equalities.
      +dmp.diff_cleanupSemantic(diff)
      +#check patch length
      +if (dmp.diff_levenshtein(diff) < len(o_body)) :
      +    #create patch
      +    patch = dmp.patch_make(o_body, diff)
      +    #create new text based on patch
      +    patch_body = dmp.patch_apply(patch, o_body)
      +    new_body = patch_body[0]
      +else :
      +    new_body = n_body
      +
      + +

      5. New post commit

      + +

      The only new parameter is the changed body text. All the other parameters to do a commit is assigned directly from the original post entered by the user.

      + +
      #commit post to blockchain with all old values and new body text
      +client.commit.post(title=details['title'], body=new_body, author=details['author'], permlink=details['permlink'],
      +    json_metadata=details['json_metadata'], reply_identifier=(details['parent_author'] + '/' + details['parent_permlink']))
      +
      +print('\n' + 'Content of the post has been successfully updated')
      +
      + +

      A simple confirmation is displayed on the screen for a successful commit.

      + +

      We encourage users to play around with different values and data types to fully understand how this process works. You can also check the balances and transaction history on the testnet portal.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/12_edit_content_patching
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/follow_a_user.html b/docs/tutorials-python/follow_a_user.html new file mode 100644 index 0000000000000000000000000000000000000000..020a47719876de70fea169f4418c6ceb36c350e6 --- /dev/null +++ b/docs/tutorials-python/follow_a_user.html @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + +PY: Follow A User | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Follow A User + + +

      + +

      How to follow or unfollow an author using Python.

      +
      + + +

      Full, runnable src of Follow A User can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we will explain and show you how to follow or unfollow any author on the Steem blockchain using the commit class found within the steem-python library.

      + +

      Intro

      + +

      The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the follow and unfollow methods found within the commit class in the the library. Before we can follow/unfollow we first have to check what the current ‘follow status’ is of the author. We use another function for this which is explained in the tutorial entitled get_following_and_follower_list. There are 3 parameters within the follow/unfollow methods:

      + +
        +
      1. follow/unfollow - The name of the author that will be followed/unfollowed
      2. +
      3. what - The list of states to be followed. Currently this defaults to blog as it’s the only option available on the block chain at this stage
      4. +
      5. account - The name of the account that is executing the follow/unfollow
      6. +
      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to testnet
      2. +
      3. User information and steem node - Input user information and connection to Steem node
      4. +
      5. Check author status - Validity check on requested autor to follow
      6. +
      7. Follow status - Check whether specified author is already followed
      8. +
      9. Follow/Unfollow commit - Follow/unfollow commit to the blockchain
      10. +
      + +

      1. App setup

      + +

      In this tutorial we use 3 packages:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • pick - helps select the query type interactively
      • +
      + +

      We import the libraries and connect to the testnet.

      + +
      import steembase
      +import steem
      +from pick import pick
      +
      +steembase.chains.known_chains['STEEM'] = {
      +    'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
      +    'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
      +}
      +
      + +

      Because this tutorial alters the blockchain we connect to the testnet so we don’t create spam on the production server.

      + +

      2. User information and steem node

      + +

      We also require the private posting key of the user that wishes to follow a selected author in order to commit the action to the blockchain. This is why we have to specify this along with the testnet node. The values are supplied via the terminal/console before we initialise the steem class. We have supplied a test account, cdemo to use with this tutorial but any demo account set up on the testnet can be used.

      + +
      #capture user information
      +username = input('Please enter your username: ')
      +postingkey = input('Please enter your private posting key: ')
      +
      +#connect node and private posting key, demo account being used: cdemo, posting key: 5JEZ1EiUjFKfsKP32b15Y7jybjvHQPhnvCYZ9BW62H1LDUnMvHz
      +s = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[postingkey])
      +
      + +

      3. Check author status

      + +

      To insure the validity of the follow process, we first check to see if the author provided by the user is in fact an active username. This is done with a simple call to the blockchain which returns an array of all the user information. If the author does not exist, the return value is null.

      + +
      #capture variables
      +author = input('Author to follow: ')
      +
      +#check author status
      +result = s.get_account(author)
      +
      + +

      Once the author name is confirmed to be valid we can move on to check the follow status of that author.

      + +

      4. Follow status

      + +

      If the author check comes back with a value we use a simple if statement to initialise the database query for the follow status. A comprehensive tutorial is available to retrieve a list of followers and users that are being followed in the tutorial specified in the intro. As we are only interested in a very specific author we can narrow the query results down to a single result. That result then determines what the available actions are.

      + +
      #result from previous step
      +if result :
      +	#check for author name in the current following list
      +	follow = s.get_following(username, author, 'blog', 1)
      +	if len(follow) > 0 and follow[0]['following'] == author :
      +		title = "Author is already being followed, please choose action"
      +	else:
      +		title = "Author has not yet been followed, please choose action"
      +else:
      +	print('Author does not exist')
      +	exit()
      +
      + +

      The result from the follow query is printed on the UI and the user is asked to select the next action to take based on that information. If the author does not exit the program exits automatically.

      + +
      #get index and selected action
      +options = ['Follow', 'Unfollow', 'Exit']
      +option, index = pick(options, title)
      +
      + +

      Once we know what the user wants to do, we can move on to the actual commit to the blockchain.

      + +

      5. Follow/Unfollow commit

      + +

      Once the user has selected which action to take we user another if statement to execute that selection.

      + +
      if option == 'Follow' :
      +	s.commit.follow(author, ['blog'], username)
      +	print(author + ' is now being followed')
      +else:
      +	if option == 'Unfollow' :
      +		s.commit.unfollow(author, ['blog'], username)
      +		print(author + ' has now been unfollowed')
      +	else:
      +		print('Action Cancelled')
      +
      + +

      A simple confirmation of the chosen action is printed on the screen.

      + +

      You can also check on the testportal for a list of the authors being followed by the demo account.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/18_follow_a_user
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/get_account_comments.html b/docs/tutorials-python/get_account_comments.html new file mode 100644 index 0000000000000000000000000000000000000000..389086c28c3e5ceeb1d0010ca94b48e8d3cadcd9 --- /dev/null +++ b/docs/tutorials-python/get_account_comments.html @@ -0,0 +1,545 @@ + + + + + + + + + + + + + + + + + + +PY: Get Account Comments | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      + + +
      + + + + + + + + diff --git a/docs/tutorials-python/get_account_replies.html b/docs/tutorials-python/get_account_replies.html new file mode 100644 index 0000000000000000000000000000000000000000..b0b35cbc1c0d70ddbe0f19d74f218b8e5a06e61c --- /dev/null +++ b/docs/tutorials-python/get_account_replies.html @@ -0,0 +1,435 @@ + + + + + + + + + + + + + + + + + + +PY: Get Account Replies | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      + + +
      + + + + + + + + diff --git a/docs/tutorials-python/get_delegations_by_user.html b/docs/tutorials-python/get_delegations_by_user.html new file mode 100644 index 0000000000000000000000000000000000000000..0de49caf7ed554944366a978043dfc9492993bdc --- /dev/null +++ b/docs/tutorials-python/get_delegations_by_user.html @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + + +PY: Get Delegations By User | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Get Delegations By User + + +

      + +

      How to get a list of active or expiring vesting delegations using Python.

      +
      + + +

      Full, runnable src of Get Delegations By User can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we will explain and show you how to pull a list of both active and expiring vesting delegations from the Steem blockchain using the steem class found within the steem-python library.

      + +

      Intro

      + +

      The Steem python library has a built-in function to pull information from the blockchain. We are using the get_vesting_delegations and get_expiring_vesting_delegations methods found within the steem class in the library. Each of these functions are executed separately. It should be noted that when a delegation is cancelled the VESTS will only be available again after 7 days. The value of the delegation can also be changed at any time, either decreased or increased. To get active delegations we need the following parameters:

      + +
        +
      1. account - The user account that the delegation list is being queried for
      2. +
      3. from-account - The account name from where to start the search. This parameter can be left empty to pull a list from the first delegatee
      4. +
      5. limit - The maximum amount of delegations that will be returned by the query
      6. +
      + +

      The function to query the expiring delegations use the the same parameters except that the start_account is replaced by a start_date. If this value is greater than 7 days from present, it will always include all delegations that are pending expiration.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to production
      2. +
      3. User input - Input user and limit parameters
      4. +
      5. Delegation lists - Selection of the type of list and blockchain query
      6. +
      + +

      1. App setup

      + +

      In this tutorial we use 2 package:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • pick - helps select the query type interactively
      • +
      + +

      We import the libraries and connect to the production server.

      + +
      from pick import pick
      +from steem import Steem
      +
      +import pprint
      +
      +client = Steem()
      +
      + +

      pprint is used to print the query results in an easier to read format

      + +

      2. User input

      + +

      The account and limit parameters are assigned via input from the console/terminal. We also check if the username provided does in fact exist on the blockchain using the get_account method also found within the steem class. This will return an null value if the name does not exist.

      + +
      #capture username
      +username = input('Username: ')
      +
      +#check username
      +result = client.get_account(username)
      +if not result:
      +	print('Invalid username')
      +	exit()
      +
      +#capture list limit
      +limit = input('Max number of vesting delegations to display: ')
      +
      + +

      3. Delegation lists

      + +

      We use two different functions to query active and expiring delegations, so the user is given a choice on which of these lists he wants to view.

      + +
      #list type
      +title = 'Please choose the type of list: '
      +options = ['Active Vesting Delegations', 'Expiring Vesting Delegations']
      +
      +#get index and selected list name
      +option, index = pick(options, title)
      +print('\n' + 'List of ' + option + ': ' + '\n')
      +
      + +

      Based on the result of the choice, the relevant blockchain query is executed and the result of the query displayed on the console/terminal.

      + +
      if option=='Active Vesting Delegations' :
      +    #active delegations
      +	delegations = client.get_vesting_delegations(username, '', limit)
      +	if len(delegations) == 0:
      +		print('No ' + option)
      +	else:
      +		pprint.pprint(delegations)
      +else:
      +    #expiring delegations
      +	delegations = client.get_expiring_vesting_delegations(username, "2018-01-01T00:00:00", limit)
      +	if len(delegations) == 0:
      +		print('No ' + option)
      +	else:
      +		pprint.pprint(delegations)
      +
      + +

      For both the queries the starting points were defined in such a way as to include all available data but this can be changed depending on the user requirements.

      + +

      That’s it!

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/29_get_delegations_by_user
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/get_follower_and_following_list.html b/docs/tutorials-python/get_follower_and_following_list.html new file mode 100644 index 0000000000000000000000000000000000000000..9d702abd274ec7a4bf7709e4cbdbd6cb1c36ecbe --- /dev/null +++ b/docs/tutorials-python/get_follower_and_following_list.html @@ -0,0 +1,461 @@ + + + + + + + + + + + + + + + + + + +PY: Get Follower And Following List | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Get Follower And Following List + + +

      + +

      Tutorial pulls a list of the followers or authors being followed from the blockchain then displays the result.

      +
      + + +

      Full, runnable src of Get Follower And Following List can be downloaded as part of the PY tutorials repository. +

      + +

      This tutorial will explain and show you how to access the Steem blockchain using the steem-python library to fetch list of authors being followed or authors that a specified user is following.

      + +

      Intro

      + +

      We are using the get_followers and get_following functions that are built into the official library steem-python. These functions allow us to query the Steem blockchain in order to retrieve either a list of authors that are being followed or a list of authors that are currently following a specified user. There are 4 parameters required to execute these functions:

      + +
        +
      1. account - The specific user for which the follower(ing) list will be retrieved
      2. +
      3. start follower(ing) - The starting letter(s) or name for the search query. This value can be set as an empty string in order to include all authors starting from “a”
      4. +
      5. follow type - This value is set to blog and includes all users following or being followed by the user. This is currently the only valid parameter value for this function to execute correctly.
      6. +
      7. limit - The maximum number of lines that can be returned by the query
      8. +
      + +

      Steps

      + +
        +
      1. App setup - Library install and import
      2. +
      3. Input variables - Collecting the required inputs via the UI
      4. +
      5. Get followers/following Get the followers or users being followed
      6. +
      7. Print output - Print results in output
      8. +
      + +

      1. App setup

      + +

      In this tutorial we use 2 packages, pick - helps us to select the query type interactively. steem - steem-python library, interaction with Blockchain.

      + +

      First we import both libraries and initialize Steem class

      + +
      from pick import pick
      +from steem import Steem
      +
      +s = Steem()
      +
      + +

      2. Input variables

      + +

      We assign two of the variables via a simple input from the UI.

      + +
      #capture username
      +username = input("Username: ")
      +
      +#capture list limit
      +limit = input("Max number of followers(ing) to display: ")
      +
      + +

      Next we make a list of the two list options available to the user, following or followers and setup pick.

      + +
      #list type
      +title = 'Please choose the type of list: '
      +options = ['Follower', 'Following']
      +
      +#get index and selected list name
      +option, index = pick(options, title)
      +print("List of " + option)
      +
      + +

      This will show the two options as a list to select in terminal/command prompt. From there we can determine which function to execute. We also display the choice on the UI for clarity.

      + +

      3. Get followers/following

      + +

      Now that we know which function we will be using, we can form the query to send to the blockchain. The selection is done with a simple if statement.

      + +
      if option=="Follower" :
      +    follow = s.get_followers(username, '', 'blog', limit)
      +    # for follower in follow:
      +    #     lists.append(follower["follower"])
      +    # print(*lists, sep='\n')
      +else:
      +    follow = s.get_following(username, '', 'blog', limit)
      +    # for following in follow:
      +    #     lists.append(following["following"])
      +    # print(*lists, sep='\n')
      +
      + +

      The output is displayed using the same if statement and will be discussed in the next step.

      + +

      4. Print output

      + +

      Next, we will print the result.

      + +
      if option=="Follower" :
      +    # follow = s.get_followers(username, '', 'blog', limit)
      +    for follower in follow:
      +        lists.append(follower["follower"])
      +    print(*lists, sep='\n')
      +else:
      +    # follow = s.get_following(username, '', 'blog', limit)
      +    for following in follow:
      +        lists.append(following["following"])
      +    print(*lists, sep='\n')
      +
      + +

      The query returns an array of objects. We use the for loop to build a list of only the followers(ing) from that array and then display the list on the UI with line separators. This creates an easy to read list of authors.

      + +

      We also do a check for when the list is empty to display the proper message.

      + +
      #check if follower(ing) list is empty
      +if len(lists) == 0:
      +    print("No "+option+" information available")
      +
      + +

      This is a fairly simple example of how to use these functions but we encourage you to play around with the parameters to gain further understanding of possible results.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/19_get_follower_and_following_list
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see output in terminal/command prompt screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/get_post_comments.html b/docs/tutorials-python/get_post_comments.html new file mode 100644 index 0000000000000000000000000000000000000000..8282b877920da384fa0997de997d6cf18bdfdb8a --- /dev/null +++ b/docs/tutorials-python/get_post_comments.html @@ -0,0 +1,528 @@ + + + + + + + + + + + + + + + + + + +PY: Get Post Comments | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Get Post Comments + + +

      + +

      Fetch comments made on each content or post using Python.

      +
      + + +

      Full, runnable src of Get Post Comments can be downloaded as part of the PY tutorials repository. +

      + +

      This tutorial will explain and show you how to access the Steem blockchain using the steem-python library to fetch list of posts and get replies info on selected post.

      + +

      Intro

      + +

      Steem python library has built-in function to get active voters information if post with author and permlink as an argument. Since we don’t have predefined post or author/permlink. We will fetch post list from previous tutorial and give option to choose one post to get its active voters. get_content_replies function fetches list of replies on content. Note that get_discussions_by_hot filter is used for fetching 5 posts and after selection of post tutorial uses author and permlink of the post to fetch replies.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import
      2. +
      3. Post list - List of posts to select from created filter
      4. +
      5. Replies list - Get replies list for selected post
      6. +
      7. Print output - Print results in output
      8. +
      + +

      1. App setup

      + +

      In this tutorial we use 3 packages, pick - helps us to select filter interactively. steem - steem-python library, interaction with Blockchain. pprint - print results in better format.

      + +

      First we import all three library and initialize Steem class

      + +
          import pprint
      +    from pick import pick
      +    # initialize Steem class
      +    from steem import Steem
      +
      +    s = Steem()
      +
      + +

      2. Post list

      + +

      Next we will fetch and make list of posts and setup pick properly.

      + +
          query = {
      +        "limit":5, #number of posts
      +        "tag":"" #tag of posts
      +        }
      +    #post list for selected query
      +    posts = s.get_discussions_by_hot(query)
      +
      +    title = 'Please choose post: '
      +    options = []
      +    #posts list options
      +    for post in posts:
      +        options.append(post["author"]+'/'+post["permlink"])
      +    # get index and selected filter name
      +    option, index = pick(options, title)
      +
      + +

      This will show us list of posts to select in terminal/command prompt. And after selection we will get index and post name to index and option variables.

      + +

      3. Replies list

      + +

      Next we will replies on selected post with get_content_replies.

      + +
        # get replies for given post
      +  replies = s.get_content_replies(posts[index]["author"],posts[index]["permlink"])
      +
      + +

      4. Print output

      + +

      Next, we will print result, replies on selected post, selected post details and number of replies.

      + +
        # print post details for selected post
      +  pprint.pprint(replies)
      +  pprint.pprint("Selected: "+option)
      +  pprint.pprint("Number of replies: "+str(len(replies)))
      +
      + +

      The example of result returned from the service is a JSON object with the following properties:

      + +
      [{'abs_rshares': 0,
      +  'active': '2018-06-15T10:43:36',
      +  'active_votes': [],
      +  'allow_curation_rewards': True,
      +  'allow_replies': True,
      +  'allow_votes': True,
      +  'author': 'sarcasms',
      +  'author_reputation': 1086863019,
      +  'author_rewards': 0,
      +  'beneficiaries': [],
      +  'body': 'follow us for news, media, memes, sports updates and lots '
      +          'more...',
      +  'body_length': 0,
      +  'cashout_time': '2018-06-22T10:43:36',
      +  'category': 'fiction',
      +  'children': 0,
      +  'children_abs_rshares': 0,
      +  'created': '2018-06-15T10:43:36',
      +  'curator_payout_value': '0.000 SBD',
      +  'depth': 1,
      +  'id': 53110589,
      +  'json_metadata': '{"tags":["fiction"],"users":["sarcasms"],"app":"steemit/0.1"}',
      +  'last_payout': '1970-01-01T00:00:00',
      +  'last_update': '2018-06-15T10:43:36',
      +  'max_accepted_payout': '1000000.000 SBD',
      +  'max_cashout_time': '1969-12-31T23:59:59',
      +  'net_rshares': 0,
      +  'net_votes': 0,
      +  'parent_author': 'muratkbesiroglu',
      +  'parent_permlink': 'short-sci-fi-story-the-android-that-sell-meaning',
      +  'pending_payout_value': '0.000 SBD',
      +  'percent_steem_dollars': 10000,
      +  'permlink': 're-muratkbesiroglu-short-sci-fi-story-the-android-that-sell-meaning-20180615t104323737z',
      +  'promoted': '0.000 SBD',
      +  'reblogged_by': [],
      +  'replies': [],
      +  'reward_weight': 10000,
      +  'root_author': 'muratkbesiroglu',
      +  'root_permlink': 'short-sci-fi-story-the-android-that-sell-meaning',
      +  'root_title': 'Short Sci-Fi Story: The Android That Sell Meaning',
      +  'title': '',
      +  'total_payout_value': '0.000 SBD',
      +  'total_pending_payout_value': '0.000 STEEM',
      +  'total_vote_weight': 0,
      +  'url': '/fiction/@muratkbesiroglu/short-sci-fi-story-the-android-that-sell-meaning#@sarcasms/re-muratkbesiroglu-short-sci-fi-story-the-android-that-sell-meaning-20180615t104323737z',
      +  'vote_rshares': 0},
      + {'abs_rshares': 0,
      +  'active': '2018-06-15T11:26:15',
      +  'active_votes': [],
      +  'allow_curation_rewards': True,
      +  'allow_replies': True,
      +  'allow_votes': True,
      +  'author': 'vicky3585',
      +  'author_reputation': 40338001,
      +  'author_rewards': 0,
      +  'beneficiaries': [],
      +  'body': 'lovely story keep it up...',
      +  'body_length': 0,
      +  'cashout_time': '2018-06-22T11:26:15',
      +  'category': 'fiction',
      +  'children': 0,
      +  'children_abs_rshares': 0,
      +  'created': '2018-06-15T11:26:15',
      +  'curator_payout_value': '0.000 SBD',
      +  'depth': 1,
      +  'id': 53114015,
      +  'json_metadata': '{"tags":["fiction"],"app":"steemit/0.1"}',
      +  'last_payout': '1970-01-01T00:00:00',
      +  'last_update': '2018-06-15T11:26:15',
      +  'max_accepted_payout': '1000000.000 SBD',
      +  'max_cashout_time': '1969-12-31T23:59:59',
      +  'net_rshares': 0,
      +  'net_votes': 0,
      +  'parent_author': 'muratkbesiroglu',
      +  'parent_permlink': 'short-sci-fi-story-the-android-that-sell-meaning',
      +  'pending_payout_value': '0.000 SBD',
      +  'percent_steem_dollars': 10000,
      +  'permlink': 're-muratkbesiroglu-short-sci-fi-story-the-android-that-sell-meaning-20180615t112615204z',
      +  'promoted': '0.000 SBD',
      +  'reblogged_by': [],
      +  'replies': [],
      +  'reward_weight': 10000,
      +  'root_author': 'muratkbesiroglu',
      +  'root_permlink': 'short-sci-fi-story-the-android-that-sell-meaning',
      +  'root_title': 'Short Sci-Fi Story: The Android That Sell Meaning',
      +  'title': '',
      +  'total_payout_value': '0.000 SBD',
      +  'total_pending_payout_value': '0.000 STEEM',
      +  'total_vote_weight': 0,
      +  'url': '/fiction/@muratkbesiroglu/short-sci-fi-story-the-android-that-sell-meaning#@vicky3585/re-muratkbesiroglu-short-sci-fi-story-the-android-that-sell-meaning-20180615t112615204z',
      +  'vote_rshares': 0}]
      +'Selected: muratkbesiroglu/short-sci-fi-story-the-android-that-sell-meaning'
      +'Number of replies: 18'
      +
      + +

      From this result you have access to everything associated to the replies including content of reply, author, timestamp, etc., so that you can be use in further development of application with Python.

      + +

      That’s it!

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/07_get_post_comments
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see output in terminal/command prompt screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/get_post_details.html b/docs/tutorials-python/get_post_details.html new file mode 100644 index 0000000000000000000000000000000000000000..8dfe961eda767a42a1c7349a5e7af00c2709dd2d --- /dev/null +++ b/docs/tutorials-python/get_post_details.html @@ -0,0 +1,500 @@ + + + + + + + + + + + + + + + + + + +PY: Get Post Details | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Get Post Details + + +

      + +

      Get post details from list of posts from the blockchain with created filter and tag then display selected post details.

      +
      + + +

      Full, runnable src of Get Post Details can be downloaded as part of the PY tutorials repository. +

      + +

      We will explain and show you how to access the Steem blockchain using the steem-python library to fetch list of posts filtered by a filter and tag

      + +

      Intro

      + +

      Steem python library has built-in function to get details of post with author and permlink as an argument. Since we don’t have predefined post or author/permlink. We will fetch post list from previous tutorial and give option to choose one option/post to get its details. get_content function fetches latest state of the post and delivers its details. Note that get_discussions_by_created filter is used for fetching 5 posts which by default contains details of each post, but for purpose of this tutorial we will showcase get_content function to fetch details.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import
      2. +
      3. Post list - List of posts to select from created filter
      4. +
      5. Post details - Get post details for selected post
      6. +
      7. Print output - Print results in output
      8. +
      + +

      1. App setup

      + +

      In this tutorial we use 3 packages, pick - helps us to select filter interactively. steem - steem-python library, interaction with Blockchain. pprint - print results in better format.

      + +

      First we import all three library and initialize Steem class

      + +
          import pprint
      +    from pick import pick
      +    # initialize Steem class
      +    from steem import Steem
      +
      +    s = Steem()
      +
      + +

      2. Post list

      + +

      Next we will fetch and make list of posts and setup pick properly.

      + +
          query = {
      +        "limit":5, #number of posts
      +        "tag":"" #tag of posts
      +        }
      +    #post list for selected query
      +    posts = s.get_discussions_by_created(query)
      +
      +    title = 'Please choose post: '
      +    options = []
      +    #posts list options
      +    for post in posts:
      +        options.append(post["author"]+'/'+post["permlink"])
      +    # get index and selected filter name
      +    option, index = pick(options, title)
      +
      + +

      This will show us list of posts to select in terminal/command prompt. And after selection we will get index and post name to index and option variables.

      + +

      3. Post details

      + +

      Next we will fetch post details with get_content. By default get_discussions_by_created function already contains post details, but for this tutorial purpose we will ignore all other fields but only use author and permlink fields to fetch fresh post details.

      + +
      
      +details = s.get_content(posts[index]["author"],posts[index]["permlink"])
      +
      + +

      4. Print output

      + +

      Next, we will print result, details of selected post.

      + +
          # print post details for selected post
      +    pprint.pprint(details)
      +    pprint.pprint("Selected: "+option)
      +
      + +

      The example of result returned from the service is a JSON object with the following properties:

      + +
      {
      +    "id": 37338948,
      +    "author": "steemitblog",
      +    "permlink": "join-team-steemit-at-tokenfest",
      +    "category": "steemit",
      +    "parent_author": "",
      +    "parent_permlink": "steemit",
      +    "title": "Join Team Steemit at TokenFest!",
      +    "body":
      +        "<a href=\"https://tokenfest.adria.digital\"><img src=\"https://i.imgur.com/fOScDIW.png\"/></a>\n\nHello Steemians! If you’d like to meet Team Steemit live-in-person, or are just interested in attending what promises to be a great blockchain conference, join us at <a href=\"https://tokenfest.adria.digital/\">TokenFest</a> in San Francisco from March 15th to 16th. \n\nSteemit CEO, Ned Scott, will be participating in a fireside chat alongside Steemit’s CTO, Harry Schmidt, as well as the creator of Utopian.io, Diego Pucci. Steemit will also be hosting the opening party on Thursday night and we’d certainly love to meet as many of you as possible IRL, so head on over to https://tokenfest.adria.digital/ and get your tickets while you can. \n\n*Team Steemit*",
      +    "json_metadata":
      +        "{\"tags\":[\"steemit\",\"tokenfest\",\"conference\"],\"image\":[\"https://i.imgur.com/fOScDIW.png\"],\"links\":[\"https://tokenfest.adria.digital\",\"https://tokenfest.adria.digital/\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}",
      +    "last_update": "2018-03-07T23:22:54",
      +    "created": "2018-03-07T20:56:36",
      +    "active": "2018-03-13T01:40:21",
      +    "last_payout": "1970-01-01T00:00:00",
      +    "depth": 0,
      +    "children": 29,
      +    "net_rshares": "11453442114933",
      +    "abs_rshares": "11454054795840",
      +    "vote_rshares": "11454054795840",
      +    "children_abs_rshares": "13568695606090",
      +    "cashout_time": "2018-03-14T20:56:36",
      +    "max_cashout_time": "1969-12-31T23:59:59",
      +    "total_vote_weight": 3462435,
      +    "reward_weight": 10000,
      +    "total_payout_value": "0.000 SBD",
      +    "curator_payout_value": "0.000 SBD",
      +    "author_rewards": 0,
      +    "net_votes": 77,
      +    "root_comment": 37338948,
      +    "max_accepted_payout": "0.000 SBD",
      +    "percent_steem_dollars": 10000,
      +    "allow_replies": true,
      +    "allow_votes": true,
      +    "allow_curation_rewards": true,
      +    "beneficiaries": [],
      +    "url": "/steemit/@steemitblog/join-team-steemit-at-tokenfest",
      +    "root_title": "Join Team Steemit at TokenFest!",
      +    "pending_payout_value": "46.436 SBD",
      +    "total_pending_payout_value": "0.000 STEEM",
      +    "active_votes": [
      +        {
      +            "voter": "steemitblog",
      +            "weight": 0,
      +            "rshares": "1870813909383",
      +            "percent": 10000,
      +            "reputation": "128210130644387",
      +            "time": "2018-03-07T20:56:36"
      +        },
      +        {
      +            "voter": "kevinwong",
      +            "weight": 526653,
      +            "rshares": "2208942520687",
      +            "percent": 5000,
      +            "reputation": "374133832002581",
      +            "time": "2018-03-08T04:27:00"
      +        }
      +    ],
      +    "replies": [],
      +    "author_reputation": "128210130644387",
      +    "promoted": "0.000 SBD",
      +    "body_length": 754,
      +    "reblogged_by": []
      +}
      +'Selected: steemitblog/join-team-steemit-at-tokenfest'
      +
      + +

      From this result you have access to everything associated to the post including additional metadata which is a JSON string (that must be decoded to use), active_votes info, post title, body, etc. details that can be used in further development of application with Python.

      + +

      That’s it!

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/05_get_post_details
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see output in terminal/command prompt screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/get_posts.html b/docs/tutorials-python/get_posts.html new file mode 100644 index 0000000000000000000000000000000000000000..ac15f5d7cdf94e9770aee66aa618feccddc8fcb4 --- /dev/null +++ b/docs/tutorials-python/get_posts.html @@ -0,0 +1,512 @@ + + + + + + + + + + + + + + + + + + +PY: Get Posts | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Get Posts + + +

      + +

      Tutorial pulls a list of the posts from the blockchain with selected filter and tag then displays output.

      +
      + + +

      Full, runnable src of Get Posts can be downloaded as part of the PY tutorials repository. +

      + +

      This tutorial will explain and show you how to access the Steem blockchain using the steem-python library to fetch list of posts filtered by a filter and tag

      + +

      Intro

      + +

      In Steem there are built-in filters trending, hot, created, active, promoted etc. which helps us to get list of posts. get_discussions_by_trending(query), get_discussions_by_hot(query), get_discussions_by_created(query), etc. functions are built-in in official library steem-python that we are going to use throughout all Python tutorials.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import
      2. +
      3. Filters list - List of filters to select from
      4. +
      5. Query details - Form a query
      6. +
      7. Print output - Print results in output
      8. +
      + +

      1. App setup

      + +

      In this tutorial we use 3 packages, pick - helps us to select filter interactively. steem - steem-python library, interaction with Blockchain. pprint - print results in better format.

      + +

      First we import all three library and initialize Steem class

      + +
          import pprint
      +    from pick import pick
      +    # initialize Steem class
      +    from steem import Steem
      +
      +    s = Steem()
      +
      + +

      2. Filters list

      + +

      Next we will make list of filters and setup pick properly.

      + +
          title = 'Please choose filter: '
      +    #filters list
      +    options = ['trending', 'hot', 'active', 'created', 'promoted']
      +    # get index and selected filter name
      +    option, index = pick(options, title)
      +
      + +

      This will show us list of filters to select in terminal/command prompt. And after selection we will get index and filter name to index and option variables.

      + +

      3. Query details

      + +

      Next we will form a query. In Steem,

      + +
        +
      • You can add a tag to filter the posts that you receive from the server
      • +
      • You can also limit the amount of results you would like to receive from the query
      • +
      + +
      query = {
      +    "limit":2, #number of posts
      +    "tag":"" #tag of posts
      +    }
      +#post list for selected query
      +posts = {0: s.get_discussions_by_trending(query),
      +         1: s.get_discussions_by_hot(query),
      +         2: s.get_discussions_by_active(query),
      +         3: s.get_discussions_by_created(query),
      +         4: s.get_discussions_by_promoted(query)
      +}
      +
      + +

      Above code shows example of query and simple list of function that will fetch post list with user selected filter.

      + +

      4. Print output

      + +

      Next, we will print result, post list and selected filter name.

      + +
          # print post list for selected filter
      +    pprint.pprint(posts[index])
      +    pprint.pprint("Selected: "+option)
      +
      + +

      The example of result returned from the service is a JSON object with the following properties:

      + +
      [
      +    {
      +        "id": 37338948,
      +        "author": "steemitblog",
      +        "permlink": "join-team-steemit-at-tokenfest",
      +        "category": "steemit",
      +        "parent_author": "",
      +        "parent_permlink": "steemit",
      +        "title": "Join Team Steemit at TokenFest!",
      +        "body":
      +            "<a href=\"https://tokenfest.adria.digital\"><img src=\"https://i.imgur.com/fOScDIW.png\"/></a>\n\nHello Steemians! If you’d like to meet Team Steemit live-in-person, or are just interested in attending what promises to be a great blockchain conference, join us at <a href=\"https://tokenfest.adria.digital/\">TokenFest</a> in San Francisco from March 15th to 16th. \n\nSteemit CEO, Ned Scott, will be participating in a fireside chat alongside Steemit’s CTO, Harry Schmidt, as well as the creator of Utopian.io, Diego Pucci. Steemit will also be hosting the opening party on Thursday night and we’d certainly love to meet as many of you as possible IRL, so head on over to https://tokenfest.adria.digital/ and get your tickets while you can. \n\n*Team Steemit*",
      +        "json_metadata":
      +            "{\"tags\":[\"steemit\",\"tokenfest\",\"conference\"],\"image\":[\"https://i.imgur.com/fOScDIW.png\"],\"links\":[\"https://tokenfest.adria.digital\",\"https://tokenfest.adria.digital/\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}",
      +        "last_update": "2018-03-07T23:22:54",
      +        "created": "2018-03-07T20:56:36",
      +        "active": "2018-03-13T01:40:21",
      +        "last_payout": "1970-01-01T00:00:00",
      +        "depth": 0,
      +        "children": 29,
      +        "net_rshares": "11453442114933",
      +        "abs_rshares": "11454054795840",
      +        "vote_rshares": "11454054795840",
      +        "children_abs_rshares": "13568695606090",
      +        "cashout_time": "2018-03-14T20:56:36",
      +        "max_cashout_time": "1969-12-31T23:59:59",
      +        "total_vote_weight": 3462435,
      +        "reward_weight": 10000,
      +        "total_payout_value": "0.000 SBD",
      +        "curator_payout_value": "0.000 SBD",
      +        "author_rewards": 0,
      +        "net_votes": 77,
      +        "root_comment": 37338948,
      +        "max_accepted_payout": "0.000 SBD",
      +        "percent_steem_dollars": 10000,
      +        "allow_replies": true,
      +        "allow_votes": true,
      +        "allow_curation_rewards": true,
      +        "beneficiaries": [],
      +        "url": "/steemit/@steemitblog/join-team-steemit-at-tokenfest",
      +        "root_title": "Join Team Steemit at TokenFest!",
      +        "pending_payout_value": "46.436 SBD",
      +        "total_pending_payout_value": "0.000 STEEM",
      +        "active_votes": [
      +            {
      +                "voter": "steemitblog",
      +                "weight": 0,
      +                "rshares": "1870813909383",
      +                "percent": 10000,
      +                "reputation": "128210130644387",
      +                "time": "2018-03-07T20:56:36"
      +            },
      +            {
      +                "voter": "kevinwong",
      +                "weight": 526653,
      +                "rshares": "2208942520687",
      +                "percent": 5000,
      +                "reputation": "374133832002581",
      +                "time": "2018-03-08T04:27:00"
      +            }
      +        ],
      +        "replies": [],
      +        "author_reputation": "128210130644387",
      +        "promoted": "0.000 SBD",
      +        "body_length": 754,
      +        "reblogged_by": []
      +    },
      +    {
      +
      +    }
      +]
      +'Selected: hot'
      +
      + +

      From this result you have access to everything associated to the posts including additional metadata which is a JSON string (that must be decoded to use), active_votes info, post title, body, etc. details that can be used in further development of application with Python.

      + +

      That’s it!

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/04_get_posts
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see output in terminal/command prompt screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/get_voters_list_on_post.html b/docs/tutorials-python/get_voters_list_on_post.html new file mode 100644 index 0000000000000000000000000000000000000000..a376f030b5b6c03c018881165836f7af5e5b62df --- /dev/null +++ b/docs/tutorials-python/get_voters_list_on_post.html @@ -0,0 +1,454 @@ + + + + + + + + + + + + + + + + + + +PY: Get Voters List On Post | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Get Voters List On Post + + +

      + +

      Voters list and detail of each vote on selected content.

      +
      + + +

      Full, runnable src of Get Voters List On Post can be downloaded as part of the PY tutorials repository. +

      + +

      Tutorial will explain and show you how to access the Steem blockchain using the steem-python library to fetch list of posts and get voters info on selected post.

      + +

      Intro

      + +

      Steem python library has built-in function to get active voters information if post with author and permlink as an argument. Since we don’t have predefined post or author/permlink. We will fetch post list from previous tutorial and give option to choose one post to get its active voters. get_active_votes function fetches list of active voters on content. Note that get_discussions_by_active filter is used for fetching 5 posts which by default contains active_votes of each post, but for purpose of this tutorial we will use get_active_votes function to fetch voters info.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import
      2. +
      3. Post list - List of posts to select from created filter
      4. +
      5. Voters list - Get voters list for selected post
      6. +
      7. Print output - Print results in output
      8. +
      + +

      1. App setup

      + +

      In this tutorial we use 3 packages, pick - helps us to select filter interactively. steem - steem-python library, interaction with Blockchain. pprint - print results in better format.

      + +

      First we import all three library and initialize Steem class

      + +
          import pprint
      +    from pick import pick
      +    # initialize Steem class
      +    from steem import Steem
      +
      +    s = Steem()
      +
      + +

      2. Post list

      + +

      Next we will fetch and make list of posts and setup pick properly.

      + +
          query = {
      +        "limit":5, #number of posts
      +        "tag":"" #tag of posts
      +        }
      +    #post list for selected query
      +    posts = s.get_discussions_by_active(query)
      +
      +    title = 'Please choose post: '
      +    options = []
      +    #posts list options
      +    for post in posts:
      +        options.append(post["author"]+'/'+post["permlink"])
      +    # get index and selected filter name
      +    option, index = pick(options, title)
      +
      + +

      This will show us list of posts to select in terminal/command prompt. And after selection we will get index and post name to index and option variables.

      + +

      3. Voters list

      + +

      Next we will fetch active votes on selected post with get_active_votes. By default get_discussions_by_active function already contains active_votes list, but for this tutorial purpose we will ignore all other fields but only use author and permlink fields to fetch voters list.

      + +
      
      +voters = s.get_active_votes(posts[index]["author"],posts[index]["permlink"])
      +
      + +

      4. Print output

      + +

      Next, we will print result, details of selected post.

      + +
          # print voters list for selected post
      +    pprint.pprint(voters)
      +    pprint.pprint("Selected: "+option)
      +
      + +

      The example of result returned from the service is a JSON object with the following properties:

      + +
      [{'percent': 100,
      +  'reputation': '4675452335798',
      +  'rshares': 174045922,
      +  'time': '2018-06-13T05:27:06',
      +  'voter': 'ubg',
      +  'weight': 663},
      + {'percent': 3000,
      +  'reputation': 0,
      +  'rshares': '52213408920',
      +  'time': '2018-06-13T12:53:30',
      +  'voter': 'warofcraft',
      +  'weight': 99589},
      + {'percent': 10000,
      +  'reputation': '16976056264304',
      +  'rshares': '41495494555',
      +  'time': '2018-06-13T08:56:00',
      +  'voter': 'jiahn',
      +  'weight': 80257}
      +]
      +'Selected: steemitblog/join-team-steemit-at-tokenfest'
      +
      + +

      From this result you have access to everything associated to the voter including reputation of voter, timestamp, voter’s account name, percent and weight of vote, rshares reward shares values that you can be use in further development of application with Python.

      + +

      That’s it!

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/06_get_voters_list
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see output in terminal/command prompt screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/getting_started.html b/docs/tutorials-python/getting_started.html new file mode 100644 index 0000000000000000000000000000000000000000..5f1d00c1b1310b315f1b71a382b5e89497af3e63 --- /dev/null +++ b/docs/tutorials-python/getting_started.html @@ -0,0 +1,381 @@ + + + + + + + + + + + + + + + + + + +PY: Getting Started | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Getting Started + + +

      + +

      The official Steem library for Python is steem-python. It comes with a BIP38 encrypted wallet and a practical CLI utility called steempy.

      +
      + + +

      Full, runnable src of Getting Started can be downloaded as part of the PY tutorials repository. +

      + +

      The library was designed to allow Python developers to easily access the network as well as build utilities and applications.

      + +

      Currently steem-python documentation is generated in the standard pydoc format.

      + +

      Documentation is available at: Official steem-python Docs.

      + +
      + +

      Dev requirements

      + +

      In our Python tutorials we recommend developers to be familiar with following requirements/libraries.

      + +
        +
      • +

        Python developer should be familiar with Python 3.x and above

        +
      • +
      • +

        Medium knowledge of package manager pip/pip3 and/or pipenv is required, since our tutorials will be using package manager to get started quickly.

        +
      • +
      • +

        Terminal (Linux/Mac) or Cmd (Windows command prompt) knowledge is also required, since most python tutorials will only work with terminal and print out result in different formats.

        +
      • +
      • +

        Python environment path should be set up properly so that terminal can access proper python library without conflicts.

        +
      • +
      • +

        Additional and optional packages that we might use: setuptools, brew

        +
      • +
      + +

      To get started with Python, you can also check official Python installation and Python tutorial.

      + +

      To get started with our Python tutorials, checkout our first tutorial here.

      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/grant_active_permission.html b/docs/tutorials-python/grant_active_permission.html new file mode 100644 index 0000000000000000000000000000000000000000..00ddfbe3615a81847e862902b2850b941867c01e --- /dev/null +++ b/docs/tutorials-python/grant_active_permission.html @@ -0,0 +1,480 @@ + + + + + + + + + + + + + + + + + + +PY: Grant Active Permission | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Grant Active Permission + + +

      + +

      How to give another user active permission on your account using Python.

      +
      + + +

      Full, runnable src of Grant Active Permission can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we show you how to check if someone has got active permission for an account on the Steem blockchain and how to grant or revoke that permission using the commit class found within the steem-python library.

      + +

      Providing another user active permission for your account enables them to do fund transfers from your account. This can be useful in setting up a secondary account(s) to manage funds for a main account or having a backup should you lose passwords for the main account.

      + +

      One of the common practice nowadays is to lend/delegate SP to another account, above same technique can be used to create market around it with minimum 3rd party trust. All your funds stay in your account. You can use/create automated system where you can lease for certain period of time and system can take care of payments and release of delegations (notify clients). Even better, you can use multi-signature feature to establish 100% trust where clients will have to confirm, approve transactions.

      + +

      Active permissions and authority should be used with utmost care, you don’t want to lose your funds. It is really not easy to hack Steem accounts, let alone take control over it. But without careful use (revealing private keys) losing liquid funds are not that difficult and it takes only couple seconds to do that, keeping most value powered up always helps.

      + +

      this article has more detail around active authorities

      + +

      Intro

      + +

      The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the allow and disallow methods found within the commit class in the library. Before we grant or revoke permission, we use the get_account function to check whether the requested user already has that permission or not. This is not strictly necessary but adds to the useability of the process. The allow method has 5 parameters:

      + +
        +
      1. foreign - The foreign account that will obtain access
      2. +
      3. weight - This is an optional parameter defining the weight to use. If not defined, the threshold value will be used. If the weight is smaller than the threshold, additional signatures will be required.
      4. +
      5. permission - The actual permission to modify. This value must be either “posting”, “active” or “owner”
      6. +
      7. account - The account to allow access to
      8. +
      9. threshold - The threshold that needs to be reached by signatures to be able to interact
      10. +
      + +

      The disallow method uses the same parameters except for weight which is not required.

      + +

      There is currently a bug with the disallow method when using it on the testnet that we normally connect to. Due to that bug, we are using the production server for this tutorial. Special care should be taken when creating transactions as everything we do will affect real accounts.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Input user info and connection to production
      2. +
      3. Username validation - Check validity of user and foreign account
      4. +
      5. Check permission status - Check current permission status of foreign account
      6. +
      7. Commit to blockchain - Commit transaction to blockchain
      8. +
      + +

      1. App setup and connection

      + +

      In this tutorial we use 2 packages:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • pick - helps select the query type interactively
      • +
      + +

      We import the libraries for the application.

      + +
      import steembase
      +import steem
      +from pick import pick
      +
      + +

      We require the private active key of the user in order for the allow or disallow to be committed to the blockchain. The values are supplied via the terminal/console before we initialise the steem class with the supplied private key included.

      + +
      #capture user information
      +username = input('Enter username: ')
      +wif = input('Enter private ACTIVE key: ')
      +
      +#connect to production server with active key
      +client = steem.Steem(keys=[wif])
      +
      + +

      2. Username validation

      + +

      Both the main account granting the permission and the account that permission is being granted to are first checked to make certain that they do in fact exist. We do this with the get_account function.

      + +
      #check valid user
      +userinfo = client.get_account(username)
      +if(userinfo is None) :
      +    print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!')
      +    exit()
      +
      +#get account to authorise and check if valid
      +foreign_acc = input('Please enter the account name for ACTIVE authorisation: ')
      +if (foreign_acc == username) :
      +    print('Cannot allow or disallow active permission to your own account')
      +    exit()
      +foreign_userinfo = client.get_account(foreign_acc)
      +if(foreign_userinfo is None) :
      +    print('Oops. Looks like user ' + foreign_acc + ' doesn\'t exist on this chain!')
      +    exit()
      +
      + +

      3. Check permission status

      + +

      In order to determine which function to execute (allow or disallow) we first need to check whether the requested user already has permission or not. We do this with the same variable created in the previous step. The get_account function has a value - active - that contains an array of the all the usernames that has been granted active permission for the account being queried. We use this check to limit the options of the user as you cannot grant permission to a user that already has permission or revoke permission of a user that does not yet have permission. The information is displayed on the options list.

      + +
      #check if foreign_account already has active auth
      +_data = []
      +title = ''
      +for i in range(len(userinfo['active']['account_auths'])) :
      +    _data.append(userinfo['active']['account_auths'][i])
      +    if (_data[i][0] == foreign_acc) :
      +        title = (foreign_acc + ' already has active permission. Please choose option from below list')
      +        options = ['DISALLOW', 'CANCEL']
      +
      +if (title == '') :
      +    title = (foreign_acc + ' does not yet active permission. Please choose option from below list')
      +    options = ['ALLOW', 'CANCEL']
      +
      + +

      4. Commit to blockchain

      + +

      Based on the check in the previous step, the user is given the option to allow, disallow or cancel the operation completely. All the required parameters have already been assigned via console/terminal input and based on the choice of the user the relevant function can be executed. A confirmation of the succesfully executed action is displayed on the UI.

      + +
      option, index = pick(options, title)
      +
      +if (option == 'CANCEL') :
      +    print('operation cancelled')
      +    exit()
      +
      +if (option == 'ALLOW') :
      +    #allow(foreign, weight=None, permission='posting', account=None, threshold=None)
      +    client.allow(foreign=foreign_acc, weight=1, permission='active', account=username, threshold=1)
      +    print(foreign_acc + ' has been granted active permission')
      +else :
      +    #disallow(foreign, permission='posting', account=None, threshold=None)
      +    client.disallow(foreign=foreign_acc, permission='active', account=username, threshold=1)
      +    print('active permission for ' + foreign_acc + ' has been removed')
      +
      + +

      And that’s it!

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/31_grant_active_permission
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/grant_posting_permission.html b/docs/tutorials-python/grant_posting_permission.html new file mode 100644 index 0000000000000000000000000000000000000000..14e30f5c8a445970886e1ec97d3da4ac0baf4a62 --- /dev/null +++ b/docs/tutorials-python/grant_posting_permission.html @@ -0,0 +1,474 @@ + + + + + + + + + + + + + + + + + + +PY: Grant Posting Permission | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Grant Posting Permission + + +

      + +

      How to give another user posting permission on your account using Python.

      +
      + + +

      Full, runnable src of Grant Posting Permission can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we show you how to check if someone has posting permission for an account on the Steem blockchain and how to grant or revoke that permission using the commit class found within the steem-python library.

      + +

      Providing another user posting permission for your account can be used to allow multiple users to submit posts on a single steemit community. @Utopian-Io is an example of such a community. There are also applications that allows you to schedule posts by automatically publishing on your behalf.

      + +

      Intro

      + +

      The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the allow and disallow methods found within the commit class in the library. Before we grant or revoke permission, we use the get_account function to check whether the requested user already has that permission or not. This is not strictly necessary but adds to the useability of the process. The allow method has 5 parameters:

      + +
        +
      1. foreign - The foreign account that will obtain access
      2. +
      3. weight - This is an optional parameter defining the weight to use. If not defined, the threshold value will be used. If the weight is smaller than the threshold, additional signatures will be required.
      4. +
      5. permission - The actual permission to modify. This value must be either “posting”, “active” or “owner”
      6. +
      7. account - The account to allow access to
      8. +
      9. threshold - The threshold that needs to be reached by signatures to be able to interact
      10. +
      + +

      The disallow method uses the same parameters except for weight which is not required.

      + +

      There is currently a bug with the disallow method when using it on the testnet that we normally connect to. Due to that bug, we are using the production server for this tutorial. Special care should be taken when creating transactions as everything we do will affect real accounts.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Input user info and connection to production
      2. +
      3. Username validation - Check validity of user and foreign account
      4. +
      5. Check permission status - Check current permission status of foreign account
      6. +
      7. Commit to blockchain - Commit transaction to blockchain
      8. +
      + +

      1. App setup and connection

      + +

      In this tutorial we use 2 packages:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • pick - helps select the query type interactively
      • +
      + +

      We import the libraries for the application.

      + +
      import steembase
      +import steem
      +from pick import pick
      +
      + +

      We require the private active key of the user in order for the allow or disallow to be committed to the blockchain. The values are supplied via the terminal/console before we initialise the steem class with the supplied private key included.

      + +
      #capture user information
      +username = input('Enter username: ')
      +wif = input('Enter private ACTIVE key: ')
      +
      +#connect to production server with active key
      +client = steem.Steem(keys=[wif])
      +
      + +

      2. Username validation

      + +

      Both the main account granting the permission and the account that permission is being granted to are first checked to make certain that they do in fact exist. We do this with the get_account function.

      + +
      #check valid user
      +userinfo = client.get_account(username)
      +if(userinfo is None) :
      +    print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!')
      +    exit()
      +
      +#get account to authorise and check if valid
      +foreign_acc = input('Please enter the account name for POSTING authorisation: ')
      +if (foreign_acc == username) :
      +    print('Cannot allow or disallow posting permission to your own account')
      +    exit()
      +foreign_userinfo = client.get_account(foreign_acc)
      +if(foreign_userinfo is None) :
      +    print('Oops. Looks like user ' + foreign_acc + ' doesn\'t exist on this chain!')
      +    exit()
      +
      + +

      3. Check permission status

      + +

      In order to determine which function to execute (allow or disallow) we first need to check whether the requested user already has permission or not. We do this with the same variable created in the previous step. The get_account function has a value - posting - that contains an array of all the usernames that has been granted posting permission for the account being queried. We use this check to limit the options of the user as you cannot grant permission to a user that already has permission or revoke permission of a user that does not yet have permission. The information is displayed on the options list.

      + +
      #check if foreign_account already has posting auth
      +_data = []
      +title = ''
      +for i in range(len(userinfo['posting']['account_auths'])) :
      +    _data.append(userinfo['posting']['account_auths'][i])
      +    if (_data[i][0] == foreign_acc) :
      +        title = (foreign_acc + ' already has posting permission. Please choose option from below list')
      +        options = ['DISALLOW', 'CANCEL']
      +
      +if (title == '') :
      +    title = (foreign_acc + ' does not yet posting permission. Please choose option from below list')
      +    options = ['ALLOW', 'CANCEL']
      +
      + +

      4. Commit to blockchain

      + +

      Based on the check in the previous step, the user is given the option to allow, disallow or cancel the operation completely. All the required parameters have already been assigned via console/terminal input and based on the choice of the user the relevant function can be executed. A confirmation of the succesfully executed action is displayed on the UI.

      + +
      option, index = pick(options, title)
      +
      +if (option == 'CANCEL') :
      +    print('operation cancelled')
      +    exit()
      +
      +if (option == 'ALLOW') :
      +    #allow(foreign, weight=None, permission='posting', account=None, threshold=None)
      +    client.allow(foreign=foreign_acc, weight=1, permission='posting', account=username, threshold=1)
      +    print(foreign_acc + ' has been granted posting permission')
      +else :
      +    #disallow(foreign, permission='posting', account=None, threshold=None)
      +    client.disallow(foreign=foreign_acc, permission='posting', account=username, threshold=1)
      +    print('posting permission for ' + foreign_acc + ' has been removed')
      +
      + +

      And that’s it!

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/30_grant_posting_permission
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/password_key_change.html b/docs/tutorials-python/password_key_change.html new file mode 100644 index 0000000000000000000000000000000000000000..c9c8b4fb13c43e885b3e0419b45e661926e6af4f --- /dev/null +++ b/docs/tutorials-python/password_key_change.html @@ -0,0 +1,484 @@ + + + + + + + + + + + + + + + + + + +PY: Password Key Change | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Password Key Change + + +

      + +

      How to change your accounts password and keys

      +
      + + +

      Full, runnable src of Password Key Change can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we will explain and show you how to change your account password and keys on the Steem blockchain using the steem class found within the steem-python library.

      + +

      Intro

      + +

      The Steem python library has a built-in function to update your account details on the blockchain. We are using the AccountUpdate and commit.finalizeOp to make these changes. The AccountUpdate function creates the operation that we will be committing to the blockchain using the commit.finalizeOp function. We first get the existing keys from your account then recreate these from your new password. Once these have been created using your new password we commit them to the blockchain. The initial parameters we need to complete this operation are:

      + +
        +
      1. account - The user account that we will be changing
      2. +
      3. old_password - Your existing password for the account we are changing
      4. +
      5. new_password - The new password we will be updating your account with
      6. +
      + +

      Caution: +This functionality does not work on the TestNet so we will be modifying the live blockchain.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to production
      2. +
      3. User input - Input user and limit parameters
      4. +
      5. Connect to the blockchain - Connect to the blockchain using the parameters collected from the user
      6. +
      7. Configure new keys - Setup the new json object that will have the new keys derived from your new password
      8. +
      9. Commit changes to blockchain - Commit the account update to the blockchain
      10. +
      + +

      1. App setup

      + +

      In this tutorial we use 2 package:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • steembase - library containing functions to manipulate private keys and passwords as well as commit the operation to the blockchain
      • +
      + +

      We import the libraries and get parameters from the user.

      + +
      import steem
      +import steembase
      +from steembase.account import PasswordKey
      +from steembase.account import PrivateKey
      +from steembase import operations
      +
      + +

      2. User input

      + +

      You will first be asked for the account that we will be modifying the password for. You will then be prompted to enter your existing password as well as your new password that we will update your account with.

      + +
      account = input('Account: ')
      +old_password = input('Current password: ')
      +new_password = input('New password: ')
      +
      + +

      3. Connect to the blockchain

      + +

      From the parameters that have been collected we will generate the private key for the account and connect to the Steem blockchain.

      + +
      old_owner_key = str(
      +    PasswordKey(account, old_password, "owner").get_private_key()
      +)
      +
      +client = steem.Steem(keys=[old_owner_key])
      +
      + +

      4. Configure new keys

      + +

      We will now generate new keys for each role using the new password as well as create the json that will be committed to the Steem blockchain. We generate new keys using the new password for each of these roles.

      + +
      new_public_keys = {}
      +
      +for role in ["owner", "active", "posting", "memo"]:
      +    private_key = PasswordKey(account, new_password, role).get_private_key()
      +    new_public_keys[role] = str(private_key.pubkey)
      +
      +new_data = {
      +    "account": account,
      +    "json_metadata": {},
      +    "owner": {
      +        "key_auths": [
      +            [new_public_keys["owner"], 1]
      +        ],
      +        "account_auths": [],
      +        "weight_threshold": 1
      +    },
      +    "active": {
      +        "key_auths": [
      +            [new_public_keys["active"], 1]
      +        ],
      +        "account_auths": [],
      +        "weight_threshold": 1
      +    },
      +    "posting": {
      +        "key_auths": [
      +            [new_public_keys["posting"], 1]
      +        ],
      +        "account_auths": [],
      +        "weight_threshold": 1
      +    },
      +    "memo_key": new_public_keys["memo"]
      +}
      +
      +print("New data:")
      +print(new_data)
      +
      + +

      5. Commit changes to blockchain

      + +

      The operations.AccountUpdate(**new_data) creates the operation that will be committed to the blockchain using the new json object we have created.

      + +

      Once we commit the changes to the blockchain using client.commit.finalizeOp the changes are committed and the password is updated.

      + +
      op = operations.AccountUpdate(**new_data)
      +
      +result = client.commit.finalizeOp(op, account, "owner")
      +print("Result:")
      +print(result)
      +
      + +

      If you update your password and attempt to update it again to quickly you will receive the following error.

      + +
      Assert Exception:_db.head_block_time() - account_auth.last_owner_update > STEEM_OWNER_UPDATE_LIMIT: Owner authority can only be updated once an hour.
      +
      + +

      You will need to wait at least an hour before attempting this again.

      + +

      That’s it!

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/33_password_key_change
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/power_down.html b/docs/tutorials-python/power_down.html new file mode 100644 index 0000000000000000000000000000000000000000..f8e55310ac54bdb66597f1617fada11c6f2631da --- /dev/null +++ b/docs/tutorials-python/power_down.html @@ -0,0 +1,476 @@ + + + + + + + + + + + + + + + + + + +PY: Power Down | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Power Down + + +

      + +

      How to power down (withdraw) your vesting shares using Python.

      +
      + + +

      Full, runnable src of Power Down can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we will explain and show you how to power down some or all of your available vesting shares (STEEM POWER) on the Steem blockchain using the commit class found within the steem-python library.

      + +

      Intro

      + +

      The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the withdraw_vesting method found within the commit class in the library. When you power down, the converted VESTS (STEEM POWER) will not be available as STEEM immediately. It is converted in 13 equal parts and transferred into your STEEM wallet weekly, the first portion only being available a week after the power down was initiated. Before we do the conversion, we check the current balance of the account to check how much STEEM POWER is available. This is not strictly necessary as the process will automatically abort with the corresponding error, but it does give some insight into the process as a whole. We use the get_account function to check for this. The withdraw_vesting method has 2 parameters:

      + +
        +
      1. amount - The amount of VESTS that will be withdrawn. This must be of the float data type
      2. +
      3. account - The specified user account for the transfer
      4. +
      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to testnet
      2. +
      3. User information and steem node - Input user information and connection to Steem node
      4. +
      5. Check balance - Check current vesting balance of user account
      6. +
      7. Conversion amount and commit - Input of VESTS amount to convert and commit to blockchain
      8. +
      + +

      1. App setup

      + +

      In this tutorial we use 2 packages:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • pick - helps select the query type interactively
      • +
      + +

      We import the libraries and connect to the testnet.

      + +
      import steembase
      +import steem
      +from pick import pick
      +from steem.amount import Amount
      +
      +steembase.chains.known_chains['STEEM'] = {
      +    'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
      +    'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
      +}
      +
      + +

      Because this tutorial alters the blockchain we connect to the testnet so we don’t create spam on the production server.

      + +

      2. User information and steem node

      + +

      We require the private active key of the user in order for the conversion to be committed to the blockchain. This is why we have to specify this alongside the testnet node. The values are supplied via the terminal/console before we initialise the steem class. There is a demo account available to use with this tutorial but any account that is set up on the testnet can be used.

      + +
      #capture user information
      +username = input('Enter username: ') #demo account: cdemo
      +wif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3
      +
      +#connect node and private active key
      +client = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])
      +
      + +

      3. Check balance

      + +

      In order to give the user enough information to make the conversion we check the current balance of the account using the get_account function.

      + +
      #get account balance for vesting shares
      +userinfo = client.get_account(username)
      +delegated_vests = userinfo['delegated_vesting_shares']
      +vesting_shares = userinfo['vesting_shares']
      +to_withdraw = float(userinfo['to_withdraw'])
      +withdrawn = float(userinfo['withdrawn'])
      +
      +available_vests = (Amount(vesting_shares).amount - Amount(delegated_vests).amount - 
      +     ((to_withdraw - withdrawn)/1000000))
      +
      +print('VESTS currently powering down: ' + str(to_withdraw/1000000) + ' VESTS' +
      +    '\n' + 'Available VESTS: ' + str(available_vests) + ' VESTS')
      +
      +input('\n' + 'Press enter to continue' + '\n')
      +
      + +

      The available vesting shares to withdraw is not directly available from the user information and needs to be calculated. In order to find the total VESTS available to power down we need to know how much is currently in power down, how much has been delegated and then the total amount of vesting shares. The values are assigned from the query directly as float type to make the calculations a little simpler. The results of the query and calculation are converted to string type and displayed in the console/terminal.

      + +

      4. Conversion amount and commit

      + +

      The user is given the option to withdraw all available vesting shares, a portion of the shares or to cancel the transaction completely.

      + +
      #choice of transfer
      +title = 'Please choose an option: '
      +options = ['Power down ALL', 'Power down PORTION', 'Cancel Transaction']
      +option, index = pick(options, title)
      +
      + +

      Based on the input from the user the amount variable can be assigned and the transaction committed to the blockchain. The amount must be between zero and the total amount of vesting shares (both pending conversion and available VESTS combined). The amount you set to be withdrawn will override the current amount of vesting shares pending withdrawal. If for example the user enters a new amount of ‘0’ shares to be withdrawn, it will cancel the current withdrawal completely.

      + +
      #parameters: amount, account
      +if (option == 'Cancel Transaction') :
      +    print('transaction cancelled')
      +    exit()
      +else :
      +    if (option == 'Power down ALL') :
      +        if (available_vests == 0) :
      +            print('No change to withdraw amount')
      +        else :
      +            amount = to_withdraw/1000000 + available_vests
      +            client.withdraw_vesting(amount, username)
      +            print(str(amount) + ' VESTS now powering down')
      +    else :
      +        amount = float(input('Please enter the amount of VESTS you would like to power down: '))
      +        if (amount < (to_withdraw/1000000 + available_vests)) :
      +            client.withdraw_vesting(amount, username)
      +            print(str(amount) + ' VESTS now powering down')
      +        else :
      +            if (amount == to_withdraw/1000000) :
      +                print('No change to withdraw amount')
      +            else :
      +                print('insufficient funds available')
      +
      + +

      The result is displayed on the console/terminal.

      + +

      We encourage users to play around with different values and data types to fully understand how this process works. You can also check the balances and transaction history on the testnet portal.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/25_power_down
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/power_up_steem.html b/docs/tutorials-python/power_up_steem.html new file mode 100644 index 0000000000000000000000000000000000000000..4e63705e05671920ca6f6b5e09589e2dbf2afa86 --- /dev/null +++ b/docs/tutorials-python/power_up_steem.html @@ -0,0 +1,488 @@ + + + + + + + + + + + + + + + + + + +PY: Power Up Steem | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Power Up Steem + + +

      + +

      How to power up your STEEM to STEEM POWER using Python.

      +
      + + +

      Full, runnable src of Power Up Steem can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we show you how to check the STEEM balance of an account on the Steem blockchain and how to power up your STEEM into STEEM POWER using the commit class found within the steem-python library.

      + +

      Intro

      + +

      The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the transfer_to_vesting method found within the commit class in the library. When you power up you convert your STEEM into STEEM POWER to increase your influence on Steemit. Before we do the conversion, we use the get_account function to check the current STEEM balance of the account to see what is available to power up. This is not strictly necessary but adds to the useability of the process. The transfer_to_vesting method has 3 parameters:

      + +
        +
      1. amount - The amount of STEEM to power up. This must be of the float data type
      2. +
      3. to - The account to where the STEEM will be powered up
      4. +
      5. account - The source user account for the transfer
      6. +
      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to testnet
      2. +
      3. User information and steem node - Input user information and connection to Steem node
      4. +
      5. Check balance - Check current vesting balance of user account
      6. +
      7. Conversion amount - Input power up amount and check valid transfer
      8. +
      9. Commit to blockchain - Commit transaction to blockchain
      10. +
      + +

      1. App setup

      + +

      In this tutorial we use 2 packages:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • pick - helps select the query type interactively
      • +
      + +

      We import the libraries and connect to the testnet.

      + +
      import steembase
      +import steem
      +from steem.amount import Amount
      +from pick import pick
      +
      +steembase.chains.known_chains['STEEM'] = {
      +    'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
      +    'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
      +}
      +
      + +

      Because this tutorial alters the blockchain we connect to a testnet so we don’t create spam on the production server.

      + +

      2. User information and steem node

      + +

      We require the private active key of the user in order for the conversion to be committed to the blockchain. This is why we are using a testnet. The values are supplied via the terminal/console before we initialise the steem class. There are some demo accounts available but we encourage you to create your own accounts on this testnet and create balances you can claim; it’s good practice.

      + +
      #capture user information
      +username = input('Enter username: ') #demo account: cdemo
      +wif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3
      +
      +#connect node and private active key
      +client = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])
      +
      + +

      3. Check balance

      + +

      In order to give the user enough information to make the conversion we check the current balance of the account using the get_account function.

      + +
      #check valid user and get account balance
      +userinfo = client.get_account(username)
      +if(userinfo is None) :
      +    print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!')
      +    exit()
      +balance = userinfo['balance']
      +
      +print('Available STEEM balance: ' + balance + '\n')
      +
      +input('Press any key to continue')
      +
      + +

      The results of the query are displayed in the console/terminal.

      + +

      4. Conversion amount

      + +

      Both the amount and the to parameters are assigned via input from the terminal/console. The user is given the option to power up the STEEM to their own account or to another user’s account. The amount has to be greater than zero and no more than the total available STEEM of the user. If you are using one of Steemit’s demo accounts, please leave some STEEM for others to power up! We also check the to account to make sure it’s a valid account name.

      + +
      #choice of account
      +title = 'Please choose an option for an account to transfer to: '
      +options = ['SELF', 'OTHER']
      +option, index = pick(options, title)
      +
      +if (option == 'OTHER') :
      +    #account to power up to
      +    to_account = input('Please enter the ACCOUNT to where the STEEM will be transferred: ')
      +    #check valid username
      +    result = client.get_account(to_account)
      +    if (not result) :
      +        print(to_account + ' doesn\'t exist on this chain!')
      +        exit()
      +else :
      +    print('\n' + 'Power up STEEM to own account' + '\n')
      +    to_account = username
      +
      +#amount to power up
      +amount = float(input('Please enter the amount of STEEM to power up: '))
      +
      + +

      5. Commit to blockchain

      + +

      Now that all the parameters have been assigned we can continue with the actual transmission to the blockchain. The output and commit is based on the validity of the amount that has been input.

      + +
      #parameters: amount, to, account
      +if (amount == 0) :
      +    print('\n' + 'No STEEM entered for powering up')
      +    exit()
      +else :
      +    if (amount > Amount(balance).amount) :
      +        print('\n' + 'Insufficient funds available')
      +        exit()
      +    else :
      +        client.transfer_to_vesting(amount, to_account, username)
      +        print('\n' + str(amount) + ' STEEM has been powered up successfully')
      +
      + +

      The result of the power up transfer is displayed on the console/terminal.

      + +

      As an added check we also display the new STEEM balance of the user on the terminal/console

      + +
      #get new account balance
      +userinfo = client.get_account(username)
      +balance = userinfo['balance']
      +print('New STEEM balance: ' + balance)
      +
      + +

      We encourage users to play around with different values and data types to fully understand how this process works. You can also check the balances and transaction history on the testnet portal.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/24_power_up_steem
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/reblogging_post.html b/docs/tutorials-python/reblogging_post.html new file mode 100644 index 0000000000000000000000000000000000000000..4879a14d4f5ab38d02a98c816df56af53fab0bf7 --- /dev/null +++ b/docs/tutorials-python/reblogging_post.html @@ -0,0 +1,428 @@ + + + + + + + + + + + + + + + + + + +PY: Reblogging Post | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Reblogging Post + + +

      + +

      We will show how to reblog or resteem post using Python, with username and posting private key.

      +
      + + +

      Full, runnable src of Reblogging Post can be downloaded as part of the PY tutorials repository. +

      + +

      Tutorial will also explain and show you how to sign/broadcast transaction on Steem blockchain using the steem-python library.

      + +

      Intro

      + +

      Steem python library has built-in function to commit transaction and broadcast it to the network.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import
      2. +
      3. Post list - List of posts to select from trending filter
      4. +
      5. Enter user credentials - Enter user credentails to sign transaction
      6. +
      + +

      1. App setup

      + +

      In this tutorial we use 3 packages, pick - helps us to select filter interactively. steem - steem-python library, interaction with Blockchain. pprint - print results in better format.

      + +

      First we import all three library and initialize Steem class

      + +
          import pprint
      +    from pick import pick
      +    # initialize Steem class
      +    from steem import Steem
      +
      +    s = Steem()
      +
      + +

      2. Post list

      + +

      Next we will fetch and make list of accounts and setup pick properly.

      + +
          query = {
      +      "limit":5, #number of posts
      +      "tag":"" #tag of posts
      +    }
      +    # post list from trending post list
      +    posts = s.get_discussions_by_trending(query)
      +
      +    title = 'Please choose post to reblog: '
      +    options = []
      +    # post list
      +    for post in posts:
      +      options.append('@'+post["author"]+'/'+post["permlink"])
      +
      +
      + +

      This will show us list of posts to select in terminal/command prompt. And after selection we will get formatted post as an option variable.

      + +

      3. Enter user credentials

      + +

      Next in order to sign transaction, application asks for username and posting private key to sign transaction and broadcast it.

      + +
        # get index and selected post
      +  option, index = pick(options, title)
      +  pprint.pprint("You selected: "+option)
      +
      +  account = input("Enter your username? ")
      +  wif = input("Enter your Posting private key? ")
      +
      +  # commit or build transaction
      +  c = Commit(steem=Steem(keys=[wif]))
      +
      +  # broadcast transaction
      +  c.resteem(option, account=account)
      +
      +
      + +

      That’s it, if transaction is successful you shouldn’t see any error messages, otherwise you will be notified.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/14_reblogging_post
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see output in terminal/command prompt screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/search_accounts.html b/docs/tutorials-python/search_accounts.html new file mode 100644 index 0000000000000000000000000000000000000000..edca9426bb4306c384fa66d7d662e582d31f3542 --- /dev/null +++ b/docs/tutorials-python/search_accounts.html @@ -0,0 +1,440 @@ + + + + + + + + + + + + + + + + + + +PY: Search Accounts | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Search Accounts + + +

      + +

      How to pull a list of the active user accounts or trending tags from the blockchain using Python.

      +
      + + +

      Full, runnable src of Search Accounts can be downloaded as part of the PY tutorials repository. +

      + +

      This tutorial will explain and show you how to access the Steem blockchain using the steem-python library to fetch a list of active authors or trending tags, starting the search from a specified value, and displaying the results on the console.

      + +

      Intro

      + +

      We are using the lookup_accounts and get_trending_tags functions that are built-in in the official library steem-python. These functions allow us to query the Steem blockchain in order to retrieve either a list of active authors or a list of trending tags. The option is available to either get a complete list starting from the first value on the blockchain or starting the list from any other closest match string value as provided by the user. Both of these functions have only two parameters:

      + +
        +
      1. account/aftertag - The string value from where to start the search. If this value is left empty the search will start from the first value available
      2. +
      3. limit - The maximum number of names/tags that the query retrieves
      4. +
      + +

      Steps

      + +
        +
      1. App setup - Library import and Steem class initialisation
      2. +
      3. List selection - Selection of the type of list
      4. +
      5. Get and display account names - Get a list of account names from the blockchain
      6. +
      7. Get and display trending tags - Get a list of trending tags from the blockchain
      8. +
      + +

      1. App setup

      + +

      In this tutorial we use 2 packages, pick - helps us to select the query type interactively. steem - steem-python library for interaction with the Blockchain.

      + +

      First we import both libraries and initialize Steem class

      + +
      from steem import Steem
      +from pick import pick
      +
      +
      +s = Steem()
      +
      + +

      2. List selection

      + +

      The user is given the option of which list to create, active accounts or trending tags. We create this option list and setup pick.

      + +
      #choose list type
      +title = 'Please select type of list:'
      +options = ['Active Account names', 'Trending tags']
      +
      +#get index and selected list name
      +option, index = pick(options, title)
      +
      + +

      This will show the two options as a list to select in terminal/command prompt. From there we can determine which function to execute.

      + +

      3. Get and display account names

      + +

      Once the user selects the required list, a simple if statement is used to execute the relevant function. Based on the selection we then run the query. The parameters for the lookup_accounts function is captured in the if statement via the terminal/console.

      + +
      if option=='Active Account names' :
      +	#capture starting account
      +	account = input("Enter account name to start search from: ")
      +	#input list limit
      +	limit = input("Enter max number of accounts to display: ")
      +	lists = s.lookup_accounts(account, limit)
      +	print('\n' + "List of " + option + '\n')
      +	print(*lists, sep='\n')
      +
      + +

      Once the list is generated it is displayed on the UI with line separators along with a heading of what list it is.

      + + + +

      The query for a list of trending tags is executed in the second part of the if statement. Again, the parameters for the query is captured via the terminal/console.

      + +
      else :
      +	#capture starting tag
      +	aftertag = input("Enter tag name to start search from: ")
      +	#capture list limit
      +	limit = input("Enter max number of tags to display: ")
      +	lists = s.get_trending_tags(aftertag, limit)
      +	print('\n' + "List of " + option + '\n')
      +	for names in lists :
      +		print(names["name"])
      +
      + +

      The query returns an array of objects. We use the for loop to build a list of only the tag names from that array and then display the list on the UI with line separators. This creates an easy to read list of tags.

      + +

      That’s it!.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/15_search_accounts
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see output in terminal/command prompt screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/search_tags.html b/docs/tutorials-python/search_tags.html new file mode 100644 index 0000000000000000000000000000000000000000..be7f21c5062646f72d4b26d0623e19f53ae856e2 --- /dev/null +++ b/docs/tutorials-python/search_tags.html @@ -0,0 +1,349 @@ + + + + + + + + + + + + + + + + + + +PY: Search Tags | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Search Tags + + +

      + +

      How to pull a list of the trending tags from the blockchain using Python.

      +
      + + +

      Full, runnable src of Search Tags can be downloaded as part of the PY tutorials repository. +

      + +

      Please refer to 15_search_accounts which includes a tutorial for trending tags as well.

      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/stream_blockchain_transactions.html b/docs/tutorials-python/stream_blockchain_transactions.html new file mode 100644 index 0000000000000000000000000000000000000000..1c81016cec14f937c0e9af395a542bfa9e856cf8 --- /dev/null +++ b/docs/tutorials-python/stream_blockchain_transactions.html @@ -0,0 +1,414 @@ + + + + + + + + + + + + + + + + + + +PY: Stream Blockchain Transactions | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Stream Blockchain Transactions + + +

      + +

      How to stream transactions on the live Steem blockchain

      +
      + + +

      Full, runnable src of Stream Blockchain Transactions can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we show you how to stream transactions on the Steem blockchain using the blockchain class found within the steem-python library.

      + +

      Intro

      + +

      Tutorial is demonstrating the typical process of streaming blocks on Steem. We will show some information from each block that is being streamed to give you an idea. Each block contains transactions objects as well but we will not show each of this data in user interface.

      + +

      We are using the blockchain.stream() function provided by steem-python which returns each block after it has been accepted by witnesses. By default it follows irreversible blocks which was accepted by all witnesses.

      + +

      Steps

      + +
        +
      1. App setup Configure imports and initialization of libraries
      2. +
      3. Stream blocks Stream blocks
      4. +
      5. Sample result Stream blocks
      6. +
      + +

      1. App setup

      + +

      In this tutorial we use 1 package:

      + +

      steem - steem-python library and interaction with Blockchain

      + +
      from steem.blockain import Blockchain
      +
      +blockchain = Blockchain()
      +
      + +

      Above we create an instance of Blockchain which will give us the ability to stream the live transactions from the blockchain.

      + +

      2. Stream blocks

      + +

      Next we create an instance of stream and then loop through the steam as transactions are available and print them to the screen.

      + +
      stream = blockchain.stream()
      +
      +for post in stream:
      +	print(post)
      +
      + +

      3. Sample result

      + +
      {
      +  "curator": "idx",
      +  "reward": "4.042446 VESTS",
      +  "comment_author": "blackbunny",
      +  "comment_permlink": "6tfv5e",
      +  "_id": "5801d1c99ca7ecd1d4387ebd89d4edab08612b35",
      +  "type": "curation_reward",
      +  "timestamp": "2018-09-21T21:11:02.005Z",
      +  "block_num": 26136919,
      +  "trx_id": "0000000000000000000000000000000000000000"
      +}
      +
      + +

      That’s it!

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/13_stream_blockchain_transactions
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/submit_comment_reply.html b/docs/tutorials-python/submit_comment_reply.html new file mode 100644 index 0000000000000000000000000000000000000000..ecc323de743e0ce9f90b7b0740246f79e60eb657 --- /dev/null +++ b/docs/tutorials-python/submit_comment_reply.html @@ -0,0 +1,462 @@ + + + + + + + + + + + + + + + + + + +PY: Submit Comment Reply | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Submit Comment Reply + + +

      + +

      How to submit a comment on a post to the Steem blockchain.

      +
      + + +

      Full, runnable src of Submit Comment Reply can be downloaded as part of the PY tutorials repository. +

      + +

      This tutorial will explain and show you how to submit a new comment to the Steem blockchain using the commit class found within the steem-python library.

      + +

      Intro

      + +

      The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the post method found within the commit class in the the library. It should be noted that comments and post are both treated as a commit.post operation with the only difference being that a comment/reply has an additional parameter containing the parent post/comment. There are 11 parameters within the post method:

      + +
        +
      1. title - The title of the post. This is a required parameter but comments don’t have a title so the parameter is assigned an empty string value
      2. +
      3. body - The body of the post
      4. +
      5. author - The account that you are posting from
      6. +
      7. permlink - A unique adentifier for the
      8. +
      9. tags - Between 1 and 5 key words that defines the post
      10. +
      11. reply_idendifier - Identifier of the parent post(used for comments)
      12. +
      13. json_metadata - JSON meta objec that can be attached to the post
      14. +
      15. comment_options - JSON options object that can be attached to the post to specify additional options like ‘max_payouts’, ‘allow_votes’, etc.
      16. +
      17. community - Name of the community you are posting into
      18. +
      19. beneficiaries - A list of beneficiaries for posting reward distribution.
      20. +
      21. self_vote - Upvote the post as author right after posting
      22. +
      + +

      We will only be using the parameters titel, body, author, permlink and reply_identifier as they are all that is required for a basic comment operation. If you want to explore the other parameters further you can find more information HERE.

      + +

      A comment made on a post is defined as a root comment. You can also comment on someone elses (or your own) comment, in which case the parent parameters would be that of the comment, and not the original post.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to Steem node
      2. +
      3. Variable input and format - Input and creation of varialbes
      4. +
      5. Initialize steem class - Initialize the steem class with the relevant node and private key
      6. +
      7. Post submission and result - Committing of transaction to the blockchain
      8. +
      + +

      1. App setup

      + +

      In this tutorial we use 4 packages:

      + +
        +
      • random and string - used to create a random string used for the permlink
      • +
      • steem - steem-python library and interaction with Blockchain
      • +
      • steembase - used to connect to the testnet
      • +
      + +

      We import the libraries and connect to the testnet.

      + +
      import random
      +import string
      +import steembase
      +import steem
      +
      +steembase.chains.known_chains['STEEM'] = {
      +    'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
      +    'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
      +}
      +
      + +

      Because this tutorial alters the blockchain we have to connect to the testnet. There is a demo account available for use, cdemo with private posting key 5JEZ1EiUjFKfsKP32b15Y7jybjvHQPhnvCYZ9BW62H1LDUnMvHz. You can also create your own demo account by following the instructions on the TESTNET site.

      + +

      2. Variable input and format

      + +

      The variables are captured via a simple string input and allocated as seen below. The wif variable is the private posting key of the user making the comment. This key is required to commit the post to the blockchain.

      + +
      #capture variables
      +parentAuthor = input('Parent author: ')
      +parentPermlink = input('Parent permlink: ')
      +author = input('Username: ')
      +wif = input('Private posting key: ')
      +body = input('Comment Body: ')
      +
      + +

      We join the two parent values and assign it to the reply_identifier parameter. We also use a random generator to create a new permlink for the post being created

      + +
      #combining parent values to create reply identifier
      +reply_identifier = '/'.join([parentAuthor,parentPermlink])
      +
      +#random generator to create post permlink
      +permlink = ''.join(random.choices(string.digits, k=10))
      +
      + +

      The random generator is limited to 10 characters in this case but the permlink can be up to 256 bytes. If the permlink value is left empty then it auto creates a permlink based on the title of the post. The permlink is unique to the author only which means that multiple authors can have the same title for thier post.

      + +

      3. Initialize steem class

      + +

      We initialize the steem class by connecting to the specific testnet node. We also require the private posting key of the contributing author in order to commit the post which is also specified during this operation.

      + +
      #connect node and private posting key
      +client = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])
      +
      + +

      4. Post submission and result

      + +

      The last step is to transmit the post through to the blockchain. This is done with the post method within the commit class. All the defined parameters are submitted with the function. As stated earlier in the tutorial, there are quite a few parameters for this function but for a basic comment these 5 are all that’s required.

      + +
      #commit post to blockchain
      +client.commit.post(title='', body=body, author=author, permlink=permlink, reply_identifier=reply_identifier)
      +
      +print("Comment created successfully")
      +print(permlink)
      +
      + +

      A simple confirmation is printed on the screen if the comment is committed successfully. We also print the permlink for the comment on screen. This is purely for convenience to make it easier to retrieve the permlink if a new author or the same author would like to another comment on the one just made.

      + +

      You can also check on the testportal for the comment or for a post to comment on. Alternatively you can create your own post to comment on following the 10_submit_post tutorial.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/11_submit_comment_reply
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/submit_post.html b/docs/tutorials-python/submit_post.html new file mode 100644 index 0000000000000000000000000000000000000000..b01b0b4718427a80b503fa4cdb2f7c70a09fde56 --- /dev/null +++ b/docs/tutorials-python/submit_post.html @@ -0,0 +1,457 @@ + + + + + + + + + + + + + + + + + + +PY: Submit Post | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Submit Post + + +

      + +

      How to submit post on Steem blockchain using Python.

      +
      + + +

      Full, runnable src of Submit Post can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial will explain and show you how to submit a new post to the Steem blockchain using the commit class found within the steem-python library.

      + +

      Intro

      + +

      The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the post method found within the commit class in the the library. It should be noted that comments and new post are both treated as commit.post operation with the only difference being that a comment/reply has got an additional parameter containing the parent post/comment. There are 11 parameters within the post method:

      + +
        +
      1. title - The title of the post
      2. +
      3. body - The body of the post
      4. +
      5. author - The account that you are posting from
      6. +
      7. permlink - A unique adentifier for the
      8. +
      9. tags - Between 1 and 5 key words that defines the post
      10. +
      11. reply_idendifier - Identifier of the parent post(used for comments)
      12. +
      13. json_metadata - JSON meta objec that can be attached to the post
      14. +
      15. comment_options - JSON options object that can be attached to the post to specify additional options like ‘max_payouts’, ‘allow_votes’, etc.
      16. +
      17. community - Name of the community you are posting into
      18. +
      19. beneficiaries - A list of beneficiaries for posting reward distribution.
      20. +
      21. self_vote - Upvote the post as author right after posting
      22. +
      + +

      We will only be using the first 5 parameters as these are the only ones required to create a basic post. If you want to explore the other parameters further you can find more information HERE.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to Steem node
      2. +
      3. Variable input and format - Input and creation of varialbes
      4. +
      5. Post submission and result - Committing of transaction to the blockchain
      6. +
      + +

      1. App setup

      + +

      In this tutorial we use 4 packages:

      + +
        +
      • random and string - used to create a random string used for the permlink
      • +
      • steem - steem-python library and interaction with Blockchain
      • +
      • steembase - used to connect to the testnet
      • +
      + +

      We import the libraries, connect to the testnet and initialize the Steem class.

      + +
      import random
      +import string
      +import steembase
      +import steem
      +
      +steembase.chains.known_chains['STEEM'] = {
      +    'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
      +    'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
      +}
      +
      +#connect node and private posting key
      +client = steem.Steem(nodes=['https://testnet.steem.vc'], keys=['5JEZ1EiUjFKfsKP32b15Y7jybjvHQPhnvCYZ9BW62H1LDUnMvHz'])
      +
      + +

      Because this tutorial alters the blockchain we have to connect to the testnet. We also require the private posting key of the contributing author in order to commit the post which is why it is specified along with the testnet node. We have supplied a test account, cdemo to use with this tutorial.

      + +

      2. Variable input and format

      + +

      The first three variables are captured via a simple string input while the tags variable is captured in the form of an array.

      + +
      #capture variables
      +author = input('Username: ')
      +title = input('Post Title: ')
      +body = input('Post Body: ')
      +
      +#capture list of tags and separate by " "
      +taglimit = 2 #number of tags 1 - 5
      +taglist = []
      +for i in range(1, taglimit+1):
      +	print(i)
      +	tag = input(' Tag : ')
      +	taglist.append(tag)
      +
      + +

      The tags parameter needs to be in the form of a single string with the words split by an empty space, so we add a line to prepare that variable. We also use a random generator to create a new permlink for the post being created

      + +
      " ".join(taglist) #create string joined with empty spaces
      +
      +#random generator to create post permlink
      +permlink = ''.join(random.choices(string.digits, k=10))
      +
      + +

      The random generator is limited to 10 characters in this case but the permlink can be up to 256 bytes. If the permlink value is left empty then it auto creates a permlink based on the title of the post. The permlink is unique to the author only which means that multiple authors can have the same title for the thier post.

      + +

      3. Post submission and result

      + +

      The last step is to transmit the post through to the blockchain. This is done post method within the commit class. All the defined parameters are submitted with the function. As stated earlier in the tutorial, there are quite a few parameters for this function but for a basic post these 5 are the most important.

      + +
      client.commit.post(title=title, body=body, author=author, tags=taglist, permlink=permlink)
      +
      +print("Post created successfully")
      +
      + +

      A simple confirmation is printed on the screen if the post is committed successfully.

      + +

      You can also check on the testportal for the post.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/10_submit_post
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/transfer_steem_and_sbd.html b/docs/tutorials-python/transfer_steem_and_sbd.html new file mode 100644 index 0000000000000000000000000000000000000000..fe169ba265bdecb10575d0844c91ae8f8cab6438 --- /dev/null +++ b/docs/tutorials-python/transfer_steem_and_sbd.html @@ -0,0 +1,498 @@ + + + + + + + + + + + + + + + + + + +PY: Transfer Steem And Sbd | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Transfer Steem And Sbd + + +

      + +

      How to transfer STEEM and SBD to another account using Python.

      +
      + + +

      Full, runnable src of Transfer Steem And Sbd can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we will explain and show you how to to check the STEEM and SBD balance of an account and also how to transfer a portion of that to another user on the Steem blockchain using the commit class found within the steem-python library.

      + +

      Intro

      + +

      The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the transfer method found within the commit class in the library. Before we do the transfer, we check the current balance of the account to ensure that there are sufficient funds available. We also check if the intended recipient of the transfer is a valid user account. This is not strictly necessary as the process will automatically abort with the corresponding error, but it does give some insight into the process as a whole. We use the get_account function to check for this. The transfer method has 5 parameters:

      + +
        +
      1. to - The intended recipient of the funds transfer
      2. +
      3. amount - The amount of STEEM or SBD that the user wants to transfer. This parameter has to be of the float data type and is rounded up to 3 decimal spaces
      4. +
      5. asset - A string value specifying whether STEEM or SBD is being transferred
      6. +
      7. memo - An optional text field containing comments on the transfer. This value may begin with ‘#’ for encrypted messaging
      8. +
      9. account - The account that the funds are being transferred from
      10. +
      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to testnet
      2. +
      3. User information and steem node - Input user information and connection to Steem node
      4. +
      5. Check balance - Check current STEEM and SBD balance of user account
      6. +
      7. Recipient input - Check for valid recipient account name
      8. +
      9. Transfer type and amount - Input of transfer type and the amount to transfer
      10. +
      11. Transfer commit - Commit of transfer to blockchain
      12. +
      + +

      1. App setup

      + +

      In this tutorial we use 2 packages:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • pick - helps select the query type interactively
      • +
      + +

      We import the libraries and connect to the testnet.

      + +
      import steembase
      +import steem
      +from pick import pick
      +
      +steembase.chains.known_chains['STEEM'] = {
      +    'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
      +    'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
      +}
      +
      + +

      Because this tutorial alters the blockchain we connect to the testnet so we don’t create spam on the production server.

      + +

      2. User information and steem node

      + +

      We require the private active key of the user in order for the transfer to be committed to the blockchain. This is why we have to specify this alongside the testnet node. The values are supplied via the terminal/console before we initialise the steem class. There is a demo account available to use with this tutorial but any account that is set up on the testnet can be used.

      + +
      #capture user information
      +username = input('Enter username: ') #demo account: cdemo
      +wif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3
      +
      +#connect node and private active key
      +client = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])
      +
      + +

      3. Check balance

      + +

      In order to give the user enough information to make the transfer we check the current balance of the account using the get_account function.

      + +
      #get account balance for STEEM and SBD
      +userinfo = client.get_account(username)
      +total_steem = userinfo['balance']
      +total_sbd = userinfo['sbd_balance']
      +
      +print('CURRENT ACCOUNT BALANCE:' + '\n' + total_steem + '\n' + total_sbd + '\n')
      +
      + +

      The result of the query is displayed in the console/terminal.

      + +

      4. Recipient input

      + +

      The recipient account is input via the console/terminal and then a check is done whether that username does in fact exist.

      + +
      #get recipient name
      +recipient = input('Enter the user you wish to transfer funds to: ')
      +
      +#check for valid recipient name
      +result = client.get_account(recipient)
      +
      + +

      The query will return a null value if the account does not match to anything on the blockchain. This result is then used to determine the next step.

      + +

      5. Transfer type and amount

      + +

      If the query in the previous step returns a valid result the user is then given a choice of transfer types or to cancel the operation completely. If the username is not found the process aborts.

      + +
      if result:
      +    #choice of transfer
      +    title = 'Please choose transfer type: '
      +    options = ['STEEM', 'SBD', 'Cancel Transfer']
      +    # get index and selected transfer type
      +    option, index = pick(options, title)
      +else:
      +    print('Invalid recipient for funds transfer')
      +    exit()
      +
      + +

      Once the user chooses the type of transfer we proceed to assign the amount as well as the asset parameter.

      + +
      if option == 'Cancel Transfer':
      +    print('Transaction cancelled')
      +    exit()
      +else:
      +    if option == 'STEEM':
      +        #get STEEM transfer amount
      +        amount = input('Enter amount of STEEM to transfer to ' + recipient + ': ')
      +        asset = 'STEEM'
      +    else:
      +        #get SBD transfer amount
      +        amount = input('Enter amount of SBD to transfer to ' + recipient + ': ')
      +        asset = 'SBD'
      +
      + +

      6. Transfer commit

      + +

      Once all the parameters have been assigned we can proceed with the actual commit to the blockchain.

      + +
      #parameters: to, amount, asset, memo='', account
      +client.transfer(recipient, float(amount), asset, '', username)
      +print('\n' + amount + ' ' + asset + ' has been transferred to ' + recipient)
      +
      + +

      The memo parameter can be left empty as in the above example. A simple confirmation is printed on the UI. +As an added confirmation we check the balance of the user again and display it on the UI. This is not required at all but it serves as a more definitive confirmation that the transfer has been completed correctly.

      + +
      #get remaining account balance for STEEM and SBD
      +userinfo = client.get_account(username)
      +total_steem = userinfo['balance']
      +total_sbd = userinfo['sbd_balance']
      +
      +print('\n' + 'REMAINING ACCOUNT BALANCE:' + '\n' + total_steem + '\n' + total_sbd + '\n')
      +
      + +

      We encourage users to play around with different values and data types to fully understand how this process works. You can also check the balances and transaction history on the testnet portal.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/21_transfer_steem_and_sbd
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/transfer_steem_and_sbd_to_savings_balance.html b/docs/tutorials-python/transfer_steem_and_sbd_to_savings_balance.html new file mode 100644 index 0000000000000000000000000000000000000000..8612dba09f6b1226651ca576db81e0e95f3e6a8f --- /dev/null +++ b/docs/tutorials-python/transfer_steem_and_sbd_to_savings_balance.html @@ -0,0 +1,521 @@ + + + + + + + + + + + + + + + + + + +PY: Transfer Steem And Sbd To Savings Balance | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Transfer Steem And Sbd To Savings Balance + + +

      + +

      How to transfer STEEM and SBD to savings using Python.

      +
      + + +

      Full, runnable src of Transfer Steem And Sbd To Savings Balance can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we show you how to check the STEEM and SBD balance of an account on the Steem blockchain and also how to transfer a portion or all of that to a “savings” account using the commit class found within the steem-python library.

      + +

      It should be noted that when funds are being withdrawn from the savings account it takes 3 days for those funds to reflect in the available STEEM/SBD balance. The withdrawal can be cancelled at any point during this waiting period. This measure was put in place to reduce the risk of funds being stolen when accounts are hacked as it gives sufficient time to recover your account before your funds are transferred out. Storing your funds in your savings account is thus more secure than having them as available balances.

      + +

      Steemconnect offers an alternative to transferring STEEM and SBD with a “simple link” solution. Instead of running through a list of operations on your account, you can simply use a link similar to the one below substituting the four parameters with your own details. You will be prompted to enter your username and password before the transaction will be executed. +https://steemconnect.com/sign/transfer-to-savings?from=username&to=username&amount=0.000%20STEEM&memo=text +This is similar to the steemconnect links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://v2.steemconnect.com/sign. There is also a steemconnect link for withdrawing funds.

      + +

      Intro

      + +

      The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the transfer_to_savings and transfer_from_savings methods found within the commit class in the library. Before we do the transfer, we use the get_account function to check the current STEEM and SBD balance of the account to see what funds are available to transfer or withdraw. This is not strictly necessary but adds to the useability of the process. The transfer_to_savings method has 5 parameters:

      + +
        +
      1. amount - The amount of STEEM or SBD that the user wants to transfer. This parameter has to be of the float data type and is rounded up to 3 decimal spaces
      2. +
      3. asset - A string value specifying whether STEEM or SBD is being transferred
      4. +
      5. memo - An optional text field containing comments on the transfer
      6. +
      7. to - The recipient savings account name. Funds can be transferred to any other users’ savings balance
      8. +
      9. account - The source account for the transfer
      10. +
      + +

      and transfer_from_savings has 6 parameters:

      + +
        +
      1. amount - The amount of STEEM or SBD that the user wants to withdraw. This parameter has to be of the float data type and is rounded up to 3 decimal spaces
      2. +
      3. asset - A string value specifying whether STEEM or SBD is being withdrawn
      4. +
      5. memo - An optional text field containing comments on the withdrawal
      6. +
      7. request id - Integer identifier for tracking the withdrawal. This needs to be a unique number for a specified user
      8. +
      9. to - The recipient account name. Funds can be withdrawn to any other users’ available balance
      10. +
      11. account - The source account for the transfer
      12. +
      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to testnet
      2. +
      3. User information and steem node - Input user information and connection to Steem node
      4. +
      5. Check balance - Check current STEEM and SBD balance of user account
      6. +
      7. Transfer type and amount - Input of transfer type and the amount to transfer
      8. +
      9. Transfer commit - Commit of transfer to blockchain
      10. +
      + +

      1. App setup

      + +

      In this tutorial we use 3 packages:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • pick - helps select the query type interactively
      • +
      • random - use to create random numbers
      • +
      + +

      We import the libraries and connect to the testnet.

      + +
      import steembase
      +import steem
      +from pick import pick
      +import random
      +
      +steembase.chains.known_chains['STEEM'] = {
      +    'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
      +    'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
      +}
      +
      + +

      Because this tutorial alters the blockchain we connect to a testnet so we don’t create spam on the production server.

      + +

      2. User information and steem node

      + +

      We require the private active key of the user in order for the transfer to be committed to the blockchain. This is why we are using a testnet. The values are supplied via the terminal/console before we initialise the steem class. There are some demo accounts available but we encourage you to create your own accounts on a testnet and create balances you can transfer; it’s good practice.

      + +
      #capture user information
      +username = input('Enter username: ') #demo account: demo01
      +wif = input('Enter private ACTIVE key: ') #demo account: 5HxTntgeoLm4trnTz94YBsY6MpAap1qRVXEKsU5n1v2du1gAgVH
      +
      +#connect node and private active key
      +client = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])
      +
      + +

      3. Check balance

      + +

      In order to give the user enough information to make the transfer we check the current balance of both the available and savings funds of the account using the get_account function.

      + +
      #check for valid account and get account balance for STEEM and SBD
      +userinfo = client.get_account(username)
      +if(userinfo is None) :
      +    print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!')
      +    exit()
      +
      +total_steem = userinfo['balance']
      +total_sbd = userinfo['sbd_balance']
      +savings_steem = userinfo['savings_balance']
      +savings_sbd = userinfo['savings_sbd_balance']
      +
      +print('CURRENT ACCOUNT BALANCE:' + '\n' + total_steem + '\n' + total_sbd + '\n')
      +print('CURRENT SAVINGS BALANCE:' + '\n' + savings_steem + '\n' + savings_sbd + '\n')
      +
      +input('Press enter to continue with the transfer' + '\n')
      +
      + +

      The result of the query is displayed in the console/terminal.

      + +

      4. Transfer type and amount

      + +

      The user is given a choice on the type of transfer (transfer/withdraw) as well as the currency. The user can also elect to cancel the process entirely. If you are using one of Steemit’s demo accounts, please leave some funds for others to transfer! Once the user makes their choice we proceed to assign the amount as well as the asset parameter.

      + +
      #choice of transfer/withdrawal
      +title1 = 'Please choose transfer type: '
      +options1 = ['Transfer', 'Withdrawal', 'Cancel']
      +#get index and selected transfer type
      +transfer_type, index = pick(options1, title1)
      +
      +if transfer_type == 'Cancel':
      +    print('Transaction cancelled')
      +    exit()
      +
      +#choice of currency
      +title2 = 'Please choose currency: '
      +options2 = ['STEEM', 'SBD']
      +option, index = pick(options2, title2)
      +
      +if option == 'STEEM':
      +    #get STEEM transfer amount
      +    amount = input('Enter amount of STEEM to transfer: ')
      +    asset = 'STEEM'
      +else:
      +    #get SBD transfer amount
      +    amount = input('Enter amount of SBD to transfer: ')
      +    asset = 'SBD'
      +
      + +

      5. Transfer commit

      + +

      Once all the parameters have been assigned we can proceed with the actual commit to the blockchain. The relevant function is executed based on the selected choice the user made in the previous step.

      + +
      if transfer_type == 'Transfer':
      +    #parameters: amount, asset, memo, to, account
      +    client.transfer_to_savings(float(amount), asset, '', username, username)
      +    print('\n' + 'Transfer to savings balance successful')
      +else:
      +    #create request ID random integer
      +    requestID = random.randint(1,1000000)
      +    #parameters: amount, asset, memo, request_id=None, to=None, account=None
      +    client.transfer_from_savings(float(amount), asset, '', requestID, username, username)
      +    print('\n' + 'Withdrawal from savings successful, transaction ID: ' + str(requestID))
      +
      + +

      With a withdrawal, the method requires a unique identifier for the transaction to be completed. For this we create a random integer and also display it on the UI along with the result of the transaction. The memo parameter is optional and can be left empty as in the above example. We also use the source account for the to parameter. This can be replace by any other valid user account. A simple confirmation of the transfer is printed on the UI.

      + +

      As an added confirmation we check the balance of the user again and display it on the UI. This is not required at all but it serves as a more definitive confirmation that the transfer has been completed correctly.

      + +
      #get remaining account balance for STEEM and SBD
      +userinfo = client.get_account(username)
      +total_steem = userinfo['balance']
      +total_sbd = userinfo['sbd_balance']
      +savings_steem = userinfo['savings_balance']
      +savings_sbd = userinfo['savings_sbd_balance']
      +
      +print('\n' + 'REMAINING ACCOUNT BALANCE:' + '\n' + total_steem + '\n' + total_sbd + '\n')
      +print('CURRENT SAVINGS BALANCE:' + '\n' + savings_steem + '\n' + savings_sbd + '\n')
      +
      + +

      We encourage users to play around with different values and data types to fully understand how this process works. You can also check the balances and transaction history on the testnet portal.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/33_transfer_steem_and_sbd_to_savings_balance
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/using_keys_securely.html b/docs/tutorials-python/using_keys_securely.html new file mode 100644 index 0000000000000000000000000000000000000000..643d2865d132e9b6f75fde6acbf8ce8188cc131f --- /dev/null +++ b/docs/tutorials-python/using_keys_securely.html @@ -0,0 +1,432 @@ + + + + + + + + + + + + + + + + + + +PY: Using Keys Securely | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Using Keys Securely + + +

      + +

      Learn how Steem-Python library handles transaction signing with user’s key and how to securely manage your private keys.

      +
      + + +

      Full, runnable src of Using Keys Securely can be downloaded as part of the PY tutorials repository. +

      + +

      Intro

      + +

      Steem python library has 2 ways to handle your keys. One is from source code, another one is through command line interface called steempy. steempy cli is installed by default when you install steem-python library on your machine.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import
      2. +
      3. Key usage example - Example showing how to import keys
      4. +
      + +

      1. App setup

      + +

      In this tutorial we are only using steem package - steem-python library.

      + +
        # initialize Steem class
      +  from steem import Steem
      +
      +  # defining private keys inside source code is not secure way but possible
      +  s = Steem(keys=['<private_posting_key>', '<private_active_key>'])
      +
      + +

      Last line from above snippet shows how to define private keys for account that’s going to transact using script.

      + +

      2. Key usage example

      + +

      After defining private keys inside Steem class, we can quickly sign any transaction and broadcast it to the network.

      + +
        # above will allow accessing Commit methods such as
      +  # demo account sending 0.001 STEEM to demo1 account
      +
      +  s.commit.transfer('demo','0.001','STEEM','memo text','demo1')
      +
      + +

      Above method works but it is not secure way of handling your keys because you have entered your keys within source code that you might leak accidentally. To avoid that, we can use CLI - command line interface steempy.

      + +

      You can type following to learn more about steempy commands:

      + +
        steempy -h
      +
      + +

      steempy lets you leverage your BIP38 encrypted wallet to perform various actions on your accounts.

      + +

      The first time you use steempy, you will be prompted to enter a password. This password will be used to encrypt the steempy wallet, which contains your private keys.

      + +

      You can import your Steem username with following command:

      + +

      steempy importaccount username

      + +

      Next you can import individual private keys:

      + +

      steempy addkey <private_key>

      + +

      That’s it, now that your keys are securely stored on your local machine, you can easily sign transaction from any of your Python scripts by using defined keys.

      + +
        # if private keys are not defined
      +  # accessing Wallet methods are also possible and secure way
      +  s.wallet.get_active_key_for_account('demo')
      +
      + +

      Above line fetches private key for user demo from local machine and signs transaction.

      + +

      steempy also allows you to sign and broadcast transactions from terminal. For example:

      + +

      steempy transfer --account <account_name> <recipient_name> 1 STEEM memo

      + +

      would sign and broadcast transfer operation,

      + +

      steempy upvote --account <account_name> link

      + +

      would sing and broadcast vote operation, etc.

      + +

      That’s it!

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/001_using_keys_securely
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see output in terminal/command prompt screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/vote_on_content.html b/docs/tutorials-python/vote_on_content.html new file mode 100644 index 0000000000000000000000000000000000000000..5d2687dea831bb7d56d4ea1df616934359c99186 --- /dev/null +++ b/docs/tutorials-python/vote_on_content.html @@ -0,0 +1,474 @@ + + + + + + + + + + + + + + + + + + +PY: Vote On Content | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Vote On Content + + +

      + +

      How to vote on a post/comment using Python.

      +
      + + +

      Full, runnable src of Vote On Content can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we will explain and show you how to to check if a user has voted on specified content and also how to submit a vote on the Steem blockchain using the commit class found within the steem-python library.

      + +

      Intro

      + +

      Voting is a way of promoting good content via an upvote or reporting misuse, spam or other unfit content by downvoting. The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the vote method found within the commit class in the the library. Before we vote on content we first check whether the user has already voted. This is not strictly necessary as a voting operation overrides the previous vote value. We use the get_active_votes function to check for this. This function only requires two parameters, the author and the permlink for the comment/post that the query is for. This returns a list of the current voters for that comment. The vote function has 3 parameters:

      + +
        +
      1. identifier - This is a combination of the author and permink of the post/comment that the vote will be on
      2. +
      3. weight - This value determines whether the vote is an upvote (+100.0) or a downvote (-100.0) but this value cannot be 0
      4. +
      5. username - The name of the account that is executing the vote
      6. +
      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to testnet
      2. +
      3. User information and steem node - Input user information and connection to Steem node
      4. +
      5. Check vote status - Vote status of post/comment
      6. +
      7. Commit vote - Commit vote to the blockchain
      8. +
      + +

      1. App setup

      + +

      In this tutorial we use 3 packages:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • pick - helps select the query type interactively
      • +
      + +

      We import the libraries and connect to the testnet.

      + +
      import steembase
      +import steem
      +from pick import pick
      +
      +steembase.chains.known_chains['STEEM'] = {
      +    'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
      +    'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
      +}
      +
      + +

      Because this tutorial alters the blockchain we connect to the testnet so we don’t create spam on the production server.

      + +

      2. User information and steem node

      + +

      We also require the private posting key of the user that wishes to vote on the selected content so the action can be committed to the blockchain. This is why we have to specify this along with the testnet node. The values are supplied via the terminal/console before we initialise the steem class. We have supplied a test account, cdemo to use with this tutorial but any account set up on the testnet can be used.

      + +
      #capture user information
      +username = input('Please enter your username: ')
      +postingkey = input('Please enter your private posting key: ')
      +
      +#connect node and private posting key, demo account name: cdemo, posting key: 5JEZ1EiUjFKfsKP32b15Y7jybjvHQPhnvCYZ9BW62H1LDUnMvHz
      +s = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[postingkey])
      +
      + +

      3. Check vote status

      + +

      In order to give the user an educated choice we first check whether they have already voted on the given post/comment. The author and permlink for the post is supplied via the console/terminal. +If you need to find something to vote on, you can try (https://condenser.steem.vc/) YMMV.

      + +
      #capture variables
      +author = input('Author of post/comment that you wish to vote for: ')
      +permlink = input('Permlink of the post/comment you wish to vote for: ')
      +
      + +

      The vote status check is done with a simple query to the blockchain.

      + +
      #check vote status
      +result = s.get_active_votes(author, permlink)
      +
      + +

      This query returns a list of the current voters on the specified post/comment. The result is checked against the username to determine what the current status is.

      + +
      if result:
      +	for vote in result :
      +		if vote['voter'] == username:
      +			title = "This post/comment has already been voted for"
      +			break
      +		else:
      +			title = "No vote for this post/comment has been submitted"
      +else:
      +	title = "No vote for this post/comment has been submitted"
      +
      + +

      4. Commit vote

      + +

      The result from the previous step is used to give the user a choice in what the next step in the operation should be.

      + +
      #option to continue
      +options = ['Add/Change vote', 'Cancel voting process']
      +option, index = pick(options, title)
      +
      + +

      The user is given a choice to either continue with the vote or cancel the operation. If the user elects to continue, the vote function is executed. The weight of the vote is input from the UI and the identifier parameter is created by combining the author and permlink values.

      + +

      It’s important to note that the http client in steem-python will retry IF it sends an appbase query and detects a older, non-appbase error

      +
      #voting commit
      +if option == 'Add/Change vote':
      +	weight = input('\n'+'Please advise weight of vote between -100.0 and 100 (not zero): ')
      +	identifier = ('@'+author+'/'+permlink)
      +	try:
      +		print('Sending vote. ...')
      +		s.commit.vote(identifier, float(weight), username)
      +		print('\n'+'Vote sent.')
      +	except (RPCErrorRecoverable, RPCError) as err: 
      +		print('\n'+'Exception encountered. Unable to vote')
      +
      +else:
      +	print('Voting has been cancelled')
      +
      + +

      When the function is executed the selected vote weight overrides any value previously recorded on the blockchain.

      + +

      A simple confirmation of the chosen action is printed on the screen.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/17_vote_on_content
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-python/witness_listing_and_voting.html b/docs/tutorials-python/witness_listing_and_voting.html new file mode 100644 index 0000000000000000000000000000000000000000..5df25563a1c36b7e5a57cfdea256262119a1688e --- /dev/null +++ b/docs/tutorials-python/witness_listing_and_voting.html @@ -0,0 +1,489 @@ + + + + + + + + + + + + + + + + + + +PY: Witness Listing And Voting | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + PY: Witness Listing And Voting + + +

      + +

      How to vote for or remove a vote for a witness user using Python.

      +
      + + +

      Full, runnable src of Witness Listing And Voting can be downloaded as part of the PY tutorials repository. +

      + +

      In this tutorial we show you how to create a list of active witnesses from the Steem blockchain and then vote or unvote for a witness using the commit class found within the steem-python library.

      + +

      Intro

      + +

      The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the approve_witness and disapprove_witness method found within the commit class in the library. We also use the get_active_witnesses function to query the blockchain for a list of available witnesses. Before we vote, we use the get_account function to check for all the witnesses that the user has currently voted for. This is not strictly necessary but adds to the useability of the process. The approve_witness method has 3 parameters:

      + +
        +
      1. witness - The witness to approve
      2. +
      3. account - The source user account for the voting
      4. +
      5. approve - This value is set to True when approving a witness
      6. +
      + +

      The disapprove_witness has the same parameters except for _approve_ which is not required.

      + +

      Steps

      + +
        +
      1. App setup - Library install and import. Connection to testnet
      2. +
      3. User information and steem node - Input user information and connection to Steem node
      4. +
      5. Active witness list - Create a list of active as well as already voted for witnesses
      6. +
      7. Vote / Unvote - Input witness name and commite vote/unvote to blockchain
      8. +
      + +

      1. App setup

      + +

      In this tutorial we use 3 packages:

      + +
        +
      • steem - steem-python library and interaction with Blockchain
      • +
      • pick - helps select the query type interactively
      • +
      • pprint - print results in better format
      • +
      + +

      We import the libraries and connect to the testnet.

      + +
      import steembase
      +import steem
      +from pick import pick
      +import pprint
      +
      +steembase.chains.known_chains['STEEM'] = {
      +    'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
      +    'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
      +}
      +
      + +

      Because this tutorial alters the blockchain we connect to a testnet so we don’t create spam on the production server.

      + +

      2. User information and steem node

      + +

      We require the private active key of the user in order for the transaction to be committed to the blockchain. This is why we are using a testnet. The values are supplied via the terminal/console before we initialise the steem class. We also check if the user name provided is active on the chain. There are some demo accounts available but we encourage you to create your own accounts on this testnet.

      + +
      #capture user information
      +username = input('Enter username: ') #demo account: cdemo
      +wif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3
      +
      +#connect node and private active key
      +client = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])
      +
      +#check valid user
      +userinfo = client.get_account(username)
      +if(userinfo is None) :
      +    print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!')
      +    exit()
      +
      + +

      3. Active witness list

      + +

      We create a list of active witnesses so the user knows which witnesses are available to vote for. We do this by sending a query to the blockchain using the get_active_witnesses function. The result of this query is displayed on the UI.

      + +
      #print list of active witnesses
      +print('ACTIVE WITNESSES')
      +witness_list = client.get_active_witnesses()
      +pprint.pprint(witness_list)
      +
      + +

      We also provide the user with a list of witnesses that has already been voted for by their account. From this the user will know which witnesses can be removed, and which can be added to their set of approved witnesses. We generate this list using the get_account function and display it on the UI.

      + +
      #print list of currently voted for witnesses
      +print('\n' + 'WITNESSES CURRENTLY VOTED FOR')
      +vote_list = userinfo['witness_votes']
      +pprint.pprint(vote_list)
      +
      +input('Press enter to continue')
      +
      + +

      4. Vote / Unvote

      + +

      The user is given the option to VOTE, UNVOTE or CANCEL the process. Depending on the choice the relevant function is executed. Both the VOTE and UNVOTE methods use the same input - the witness being added or removed. The different method executions are shown below.

      + +
      #choice of action
      +title = ('Please choose action')
      +options = ['VOTE', 'UNVOTE', 'CANCEL']
      +option, index = pick(options, title)
      +
      +if (option == 'CANCEL') :
      +    print('\n' + 'operation cancelled')
      +    exit()
      +
      + +

      VOTE :

      + +
      if (option == 'VOTE') :
      +    # vote process
      +    witness_vote = input('Please enter the witness name you wish to vote for: ')
      +    if witness_vote not in witness_list :
      +        print('\n' + witness_vote + ' does not appear on the available witness list')
      +        exit()
      +    if witness_vote in vote_list :
      +        print('\n' + witness_vote + ' cannot be voted for more than once')
      +        exit()
      +    client.approve_witness(witness=witness_vote, account=username, approve=True)
      +    print('\n' + witness_vote + ' has been successfully voted for')
      +
      + +

      UNVOTE :

      + +
      else :
      +    # unvote process
      +    witness_unvote = input('Please enter the witness name you wish to remove the vote from: ')
      +    if witness_unvote not in vote_list :
      +        print('\n' + witness_unvote + ' is not in your voted for list')
      +        exit()
      +    client.disapprove_witness(witness=witness_unvote, account=username)
      +    print('\n' + witness_unvote + ' has been removed from your voted for list')
      +
      + +

      A confirmation of the transaction to the blockchain is displayed on the UI.

      + +

      We encourage users to play around with different values and data types to fully understand how this process works. You can also check the balances and transaction history on the testnet portal.

      + +

      To Run the tutorial

      + +
        +
      1. review dev requirements
      2. +
      3. clone this repo
      4. +
      5. cd tutorials/22_witness_listing_and_voting
      6. +
      7. pip install -r requirements.txt
      8. +
      9. python index.py
      10. +
      11. After a few moments, you should see a prompt for input in terminal screen.
      12. +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-recipes/account-creation-process.html b/docs/tutorials-recipes/account-creation-process.html new file mode 100644 index 0000000000000000000000000000000000000000..ebf477c6451dd24e201cd2ece500ad5f953caa24 --- /dev/null +++ b/docs/tutorials-recipes/account-creation-process.html @@ -0,0 +1,465 @@ + + + + + + + + + + + + + + + + + + +Account creation process | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      + + +
      + + + + + + + + diff --git a/docs/tutorials-recipes/calculate_rc_recipe.html b/docs/tutorials-recipes/calculate_rc_recipe.html new file mode 100644 index 0000000000000000000000000000000000000000..7020bd7423cf710828297c034388f76f3a1ffd48 --- /dev/null +++ b/docs/tutorials-recipes/calculate_rc_recipe.html @@ -0,0 +1,420 @@ + + + + + + + + + + + + + + + + + + +Calculating RC costs | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + Calculating RC costs + + +

      + +

      How to calculate resource credit cost for transactions.

      +
      + + +

      Since HF20 a Resource Credit (RC) system has been implemented to manage the number of transactions (comments, votes, transfers, etc) you can execute on the blockchain at any given time. This recipe will look at how to calculate your current RC and also what the current RC cost is for a given transaction. This recipe is far more ‘basics oriented’ than most. For a more in-depth description of how RC’s work consume this excellent RC demo created by Steemit’s Blockchain Team.

      + +

      Intro

      + +

      RCs are non-transferable credits that accrue to each Steem account based on how much Steem Power(SP) it has. An account spends RC when it transacts on the Steem blockchain. RCs regenerate over a 5 day period. If an account doesn’t have sufficient credits, the transaction will not be allowed to occur.

      + +

      The price of a transaction (which consumes a particular resource, or resources) is based on the current stockpile of those resources. As a stockpile of a resource decreases, the RC cost of that resource increases. In other words, as the stockpile goes down, accounts will have to pay more RCs to use the remaining resources. This system disincentivize the over-consumption of resources by users as well as spam.

      + +

      The RC system uses three measurements to determine how much a transaction should cost in terms of RCs: blockchain size, compute time, and state size. If an transaction is especially expensive in any one of these measurements, then performing that operation will be costly in terms of RCs. It is important to bear in mind that these are objective measurements of resource consumption at the blockchain level, so when something is expensive in RCs, all that means is that performing the action places a high burden on the network relative to other operations.

      + +

      There are applications available to check an account’s status, like steemd.com, but here we will look at how calculate the values manually.

      + +

      Calculating available RC

      + +

      Since RC is calculated relative to SP, we first need to know the available SP before we can calculate how much RC we have left. The value of the current available mana(RC) is also accessible as a field from the getAccounts function.

      + +
      //capture account
      +var _account = await client.database.getAccounts(['username'])
      +var account = _account[0]
      +var props = await client.database.getDynamicGlobalProperties()
      +var CURRENT_UNIX_TIMESTAMP = parseInt((new Date(props.time).getTime() / 1000).toFixed(0))
      +//calculate available SP
      +var totalShares = parseFloat(account.vesting_shares) + parseFloat(account.received_vesting_shares) - parseFloat(account.delegated_vesting_shares);
      +//determine elapsed time since last RC update
      +var elapsed = CURRENT_UNIX_TIMESTAMP - account.voting_manabar.last_update_time;
      +var maxMana = totalShares * 1000000;
      +//calculate current mana for the 5 day period (432000 sec = 5 days)
      +var currentMana = parseFloat(account.voting_manabar.current_mana) + elapsed * maxMana / 432000;
      +
      +if (currentMana > maxMana) {
      +    currentMana = maxMana;
      +}
      +//determine percentage of available mana(RC)
      +var currentManaPerc = currentMana * 100 / maxMana;
      +    
      +console.log(currentManaPerc);
      +
      + +

      Calculating transaction cost

      + +

      A community created library, beem-python offers a solution to calculate the RC costs for a different transaction types. The three main transaction types are: posts/comments, transfers, and vote(on posts). The beem’s functions can be executed with no parameters (as seen below) to provide a rough estimate of an average operation.

      + +
      import beem
      +from beem.rc import RC
      +
      +client = beem.Steem()
      +
      +rc = RC(steem_instance=client)
      +#beem sets its own rough, default values if you don't pass them in.
      +print(rc.comment()) #(self, tx_size=1000, permlink_length=10, parent_permlink_length=10)
      +print(rc.vote()) #(self, tx_size=210)
      +print(rc.transfer()) #(self, tx_size=290, market_op_count=1)
      +
      + +

      The functions can also be executed for a specific transaction by passing in data for transaction in question. The first step is to calculate the transfer size of the operation which is then used to execute the function to calculate the RC costs.

      + +
      opdata = {
      +    'voter': 'steemit',
      +    'author': 'r1s2g3',
      +    'permlink': 'rc-calculations-according-to-your-need-part-1',
      +    'weight': 100
      +}
      +#create operation to check
      +op = beembase.operations.Vote(opdata)
      +#check vote transaction size
      +vote_tx = rc.get_tx_size(op)
      +print(vote_tx)
      +#check vote RC cost
      +print(rc.vote(vote_tx))
      +
      + +

      You can find the source for beem’s RC class in the beem github repo +Additional info can also be found in this article by steem user @holger80

      + +

      Allocation of RC to blockchain resources

      + +

      An in depth look at how RC’s are assigned to each of the three resources (CPU megacycles/state memory/history size) can be found in Steemit’s wiki articles for RC Bandwidth System and Parameters

      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-recipes/estimate_upvote.html b/docs/tutorials-recipes/estimate_upvote.html new file mode 100644 index 0000000000000000000000000000000000000000..0d8d3daa34c7d4bed6f117334680382b294b61e3 --- /dev/null +++ b/docs/tutorials-recipes/estimate_upvote.html @@ -0,0 +1,536 @@ + + + + + + + + + + + + + + + + + + +Estimate the value of an upvote | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + Estimate the value of an upvote + + +

      + +

      Calculate the approximate value of an upvote on Steem

      +
      + + +

      By the end of this recipe you should know how to estimate value of each vote on Steem.

      + +

      This recipe will take you through the process of fetching necessary data and formulating estimation.

      + +

      Intro

      + +

      Calculating value of each vote depends on multiple factors. Reward fund, recent claims, account’s total vests, rate of the sbd, voting power and weight of the vote. It is quite useful information for users to see and estimate. All of the data is possible to get via available APIs.

      + +

      Steps

      + +
        +
      1. Get Reward Fund Current reward fund information is crucial part of estimation
      2. +
      3. Get Account Steem power and voting power is another important info
      4. +
      5. Feed history To get price rate reported by witnesses
      6. +
      7. Final calculation Formulate all information we have
      8. +
      + +

      1. Get Reward Fund

      + +

      Getting Reward Fund information is simply calling get_reward_fund('post') api call, it will give us reward_balance and recent_claims.

      + +

      The response we’re working with will look like:

      + +
      {
      +	"id":0,
      +	"name":"post",
      +	"reward_balance":"741222.051 STEEM",
      +	"recent_claims":"457419472820935017",
      +	"last_update":"2018-05-23T12:08:36",
      +	"content_constant":"2000000000000",
      +	"percent_curation_rewards":2500,
      +	"percent_content_rewards":10000,
      +	"author_reward_curve":"linear",
      +	"curation_reward_curve":"square_root"
      +}
      +
      + +

      2. Get Account

      + +

      Next we will need total vests held by account, get_accounts api call returns account data, which will hold vesting_shares, received_vesting_shares, delegated_vesting_shares. It also returns current voting_power information.

      + +

      The response example will look like:

      + +
      [
      +  {
      +    "id": 9660,
      +    "name": "steemitblog",
      +    "owner": {
      +      "weight_threshold": 1,
      +      "account_auths": [
      +        [
      +          "ned",
      +          1
      +        ]
      +      ],
      +      "key_auths": [
      +        [
      +          "STM65wH1LZ7BfSHcK69SShnqCAH5xdoSZpGkUjmzHJ5GCuxEK9V5G",
      +          1
      +        ]
      +      ]
      +    },
      +    "active": {
      +      "weight_threshold": 1,
      +      "account_auths": [],
      +      "key_auths": [
      +        [
      +          "STM65wH1LZ7BfSHcK69SShnqCAH5xdoSZpGkUjmzHJ5GCuxEK9V5G",
      +          1
      +        ]
      +      ]
      +    },
      +    "posting": {
      +      "weight_threshold": 1,
      +      "account_auths": [
      +        [
      +          "ned",
      +          1
      +        ]
      +      ],
      +      "key_auths": [
      +        [
      +          "STM4yfYEjUoey4PLrKhnKFo1XKQZtZ77fWLnbGTr2mAUaSt2Sx9W4",
      +          1
      +        ],
      +        [
      +          "STM5FeHFtL8J453DUi98LKwkqXBH5iwxf9xCqYs6QwPibPru3RNq3",
      +          1
      +        ],
      +        [
      +          "STM5VwLXkNQf17sQ2XuxScdxruwBy1jak2mDxCjmyfYMNhm1WzPzN",
      +          1
      +        ],
      +        [
      +          "STM5ke2kzgwBmysSqCNM6zRABi8SNpaJEtnFXuTtRcU3Uvf47481z",
      +          1
      +        ]
      +      ]
      +    },
      +    "memo_key": "STM5FeHFtL8J453DUi98LKwkqXBH5iwxf9xCqYs6QwPibPru3RNq3",
      +    "json_metadata": "",
      +    "proxy": "",
      +    "last_owner_update": "2017-03-17T18:19:18",
      +    "last_account_update": "2017-03-17T18:19:18",
      +    "created": "2016-05-24T18:54:24",
      +    "mined": false,
      +    "recovery_account": "steem",
      +    "last_account_recovery": "2016-07-19T19:48:54",
      +    "reset_account": "null",
      +    "comment_count": 0,
      +    "lifetime_vote_count": 0,
      +    "post_count": 154,
      +    "can_vote": true,
      +    "voting_power": 9800,
      +    "last_vote_time": "2018-05-22T20:10:45",
      +    "balance": "810.371 STEEM",
      +    "savings_balance": "0.000 STEEM",
      +    "sbd_balance": "4613.426 SBD",
      +    "sbd_seconds": "10828300402329",
      +    "sbd_seconds_last_update": "2018-05-22T22:34:24",
      +    "sbd_last_interest_payment": "2018-04-25T18:26:15",
      +    "savings_sbd_balance": "0.000 SBD",
      +    "savings_sbd_seconds": "0",
      +    "savings_sbd_seconds_last_update": "1970-01-01T00:00:00",
      +    "savings_sbd_last_interest_payment": "1970-01-01T00:00:00",
      +    "savings_withdraw_requests": 0,
      +    "reward_sbd_balance": "79.490 SBD",
      +    "reward_steem_balance": "0.000 STEEM",
      +    "reward_vesting_balance": "608341.169185 VESTS",
      +    "reward_vesting_steem": "293.101 STEEM",
      +    "vesting_shares": "93540695.469156 VESTS",
      +    "delegated_vesting_shares": "0.000000 VESTS",
      +    "received_vesting_shares": "0.000000 VESTS",
      +    "vesting_withdraw_rate": "0.000000 VESTS",
      +    "next_vesting_withdrawal": "1969-12-31T23:59:59",
      +    "withdrawn": 0,
      +    "to_withdraw": 0,
      +    "withdraw_routes": 0,
      +    "curation_rewards": 10288,
      +    "posting_rewards": 38917298,
      +    "proxied_vsf_votes": [
      +      0,
      +      0,
      +      0,
      +      0
      +    ],
      +    "witnesses_voted_for": 0,
      +    "last_post": "2018-05-22T18:59:33",
      +    "last_root_post": "2018-05-22T18:59:33",
      +    "average_bandwidth": "34722906781",
      +    "lifetime_bandwidth": "656153000000",
      +    "last_bandwidth_update": "2018-05-22T20:10:45",
      +    "average_market_bandwidth": 1170000000,
      +    "lifetime_market_bandwidth": 1170000000,
      +    "last_market_bandwidth_update": "2016-07-27T15:10:09",
      +    "vesting_balance": "0.000 STEEM",
      +    "reputation": "146151592482665",
      +    "transfer_history": [],
      +    "market_history": [],
      +    "post_history": [],
      +    "vote_history": [],
      +    "other_history": [],
      +    "witness_votes": [],
      +    "tags_usage": [],
      +    "guest_bloggers": []
      +  }
      +]
      +
      + +

      3. Feed history

      + +

      Last thing we will need is rate of the get_current_median_history_price, returns median price rate bucket with base element.

      + +

      The response example will look like:

      + +
      {
      +  "base": "3.029 SBD",
      +  "quote": "1.000 STEEM"
      +}
      +
      + +

      4. Final calculation

      + +

      After getting all these variables, all we have to do is to calculate estimation

      + +
      total_vests = vesting_shares + received_vesting_shares - delegated_vesting_shares
      +final_vest = total_vests * 1e6
      +power = (voting_power * weight / 10000) / 50
      +rshares = power * final_vest / 10000
      +estimate = rshares / recent_claims * reward_balance * sbd_median_price
      +
      + +

      That’s all there is to it.

      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-recipes/forum-market-bandwidth.html b/docs/tutorials-recipes/forum-market-bandwidth.html new file mode 100644 index 0000000000000000000000000000000000000000..58cb588b62c8d05015d01339deb84f4f237e9380 --- /dev/null +++ b/docs/tutorials-recipes/forum-market-bandwidth.html @@ -0,0 +1,587 @@ + + + + + + + + + + + + + + + + + + +Forum/Market Bandwidth | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + Forum/Market Bandwidth + + +

      + +

      How to interpret raw bandwidth data.

      +
      + + +

      Intro

      + +

      + Please note, Bandwidth has been replaced by Resource Credits. This document is outdated and will remain in place to give historical context prior to HF20. Also see: RC Bandwidth System, 0.20.2 Release Notes, Developer Guide: Resource Credit System +

      + +

      We’re going over the various API calls needed to determine the remaining bandwidth available to a particular account. As mentioned in the STEEM Whitepaper:

      + +
      +

      Bandwidth used by an individual user should be measured over a suitably long period of time to allow that +user to time-shift their usage. Users tend to login, do many things at once, then logout. This means that +their bandwidth over a short period of time may appear much higher than if viewed over a longer period of +time. If the time window is stretched too far, then the reserve ratio will not adjust fast enough to respond +to short-term surges; conversely, if the window is too short then clustering usage will have too big of an +impact on normal users.

      +
      + +

      Bandwidth is specific to each account and depends on account activity.

      + +

      Sections

      + +
        +
      1. Getting Account Bandwidth
      2. +
      3. Dynamic Global Properties
      4. +
      5. Account STEEM Power
      6. +
      7. Calculate
      8. +
      + +

      Getting Account Bandwidth

      + +
      curl -s --data '{
      +   "jsonrpc":"2.0",
      +   "method":"condenser_api.get_account_bandwidth",
      +   "params":[
      +      "cheetah",
      +      "forum"
      +   ],
      +   "id":1
      +}' https://api.steemit.com
      +
      + +
      {
      +   "jsonrpc":"2.0",
      +   "result":{
      +      "id":20846,
      +      "account":"cheetah",
      +      "type":"forum",
      +      "average_bandwidth":"7525646416619",
      +      "lifetime_bandwidth":"386010589000000",
      +      "last_bandwidth_update":"2018-07-18T16:37:54"
      +   },
      +   "id":1
      +}
      +
      + +

      In this example, we got forum (blogging) average bandwidth of 7,525,646,416,619 with a lifetime bandwidth of 386,010,589,000,000.

      + +

      Note, average_bandwidth is expressed as an integer with six decimal places represented. Divide by 1,000,000 in order to get the actual bytes of bandwidth, in this case: 7,525,646 bytes.

      + +

      Dynamic Global Properties

      + +

      To do the calculation, we need max_virtual_bandwidth and total_vesting_shares from the global properties, e.g.:

      + +
      curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}' https://api.steemit.com
      +
      + +
      {
      +   "id":1,
      +   "jsonrpc":"2.0",
      +   "result":{
      +      "head_block_number":24264289,
      +      "head_block_id":"01723e6156ad44ac7bf3028a53a7ac642084cb39",
      +      "time":"2018-07-17T20:25:27",
      +      "current_witness":"followbtcnews",
      +      "total_pow":514415,
      +      "num_pow_witnesses":172,
      +      "virtual_supply":"283443693.176 STEEM",
      +      "current_supply":"271786073.683 STEEM",
      +      "confidential_supply":"0.000 STEEM",
      +      "current_sbd_supply":"15504633.926 SBD",
      +      "confidential_sbd_supply":"0.000 SBD",
      +      "total_vesting_fund_steem":"193007548.472 STEEM",
      +      "total_vesting_shares":"391468555319.000697 VESTS",
      +      "total_reward_fund_steem":"0.000 STEEM",
      +      "total_reward_shares2":"0",
      +      "pending_rewarded_vesting_shares":"382967391.274340 VESTS",
      +      "pending_rewarded_vesting_steem":"187173.234 STEEM",
      +      "sbd_interest_rate":0,
      +      "sbd_print_rate":2966,
      +      "maximum_block_size":65536,
      +      "current_aslot":24341309,
      +      "recent_slots_filled":"340282366920938463463374607431768211455",
      +      "participation_count":128,
      +      "last_irreversible_block_num":24264271,
      +      "vote_power_reserve_rate":10,
      +      "average_block_size":13436,
      +      "current_reserve_ratio":200000000,
      +      "max_virtual_bandwidth":"264241152000000000000"
      +   }
      +}
      +
      + +

      Account STEEM Power

      + +

      We also need to know how much the account has in STEEM Power from vesting_shares and received_vesting_shares:

      + +
      curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_accounts", "params":[["cheetah"]], "id":1}' https://api.steemit.com
      +
      + +
      {
      +   "jsonrpc":"2.0",
      +   "result":[
      +      {
      +         "id":25796,
      +         "name":"cheetah",
      +         "owner":{
      +            "weight_threshold":1,
      +            "account_auths":[],
      +            "key_auths":[["STM7yFmwPSKUP7FCV7Ut9Aev5cwfDzJZixcreS1U3ha36XG47ZpqT", 1]]
      +         },
      +         "active":{
      +            "weight_threshold":1,
      +            "account_auths":[],
      +            "key_auths":[["STM7yFmwPSKUP7FCV7Ut9Aev5cwfDzJZixcreS1U3ha36XG47ZpqT", 1]]
      +         },
      +         "posting":{
      +            "weight_threshold":1,
      +            "account_auths":[["anyx", 100]],
      +            "key_auths":[["STM5bicRFWhpxnwBymo2HHJv6mFLiaP6AwVVsFEnnVjVcqbvqzvFt", 100], ["STM7yFmwPSKUP7FCV7Ut9Aev5cwfDzJZixcreS1U3ha36XG47ZpqT", 100], ["STM8Jn23vNmBzVuDAgQeZzzR17LmruENmmZmv1ra53tbsBgYbJFwk", 100]]
      +         },
      +         "memo_key":"STM7yFmwPSKUP7FCV7Ut9Aev5cwfDzJZixcreS1U3ha36XG47ZpqT",
      +         "json_metadata":"{\"profile\":{\"profile_image\":\"https:\/\/c1.staticflickr.com\/6\/5739\/22389343016_25d10c52a3_b.jpg\",\"about\":\"I am a robot that automatically finds similar content. Check the website linked to on my blog to learn more about me!\",\"website\":\"http:\/\/steemit.com\/steemit\/@cheetah\/faq-about-cheetah\"}}",
      +         "proxy":"",
      +         "last_owner_update":"1970-01-01T00:00:00",
      +         "last_account_update":"2017-06-13T00:14:00",
      +         "created":"2016-07-17T08:47:18",
      +         "mined":true,
      +         "recovery_account":"steem",
      +         "last_account_recovery":"1970-01-01T00:00:00",
      +         "reset_account":"null",
      +         "comment_count":0,
      +         "lifetime_vote_count":0,
      +         "post_count":517808,
      +         "can_vote":true,
      +         "voting_power":1249,
      +         "last_vote_time":"2018-07-18T16:39:21",
      +         "balance":"118.463 STEEM",
      +         "savings_balance":"0.000 STEEM",
      +         "sbd_balance":"67.717 SBD",
      +         "sbd_seconds":"127094582318",
      +         "sbd_seconds_last_update":"2018-07-18T14:13:15",
      +         "sbd_last_interest_payment":"2018-06-20T12:01:15",
      +         "savings_sbd_balance":"0.000 SBD",
      +         "savings_sbd_seconds":"0",
      +         "savings_sbd_seconds_last_update":"1970-01-01T00:00:00",
      +         "savings_sbd_last_interest_payment":"1970-01-01T00:00:00",
      +         "savings_withdraw_requests":0,
      +         "reward_sbd_balance":"0.005 SBD",
      +         "reward_steem_balance":"0.009 STEEM",
      +         "reward_vesting_balance":"26.366463 VESTS",
      +         "reward_vesting_steem":"0.013 STEEM",
      +         "vesting_shares":"4770940.577823 VESTS",
      +         "delegated_vesting_shares":"0.000000 VESTS",
      +         "received_vesting_shares":"16020356.484882 VESTS",
      +         "vesting_withdraw_rate":"347124.891306 VESTS",
      +         "next_vesting_withdrawal":"2018-07-21T02:27:09",
      +         "withdrawn":"1388499565224",
      +         "to_withdraw":"4512623586985",
      +         "withdraw_routes":1,
      +         "curation_rewards":170083,
      +         "posting_rewards":37433355,
      +         "proxied_vsf_votes":["50341599736964", "20169963876698", 0, 0],
      +         "witnesses_voted_for":23,
      +         "last_post":"2018-07-18T16:39:24",
      +         "last_root_post":"2018-07-18T07:00:45",
      +         "average_bandwidth":"7525467544963",
      +         "lifetime_bandwidth":"386011530000000",
      +         "last_bandwidth_update":"2018-07-18T16:39:24",
      +         "average_market_bandwidth":2406616155,
      +         "lifetime_market_bandwidth":"224370000000",
      +         "last_market_bandwidth_update":"2018-07-12T04:57:36",
      +         "vesting_balance":"0.000 STEEM",
      +         "reputation":"305786119478594",
      +         "transfer_history":[],
      +         "market_history":[],
      +         "post_history":[],
      +         "vote_history":[],
      +         "other_history":[],
      +         "witness_votes":[
      +            "anyx",
      +            "arcange",
      +            "ats-witness",
      +            "ausbitbank",
      +            "bitcoiner",
      +            "blockchained",
      +            "chitty",
      +            "drakos",
      +            "followbtcnews",
      +            "fubar-bdhr",
      +            "guiltyparties",
      +            "liondani",
      +            "lukestokes.mhth",
      +            "neoxian",
      +            "netuoso",
      +            "noisy.witness",
      +            "patrice",
      +            "pfunk",
      +            "pjau",
      +            "teamsteem",
      +            "thecryptodrive",
      +            "themarkymark",
      +            "timcliff"
      +         ],
      +         "tags_usage":[],
      +         "guest_bloggers":[]
      +      }
      +   ],
      +   "id":1
      +}
      +
      + +

      Calculate

      + +

      Now, we can derive bandwidth_allocated:

      + +

      bandwidth_allocated = max_virtual_bandwidth * (vesting_shares + received_vesting_shares) / total_vesting_shares

      + +

      bandwidth_allocated = bandwidth_allocated / 1000000

      + +

      In our example, bandwidth_allocated = 14034118993.

      + +

      Now that we have both bandwidth_allocated and average_bandwidth, we can determine the percentages.

      + +

      First, we need average_bandwidth on the same scale as bandwidth_allocated:

      + +

      average_bandwidth = average_bandwidth / 1000000

      + +

      Then we can get the percentages:

      + +

      bandwidth_used = 100 * average_bandwidth / bandwidth_allocated

      + +

      bandwidth_remaining = 100 - (100 * average_bandwidth / bandwidth_allocated)

      + +

      We can see that cheetah has used 0.053 % bandwidth and has 99.946 % remaining as of last_bandwidth_update.

      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-recipes/jussi-multiplexer.html b/docs/tutorials-recipes/jussi-multiplexer.html new file mode 100644 index 0000000000000000000000000000000000000000..eff5db2cb5ade83a2f2110fccb8460f08b18e080 --- /dev/null +++ b/docs/tutorials-recipes/jussi-multiplexer.html @@ -0,0 +1,424 @@ + + + + + + + + + + + + + + + + + + +Using jussi as a Multiplexer | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + Using jussi as a Multiplexer + + +

      + +

      Optimize your local applications with jussi

      +
      + + +

      By the end of this recipe you should know how to install jussi on your local subnet to take advantage of its features.

      + +

      This recipe will take you through the process of setting up jussi for a small infrastructure like a home network.

      + +

      Intro

      + +

      What is a Multiplexer? In this context, a multiplexer an appliance that accepts API requests from multiple applications running on the same subnet and passes them to an upstream node. This means, for example, if you have two applications that request the same block from API, your local jussi instance will make a single upstream request for the block and return it to both applications.

      + +

      Deploying jussi on your own local subnet will help improve efficiency because your local applications won’t require SSL and jussi can take care of gzipping requests that go out over the Internet.

      + +
      + Network Diagram +
      + +

      Steps

      + +
        +
      1. Setting Up Docker In order to run jussi, docker is recommended
      2. +
      3. Install jussi Clone jussi from the repository and build
      4. +
      5. Configure Your Apps Point all of your applications to this node
      6. +
      + +

      1. Setting Up Docker

      + +

      Although it’s possible to set up jussi to run natively without virtualization, docker is recommended. Setting up docker depends on your operating system:

      + + + +

      2. Install jussi

      + +
      git clone https://github.com/steemit/jussi.git
      +cd jussi
      +
      + +

      Edit the file DEV_config.json and change all:

      + +

      https://steemd.steemitdev.com

      + +

      … to …

      + +

      https://api.steemit.com

      + +

      Also consider adding the retries element to your DEV_config.json.

      + +

      Then build and run:

      + +
      docker build -t="$USER/jussi:$(git rev-parse --abbrev-ref HEAD)" .
      +docker run -itp 9000:8080 "$USER/jussi:$(git rev-parse --abbrev-ref HEAD)"
      +
      + +

      3. Configure Your Apps

      + +

      Now, you can use your new jussi node as if it’s a full node running locally. For example:

      + +
      curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[8675309], "id":1}' http://localhost:9000
      +
      + +

      In this case, http://localhost:9000 will act like a full node. In reality, it’s passing all of its request to its upstream, https://api.steemit.com.

      + +

      Once you’ve implemented your own jussi node in this manner, you should notice an improvement in bandwidth utilization. If you’re internet provider implements packet shaping strategies, this will have a positive impact because you are no longer streaming the entire blockchain once for each application.

      + +

      Troubleshooting / Updating

      + +

      Error: invalid argument "/jussi:master" for t=/jussi:master: invalid reference format

      + +

      Solution:

      + +

      You’re probably trying to run on a raspberry pi. Just replace $USER in the command with the current user.

      + +
      + +

      If you would like to update jussi to the latest version, here’s a quick way:

      + +
      git stash && git pull && git stash pop
      +
      + +

      If there are git errors due to structural changes to DEV_config.json, just start over from step 2 and reclone jussi to a fresh location. Otherwise, you should be able to rebuild and run.

      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-recipes/plugin_and_api_list.html b/docs/tutorials-recipes/plugin_and_api_list.html new file mode 100644 index 0000000000000000000000000000000000000000..50f3e30510d1e23abb039c6945dc117e650f27bc --- /dev/null +++ b/docs/tutorials-recipes/plugin_and_api_list.html @@ -0,0 +1,765 @@ + + + + + + + + + + + + + + + + + + +Enable SteemD Node APIs | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + Enable SteemD Node APIs + + +

      + +

      Run a SteemD Node with your preferred APIs

      +
      + + +

      This is a list of the plugins, and their associated dependencies, required to enable specific apis.

      + +

      When setting up the config file steemd will run the chain, p2p, and webserver plugins regardless of other dependencies

      + +

      API’s with their respective plugin dependencies

      + +

      account_by_key_API

      + + +

      account_history_API

      + + +

      block_api

      + + +

      chain_api

      + + +

      condenser_api

      + + +

      database_api

      + + +

      debug_node_api

      + + +

      follow_api

      + + +

      market_history_api

      + + +

      network_broadcast_api

      + + +

      rc_api

      + + +

      reputation_api

      + + +

      tags_api

      + + +

      test_api

      + + +

      witness_api

      + + +

      Available plugins with any other plugin dependencies listed

      + +

      account_by_key_plugin

      + +

      dependency plugins

      +
        +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      + +

      definition

      +
        +
      • Used to lookup account information based on a key
      • +
      + +

      additional account_by_key plugin:

      +
        +
      • account_by_key_objects
      • +
      + +

      account_history_plugin

      + +

      dependency plugins

      +
        +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      + +

      definition

      +
        +
      • Used to lookup account history information
      • +
      + +

      account_history_rocksdb_plugin

      + +

      dependency plugins

      +
        +
      • <steem/plugins/account_history_rocksdb/account_history_rocksdb_objects.hpp>
      • +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      + +

      definition

      +
        +
      • More efficient way of storing and reading information from the database
      • +
      + +

      additional account_history_rocksdb plugin:

      +
        +
      • account_history_rocksdb_objects
      • +
      + +

      block_data_export_plugin

      + +

      dependency plugins

      +
        +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      + +

      definition

      +
        +
      • create export file containing block data
      • +
      + +

      additional block_data_export plugin:

      +
        +
      • exportable_block_data
      • +
      + +

      block_log_info_plugin

      + +

      dependency plugins

      +
        +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      + +

      definition

      +
        +
      • create a block log file with block number, size and hash +additional block_log_info plugin:
      • +
      • block_log_info_objects
      • +
      + +

      chain_plugin

      + +

      dependency plugins

      +
        +
      • none
      • +
      + +

      definition

      +
        +
      • Connection to the blockchain
      • +
      + +

      debug_node_plugin

      +

      dependency plugins

      +
        +
      • <steem/plugins/chain/chain_plugin.hpp> +definition
      • +
      • The goal of the debug_node plugin is to start with the live chain, then easily simulate future hypothetical actions. The plugin simulates changes to chain state. For example, you can edit an account’s balances and signing keys to enable performing (simulated) actions with that account.
      • +
      • This plugin allows all sorts of creative “what-if” experiments with the chain.
      • +
      • https://github.com/steemit/steem/blob/master/doc/debug_node_plugin.md
      • +
      + +

      follow_plugin

      + +

      dependency plugins

      +
        +
      • <steem/plugins/follow/follow_operations.hpp>
      • +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      + +

      definition

      +
        +
      • Used to lookup information related to reputation and account follow operations
      • +
      + +

      additional follow plugins:

      +
        +
      • follow_objects
      • +
      • follow_operations
      • +
      • inc_performance
      • +
      + +

      json_rpc_plugin

      + +

      dependency plugins

      +
        +
      • none
      • +
      + +

      definition

      +
        +
      • This plugin holds bindings for all APIs and their methods and can dispatch JSONRPC requests to the appropriate API.
      • +
      • For a plugin to use the API Register, it needs to specify the register as a dependency.
      • +
      • Then, during initializtion, register itself using add_api.
      • +
      + +

      additional json_rpc plugin: + utility

      + +

      market_history_plugin

      + +

      dependency plugins

      +
        +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      + +

      definition

      +
        +
      • Used to lookup market history information. Can return the market and trade history of the internal STEEM:SBD market. The order book, recent trades and the market volume is made available through this plugin.
      • +
      + +

      p2p_plugin

      + +

      dependency plugins

      +
        +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      + +

      definition

      +
        +
      • allowes peer-to-peer communication
      • +
      + +

      additional p2p plugin:

      +
        +
      • p2p_default_seeds
      • +
      + +

      rc_plugin

      + +

      dependency plugins

      +
        +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      + +

      definition

      +
        +
      • Managing of resources - curation rewards, vesting shares, etc.
      • +
      + +

      additional rc plugins:

      +
        +
      • rc_curve +
          +
        • <steem/plugins/rc/rc_utility.hpp>
        • +
        +
      • +
      • rc_export_object +
          +
        • <steem/plugins/block_data_export/exportable_block_data.hpp>
        • +
        • <steem/plugins/rc/resource_count.hpp>
        • +
        +
      • +
      • rc_objects +
          +
        • <steem/plugins/rc/rc_utility.hpp>
        • +
        • <steem/plugins/rc/resource_count.hpp>
        • +
        +
      • +
      • rc_utility
      • +
      + +

      reputation_plugin

      + +

      dependency plugins

      +
        +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      + +

      definition

      +
        +
      • manage user steemit user reputation (relevant to voting on content)
      • +
      + +

      additional reputation plugin:

      +
        +
      • reputation_objects
      • +
      + +

      smt_test_plugin

      +

      dependency plugins

      +
        +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      + +

      definition

      + +

      additional smt_test plugin:

      +
        +
      • smt_test_objects
      • +
      + +

      stats_export_plugin

      +

      dependency plugins

      +
        +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      • <steem/plugins/block_data_export/block_data_export_plugin.hpp>
      • +
      + +

      definition

      + +

      statsd_plugin

      +

      dependency plugins

      +
        +
      • none
      • +
      + +

      definition

      +
        +
      • statistical information logging
      • +
      + +

      additional statsd plugin:

      +
        +
      • utility +
          +
        • <steem/plugins/statsd/statsd_plugin.hpp>
        • +
        +
      • +
      + +

      tags_plugin

      +

      dependency plugins

      +
        +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      + +

      definition

      +
        +
      • Used to lookup information about tags, posts, and discussions as well as votes.
      • +
      + +

      webserver_plugin

      +

      dependency plugins

      +
        +
      • <steem/plugins/json_rpc/json_rpc_plugin.hpp>
      • +
      + +

      definition

      +
        +
      • webserver user interface
      • +
      + +

      witness_plugin

      +

      dependency plugins

      +
        +
      • <steem/plugins/chain/chain_plugin.hpp>
      • +
      • <steem/plugins/p2p/p2p_plugin.hpp>
      • +
      • <steem/plugins/rc/rc_plugin.hpp>
      • +
      + +

      definition

      +
        +
      • The witness plugin contains all of the bandwidth logic. Can access the available bandwidth of an account and current reserve ratio.
      • +
      + +

      additional witness plugins:

      +
        +
      • witness_objects
      • +
      • witness_export_objects
      • +
      • <steem/plugins/block_data_export/exportable_block_data.hpp>
      • +
      • <steem/plugins/witness/witness_objects.hpp
      • +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-recipes/understanding-configuration-values.html b/docs/tutorials-recipes/understanding-configuration-values.html new file mode 100644 index 0000000000000000000000000000000000000000..9e4c9225d8508bbbe6eb7660e5bed7a10bc7bc64 --- /dev/null +++ b/docs/tutorials-recipes/understanding-configuration-values.html @@ -0,0 +1,1047 @@ + + + + + + + + + + + + + + + + + + +Understanding Configuration Values | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + Understanding Configuration Values + + +

      + +

      Low level blockchain constants

      +
      + + +

      Intro

      + +

      These values underpin the behavior of the entire blockchain. In a sense, each witness votes for these configuration values every time they sign a block. Unlike many of the Dynamic Global Properties, these values never change at runtime (e.g., as a witness, in order to change them, you typically must shut down your node, make the change, recompile, and run).

      + +

      See: config.hpp

      + +

      Usually, these configuration values are universally adhered to, but there are situations where these values can and should be altered, like in the case of deploying a new blockchain (typically a testnet). Some of the values that do not affect consensus, like STEEM_SOFT_MAX_COMMENT_DEPTH, are allowed to change to some extent.

      + +

      Sections

      + + + +

      IS_TEST_NET

      + +

      Indicates if this node is running on testnet. See: Steem Testnet

      + +

      STEEM_ENABLE_SMT

      + +

      Indicates if Smart Media Tokens have been enabled (future hardfork).

      + +

      STEEM_INITIAL_VOTE_POWER_RATE

      + +

      The rate used prior to HF19. The number of votes an account may cast per day before voting power is impacted (originally 40 votes per day).

      + +

      STEEM_REDUCED_VOTE_POWER_RATE

      + +

      The rate used since HF19. The number of votes an account may cast per day before voting power is impacted (10 votes per day).

      + +

      STEEM_ADDRESS_PREFIX

      + +

      Address prefix used on mainnet is STM and on testnet is TST. See: Steem Testnet

      + +

      STEEM_BLOCK_INTERVAL

      + +

      Block interval in seconds is 3. This is the target for block production. This constant is also used as a component for determining valid peer inventory, bandwidth calculations, and block production gaps.

      + +

      STEEM_CASHOUT_WINDOW_SECONDS

      + +

      This value was simply set to 7 days, since HF17.

      + +

      Prior to this, other very complicated machinations were tried like multiple payouts and an initial 24 hours (prior to HF12) and even initial 12 hours (in HF12) all with time extensions depending on how much of an upvote the content got.

      + +

      Note, on testnet, this is typically much shorter: 1 hour. See: Steem Testnet

      + +

      STEEM_CHAIN_ID

      + +

      The chain ID to connect to, which is used to seed signing and prevent transaction crosstalk between two chains, typically mainnet and testnet. See: Steem Testnet

      + +

      STEEM_CHAIN_ID_NAME

      + +

      Tyically used to automatically get a unique chain id for a testnet. See: Steem Testnet

      + +

      STEEM_CREATE_ACCOUNT_DELEGATION_RATIO

      + +

      This ratio is set to 5 and is used to determine the cost of an account created with delegation.

      + +

      As an example, imagine the account creation fee is currently 3.000 STEEM. Instead of creating the account using pure STEEM, there is an option to use delegation so that the blockchain would reduce the creation fee to 0.100 STEEM. Going this route would require a delegation of 15.000 STEEM, that can be revoked at any time, but will stay in limbo for 30 days after the creation date (STEEM_CREATE_ACCOUNT_DELEGATION_TIME).

      + +

      This minimum STEEM ensures that those accounts can transact if the delegation is removed.

      + +

      STEEM_CREATE_ACCOUNT_DELEGATION_TIME

      + +

      There is a minimum delegation period (30 days) and a minimum fee in STEEM even when delegating for account creation (derived with STEEM_CREATE_ACCOUNT_DELEGATION_RATIO). The minimum period enforces a rate limit on account creation.

      + +

      Note that delegation can be revoked before 30 days have elapsed from the creation date, but stays in limbo.

      + +

      STEEM_FEED_HISTORY_WINDOW

      + +

      Price feed history window, which is 3.5 days since HF16.

      + +

      STEEM_GENESIS_TIME

      + +

      Scheduled time that the blockchain waited until the first block was produced. It is represented as the unix epoch of 1458835200, which is Thu Mar 24 16:00:00 UTC 2016. About five seconds later, the first block was produced. See: https://steemd.com/b/1

      + +

      STEEM_HARDFORK_REQUIRED_WITNESSES

      + +

      The minimum number of Delegated Proof of Stake witnesses required for hardfork. This guarantees 75% participation on all subsequent rounds.

      + +

      By default it is set to 17, but when running a testnet, we can change it to 1 so that only one node instance would be sufficient and the network will be still functional and fast. See: Steem Testnet

      + +

      STEEM_INFLATION_NARROWING_PERIOD

      + +

      Inflation narrows 0.01% every 250k blocks, since HF16. At block 7,000,000, there was a 9.5% instantaneous inflation rate, decreasing to 0.95% at this rate of 0.01% every 250k blocks. This narrowing will take approximately 20.5 years and will complete on block 220,750,000.

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      YearSupplyInflationNew Supply YearSupplyInflationNew Supply
      2016250,000,0009.50%23,750,000 2031646,511,3863.19%20,613,886
      2017273,750,0009.08%24,854,398 2032667,125,2722.77%18,464,106
      2018298,604,3988.66%25,854,554 2033685,589,3782.35%16,090,399
      2019324,458,9528.24%26,727,942 2034701,679,7771.93%13,515,587
      2020351,186,8947.82%27,452,027 2035715,195,3641.51%10,766,608
      2021378,638,9217.40%28,004,740 2036725,961,9731.08%7,874,074
      2022406,643,6616.98%28,364,989 2037733,836,0470.95%6,971,442
      2023435,008,6506.55%28,513,181 2038740,807,4890.95%7,037,671
      2024463,521,8326.13%28,431,762 2039747,845,1600.95%7,104,529
      2025491,953,5935.71%28,105,742 2040754,949,6890.95%7,172,022
      2026520,059,3355.29%27,523,204 2041762,121,7110.95%7,240,156
      2027547,582,5394.87%26,675,768 2042769,361,8680.95%7,308,938
      2028574,258,3084.45%25,558,997 2043776,670,8050.95%7,378,373
      2029599,817,3044.03%24,172,733 2044784,049,1780.95%7,448,467
      2030623,990,0383.61%22,521,348 2045791,497,6450.95%7,519,228
      + +

      STEEM_MAX_ACCOUNT_NAME_LENGTH

      + +

      Names must comply with the following grammar (RFC 1035), i.e.: a valid name consists of a dot-separated sequence of one or more labels consisting of the following rules:

      + +
        +
      • Each label is three characters or more
      • +
      • Each label begins with a letter
      • +
      • Each label ends with a letter or digit
      • +
      • Each label contains only letters, digits or hyphens
      • +
      + +

      In addition we require the following:

      + +
        +
      • All letters are lowercase
      • +
      • Length is between (inclusive) STEEM_MIN_ACCOUNT_NAME_LENGTH (3 characters) and STEEM_MAX_ACCOUNT_NAME_LENGTH (16 characters)
      • +
      + +

      STEEM_MAX_ACCOUNT_WITNESS_VOTES

      + +

      Each account may cast up to 30 witness votes.

      + +

      STEEM_MAX_WITNESSES

      + +

      This value is set to 21, which means there are 21 witnesses cycling to produce blocks.

      + +

      Every round of block production begins with the shuffling of 21 witnesses: the top 20 witnesses (by vote), plus one randomly-selected standby witness. Each is given a turn to produce a single block at a fixed rate of one block every 3 seconds. If a witness does not produce a block in their time slot, then that time slot is skipped, and the next witness produces the next block.

      + + + +

      A permlink is a unique string identifier for a post/comment, linked to the author of the post/comment. It must not exceed 256 characters.

      + +

      STEEM_MAX_WITNESS_URL_LENGTH

      + +

      Witnesses may provide a URL in their witness proposal. It must not exceed 2,048 characters.

      + +

      STEEM_MIN_REPLY_INTERVAL

      + +

      Prior to HF20, comments (replies) could only be broadcasted once every 20 seconds, per account.

      + +

      STEEM_MIN_REPLY_INTERVAL_HF20

      + +

      In HF20, comments (replies) can be broadcasted once every 3 seconds, per account (one comment per account per block). See: #2019

      + +

      STEEM_MIN_ROOT_COMMENT_INTERVAL

      + +

      Posts (root comments) can only be broadcasted once every 5 minutes, per account.

      + +

      STEEM_MIN_PAYOUT_SBD

      + +

      Rewards of less than 0.020 SBD are considered “dust” and will not receive payout.

      + +

      STEEM_NULL_ACCOUNT

      + +

      This defines the null account used by the blockchain as the canonical account designated to burn assets.

      + +

      The blockchain checks all asset types transferred to this account, thus, even reward balances and VESTS are burned. See: operation_time_tests.cpp

      + +

      STEEM_REVERSE_AUCTION_WINDOW_SECONDS

      + +

      Prior to HF6, there was no reverse auction logic. From HF6 to HF19, the reverse auction window is 30 minutes.

      + +

      In HF20, the reverse action is being reduced to 15 minutes. See: #1874, #1878

      + +

      STEEM_SOFT_MAX_COMMENT_DEPTH

      + +

      A comment is nested at a maximum depth of 255. As a soft limit, it is enforced by the witness_plugin. See: witness_plugin.cpp

      + +

      Prior to HF17, the maximum comment depth was 6. See: #767

      + +

      STEEM_SAVINGS_WITHDRAW_TIME

      + +

      This value sets the timelock of 3 days for funds being withdrawn from savings. Funds can be transferred into savings instantly, but require 72 hours (3 days) to withdraw from savings. This will guarantee there is at least 1 business day during which you can contact your recovery agent.

      + +

      STEEM_UPVOTE_LOCKOUT_HF17

      + +

      Accounts may not increase payout within last 12 hours before payout, since HF17.

      + +

      STEEM_VESTING_WITHDRAW_INTERVALS

      + +

      Sets the power-down rate, which is fulfilled once a week over 13 weeks.

      + +

      Prior to HF16, this value was 104 weeks.

      + +

      Not Covered

      + +

      Fields not covered in this recipe are:

      + +
        +
      • SBD_SYMBOL
      • +
      • STEEM_100_PERCENT
      • +
      • STEEM_1_PERCENT
      • +
      • STEEM_ACCOUNT_RECOVERY_REQUEST_EXPIRATION_PERIOD
      • +
      • STEEM_ACTIVE_CHALLENGE_COOLDOWN
      • +
      • STEEM_ACTIVE_CHALLENGE_FEE
      • +
      • STEEM_APR_PERCENT_MULTIPLY_PER_BLOCK
      • +
      • STEEM_APR_PERCENT_MULTIPLY_PER_HOUR
      • +
      • STEEM_APR_PERCENT_MULTIPLY_PER_ROUND
      • +
      • STEEM_APR_PERCENT_SHIFT_PER_BLOCK
      • +
      • STEEM_APR_PERCENT_SHIFT_PER_HOUR
      • +
      • STEEM_APR_PERCENT_SHIFT_PER_ROUND
      • +
      • STEEM_BANDWIDTH_AVERAGE_WINDOW_SECONDS
      • +
      • STEEM_BANDWIDTH_PRECISION
      • +
      • STEEM_BLOCKCHAIN_PRECISION
      • +
      • STEEM_BLOCKCHAIN_PRECISION_DIGITS
      • +
      • STEEM_BLOCKCHAIN_HARDFORK_VERSION
      • +
      • STEEM_BLOCKCHAIN_VERSION
      • +
      • STEEM_BLOCKS_PER_DAY
      • +
      • STEEM_BLOCKS_PER_HOUR
      • +
      • STEEM_BLOCKS_PER_YEAR
      • +
      • STEEM_CASHOUT_WINDOW_SECONDS_PRE_HF12
      • +
      • STEEM_CASHOUT_WINDOW_SECONDS_PRE_HF17
      • +
      • STEEM_COMMENT_REWARD_FUND_NAME
      • +
      • STEEM_CONTENT_APR_PERCENT
      • +
      • STEEM_CONTENT_CONSTANT_HF0
      • +
      • STEEM_CONTENT_REWARD_PERCENT
      • +
      • STEEM_CONVERSION_DELAY
      • +
      • STEEM_CONVERSION_DELAY_PRE_HF_16
      • +
      • STEEM_CREATE_ACCOUNT_WITH_STEEM_MODIFIER
      • +
      • STEEM_CURATE_APR_PERCENT
      • +
      • STEEM_DEFAULT_SBD_INTEREST_RATE
      • +
      • STEEM_EQUIHASH_K
      • +
      • STEEM_EQUIHASH_N
      • +
      • STEEM_FEED_HISTORY_WINDOW_PRE_HF_16
      • +
      • STEEM_FEED_INTERVAL_BLOCKS
      • +
      • STEEM_INFLATION_RATE_START_PERCENT
      • +
      • STEEM_INFLATION_RATE_STOP_PERCENT
      • +
      • STEEM_INIT_MINER_NAME
      • +
      • STEEM_INIT_PUBLIC_KEY_STR
      • +
      • STEEM_INIT_SUPPLY
      • +
      • STEEM_INIT_TIME
      • +
      • STEEM_IRREVERSIBLE_THRESHOLD
      • +
      • STEEM_LIQUIDITY_APR_PERCENT
      • +
      • STEEM_LIQUIDITY_REWARD_BLOCKS
      • +
      • STEEM_LIQUIDITY_REWARD_PERIOD_SEC
      • +
      • STEEM_LIQUIDITY_TIMEOUT_SEC
      • +
      • STEEM_MAX_ASSET_WHITELIST_AUTHORITIES
      • +
      • STEEM_MAX_AUTHORITY_MEMBERSHIP
      • +
      • STEEM_MAX_BLOCK_SIZE
      • +
      • STEEM_SOFT_MAX_BLOCK_SIZE
      • +
      • STEEM_MAX_CASHOUT_WINDOW_SECONDS
      • +
      • STEEM_MAX_COMMENT_DEPTH
      • +
      • STEEM_MAX_COMMENT_DEPTH_PRE_HF17
      • +
      • STEEM_MAX_FEED_AGE_SECONDS
      • +
      • STEEM_MAX_INSTANCE_ID
      • +
      • STEEM_MAX_MEMO_SIZE
      • +
      • STEEM_MAX_MINER_WITNESSES_HF0
      • +
      • STEEM_MAX_MINER_WITNESSES_HF17
      • +
      • STEEM_MAX_PROXY_RECURSION_DEPTH
      • +
      • STEEM_MAX_RATION_DECAY_RATE
      • +
      • STEEM_MAX_RESERVE_RATIO
      • +
      • STEEM_MAX_RUNNER_WITNESSES_HF0
      • +
      • STEEM_MAX_RUNNER_WITNESSES_HF17
      • +
      • STEEM_MAX_SATOSHIS
      • +
      • STEEM_MAX_SHARE_SUPPLY
      • +
      • STEEM_MAX_SIG_CHECK_DEPTH
      • +
      • STEEM_MAX_TIME_UNTIL_EXPIRATION
      • +
      • STEEM_MAX_TRANSACTION_SIZE
      • +
      • STEEM_MAX_UNDO_HISTORY
      • +
      • STEEM_MAX_URL_LENGTH
      • +
      • STEEM_MAX_VOTE_CHANGES
      • +
      • STEEM_MAX_VOTED_WITNESSES_HF0
      • +
      • STEEM_MAX_VOTED_WITNESSES_HF17
      • +
      • STEEM_MAX_WITHDRAW_ROUTES
      • +
      • STEEM_MIN_ACCOUNT_CREATION_FEE
      • +
      • STEEM_MIN_ACCOUNT_NAME_LENGTH
      • +
      • STEEM_MIN_BLOCK_SIZE_LIMIT
      • +
      • STEEM_MIN_BLOCK_SIZE
      • +
      • STEEM_MIN_CONTENT_REWARD
      • +
      • STEEM_MIN_CURATE_REWARD
      • +
      • STEEM_MIN_PERMLINK_LENGTH
      • +
      • STEEM_MIN_VOTE_INTERVAL_SEC
      • +
      • STEEM_MINER_ACCOUNT
      • +
      • STEEM_MINER_PAY_PERCENT
      • +
      • STEEM_MIN_FEEDS
      • +
      • STEEM_MINING_REWARD
      • +
      • STEEM_MINING_TIME
      • +
      • STEEM_MIN_LIQUIDITY_REWARD
      • +
      • STEEM_MIN_LIQUIDITY_REWARD_PERIOD_SEC
      • +
      • STEEM_MIN_POW_REWARD
      • +
      • STEEM_MIN_PRODUCER_REWARD
      • +
      • STEEM_MIN_TRANSACTION_EXPIRATION_LIMIT
      • +
      • STEEM_MIN_TRANSACTION_SIZE_LIMIT
      • +
      • STEEM_MIN_UNDO_HISTORY
      • +
      • STEEM_NUM_INIT_MINERS
      • +
      • STEEM_OWNER_AUTH_HISTORY_TRACKING_START_BLOCK_NUM
      • +
      • STEEM_OWNER_AUTH_RECOVERY_PERIOD
      • +
      • STEEM_OWNER_CHALLENGE_COOLDOWN
      • +
      • STEEM_OWNER_CHALLENGE_FEE
      • +
      • STEEM_OWNER_UPDATE_LIMIT
      • +
      • STEEM_POST_AVERAGE_WINDOW
      • +
      • STEEM_POST_REWARD_FUND_NAME
      • +
      • STEEM_POST_WEIGHT_CONSTANT
      • +
      • STEEM_POW_APR_PERCENT
      • +
      • STEEM_PRODUCER_APR_PERCENT
      • +
      • STEEM_PROXY_TO_SELF_ACCOUNT
      • +
      • STEEM_SBD_INTEREST_COMPOUND_INTERVAL_SEC
      • +
      • STEEM_SECONDS_PER_YEAR
      • +
      • STEEM_RECENT_RSHARES_DECAY_TIME_HF19
      • +
      • STEEM_RECENT_RSHARES_DECAY_TIME_HF17
      • +
      • STEEM_ROOT_POST_PARENT
      • +
      • STEEM_SAVINGS_WITHDRAW_REQUEST_LIMIT
      • +
      • STEEM_SBD_START_PERCENT
      • +
      • STEEM_SBD_STOP_PERCENT
      • +
      • STEEM_SECOND_CASHOUT_WINDOW
      • +
      • STEEM_START_MINER_VOTING_BLOCK
      • +
      • STEEM_START_VESTING_BLOCK
      • +
      • STEEM_TEMP_ACCOUNT
      • +
      • STEEM_UPVOTE_LOCKOUT_HF7
      • +
      • STEEM_VESTING_FUND_PERCENT
      • +
      • STEEM_VESTING_WITHDRAW_INTERVALS_PRE_HF_16
      • +
      • STEEM_VESTING_WITHDRAW_INTERVAL_SECONDS
      • +
      • STEEM_VOTE_DUST_THRESHOLD
      • +
      • STEEM_VOTE_REGENERATION_SECONDS
      • +
      • STEEM_SYMBOL
      • +
      • VESTS_SYMBOL
      • +
      • STEEM_VIRTUAL_SCHEDULE_LAP_LENGTH
      • +
      • STEEM_VIRTUAL_SCHEDULE_LAP_LENGTH2
      • +
      • STEEM_MAX_LIMIT_ORDER_EXPIRATION
      • +
      • STEEM_DELEGATION_RETURN_PERIOD_HF0
      • +
      • STEEM_DELEGATION_RETURN_PERIOD_HF20
      • +
      + +

      Example Method Call

      + +
      curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_config", "params":[], "id":1}' https://api.steemit.com
      +
      + +

      Example Output

      + +
      {
      +   "id":1,
      +   "jsonrpc":"2.0",
      +   "result":{
      +      "IS_TEST_NET":false,
      +      "STEEM_ENABLE_SMT":false,
      +      "SBD_SYMBOL":null,
      +      "STEEM_INITIAL_VOTE_POWER_RATE":40,
      +      "STEEM_REDUCED_VOTE_POWER_RATE":10,
      +      "STEEM_100_PERCENT":10000,
      +      "STEEM_1_PERCENT":100,
      +      "STEEM_ACCOUNT_RECOVERY_REQUEST_EXPIRATION_PERIOD":"86400000000",
      +      "STEEM_ACTIVE_CHALLENGE_COOLDOWN":"86400000000",
      +      "STEEM_ACTIVE_CHALLENGE_FEE":{"amount":"2000", "precision":3, "nai":"@@000000021"},
      +      "STEEM_ADDRESS_PREFIX":"STM",
      +      "STEEM_APR_PERCENT_MULTIPLY_PER_BLOCK":"102035135585887",
      +      "STEEM_APR_PERCENT_MULTIPLY_PER_HOUR":"119577151364285",
      +      "STEEM_APR_PERCENT_MULTIPLY_PER_ROUND":"133921203762304",
      +      "STEEM_APR_PERCENT_SHIFT_PER_BLOCK":87,
      +      "STEEM_APR_PERCENT_SHIFT_PER_HOUR":77,
      +      "STEEM_APR_PERCENT_SHIFT_PER_ROUND":83,
      +      "STEEM_BANDWIDTH_AVERAGE_WINDOW_SECONDS":604800,
      +      "STEEM_BANDWIDTH_PRECISION":1000000,
      +      "STEEM_BLOCKCHAIN_PRECISION":1000,
      +      "STEEM_BLOCKCHAIN_PRECISION_DIGITS":3,
      +      "STEEM_BLOCKCHAIN_HARDFORK_VERSION":"0.19.0",
      +      "STEEM_BLOCKCHAIN_VERSION":"0.19.10",
      +      "STEEM_BLOCK_INTERVAL":3,
      +      "STEEM_BLOCKS_PER_DAY":28800,
      +      "STEEM_BLOCKS_PER_HOUR":1200,
      +      "STEEM_BLOCKS_PER_YEAR":10512000,
      +      "STEEM_CASHOUT_WINDOW_SECONDS":604800,
      +      "STEEM_CASHOUT_WINDOW_SECONDS_PRE_HF12":86400,
      +      "STEEM_CASHOUT_WINDOW_SECONDS_PRE_HF17":43200,
      +      "STEEM_CHAIN_ID":"0000000000000000000000000000000000000000000000000000000000000000",
      +      "STEEM_CHAIN_ID_NAME":"",
      +      "STEEM_COMMENT_REWARD_FUND_NAME":"comment",
      +      "STEEM_CONTENT_APR_PERCENT":3875,
      +      "STEEM_CONTENT_CONSTANT_HF0":"2000000000000",
      +      "STEEM_CONTENT_REWARD_PERCENT":7500,
      +      "STEEM_CONVERSION_DELAY":"302400000000",
      +      "STEEM_CONVERSION_DELAY_PRE_HF_16":"604800000000",
      +      "STEEM_CREATE_ACCOUNT_DELEGATION_RATIO":5,
      +      "STEEM_CREATE_ACCOUNT_DELEGATION_TIME":"2592000000000",
      +      "STEEM_CREATE_ACCOUNT_WITH_STEEM_MODIFIER":30,
      +      "STEEM_CURATE_APR_PERCENT":3875,
      +      "STEEM_DEFAULT_SBD_INTEREST_RATE":1000,
      +      "STEEM_EQUIHASH_K":6,
      +      "STEEM_EQUIHASH_N":140,
      +      "STEEM_FEED_HISTORY_WINDOW":84,
      +      "STEEM_FEED_HISTORY_WINDOW_PRE_HF_16":168,
      +      "STEEM_FEED_INTERVAL_BLOCKS":1200,
      +      "STEEM_GENESIS_TIME":"2016-03-24T16:00:00",
      +      "STEEM_HARDFORK_REQUIRED_WITNESSES":17,
      +      "STEEM_INFLATION_NARROWING_PERIOD":250000,
      +      "STEEM_INFLATION_RATE_START_PERCENT":978,
      +      "STEEM_INFLATION_RATE_STOP_PERCENT":95,
      +      "STEEM_INIT_MINER_NAME":"initminer",
      +      "STEEM_INIT_PUBLIC_KEY_STR":"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX",
      +      "STEEM_INIT_SUPPLY":0,
      +      "STEEM_INIT_TIME":"1970-01-01T00:00:00",
      +      "STEEM_IRREVERSIBLE_THRESHOLD":7500,
      +      "STEEM_LIQUIDITY_APR_PERCENT":750,
      +      "STEEM_LIQUIDITY_REWARD_BLOCKS":1200,
      +      "STEEM_LIQUIDITY_REWARD_PERIOD_SEC":3600,
      +      "STEEM_LIQUIDITY_TIMEOUT_SEC":"604800000000",
      +      "STEEM_MAX_ACCOUNT_NAME_LENGTH":16,
      +      "STEEM_MAX_ACCOUNT_WITNESS_VOTES":30,
      +      "STEEM_MAX_ASSET_WHITELIST_AUTHORITIES":10,
      +      "STEEM_MAX_AUTHORITY_MEMBERSHIP":10,
      +      "STEEM_MAX_BLOCK_SIZE":393216000,
      +      "STEEM_SOFT_MAX_BLOCK_SIZE":2097152,
      +      "STEEM_MAX_CASHOUT_WINDOW_SECONDS":1209600,
      +      "STEEM_MAX_COMMENT_DEPTH":65535,
      +      "STEEM_MAX_COMMENT_DEPTH_PRE_HF17":6,
      +      "STEEM_MAX_FEED_AGE_SECONDS":604800,
      +      "STEEM_MAX_INSTANCE_ID":"281474976710655",
      +      "STEEM_MAX_MEMO_SIZE":2048,
      +      "STEEM_MAX_WITNESSES":21,
      +      "STEEM_MAX_MINER_WITNESSES_HF0":1,
      +      "STEEM_MAX_MINER_WITNESSES_HF17":0,
      +      "STEEM_MAX_PERMLINK_LENGTH":256,
      +      "STEEM_MAX_PROXY_RECURSION_DEPTH":4,
      +      "STEEM_MAX_RATION_DECAY_RATE":1000000,
      +      "STEEM_MAX_RESERVE_RATIO":20000,
      +      "STEEM_MAX_RUNNER_WITNESSES_HF0":1,
      +      "STEEM_MAX_RUNNER_WITNESSES_HF17":1,
      +      "STEEM_MAX_SATOSHIS":"4611686018427387903",
      +      "STEEM_MAX_SHARE_SUPPLY":"1000000000000000",
      +      "STEEM_MAX_SIG_CHECK_DEPTH":2,
      +      "STEEM_MAX_TIME_UNTIL_EXPIRATION":3600,
      +      "STEEM_MAX_TRANSACTION_SIZE":65536,
      +      "STEEM_MAX_UNDO_HISTORY":10000,
      +      "STEEM_MAX_URL_LENGTH":127,
      +      "STEEM_MAX_VOTE_CHANGES":5,
      +      "STEEM_MAX_VOTED_WITNESSES_HF0":19,
      +      "STEEM_MAX_VOTED_WITNESSES_HF17":20,
      +      "STEEM_MAX_WITHDRAW_ROUTES":10,
      +      "STEEM_MAX_WITNESS_URL_LENGTH":2048,
      +      "STEEM_MIN_ACCOUNT_CREATION_FEE":1,
      +      "STEEM_MIN_ACCOUNT_NAME_LENGTH":3,
      +      "STEEM_MIN_BLOCK_SIZE_LIMIT":65536,
      +      "STEEM_MIN_BLOCK_SIZE":115,
      +      "STEEM_MIN_CONTENT_REWARD":{"amount":"1000", "precision":3, "nai":"@@000000021"},
      +      "STEEM_MIN_CURATE_REWARD":{"amount":"1000", "precision":3, "nai":"@@000000021"},
      +      "STEEM_MIN_PERMLINK_LENGTH":0,
      +      "STEEM_MIN_REPLY_INTERVAL":20000000,
      +      "STEEM_MIN_REPLY_INTERVAL_HF20":3000000,
      +      "STEEM_MIN_ROOT_COMMENT_INTERVAL":300000000,
      +      "STEEM_MIN_VOTE_INTERVAL_SEC":3,
      +      "STEEM_MINER_ACCOUNT":"miners",
      +      "STEEM_MINER_PAY_PERCENT":100,
      +      "STEEM_MIN_FEEDS":7,
      +      "STEEM_MINING_REWARD":{"amount":"1000", "precision":3, "nai":"@@000000021"},
      +      "STEEM_MINING_TIME":"2016-03-24T17:00:00",
      +      "STEEM_MIN_LIQUIDITY_REWARD":{"amount":"1200000", "precision":3, "nai":"@@000000021" },
      +      "STEEM_MIN_LIQUIDITY_REWARD_PERIOD_SEC":60000000,
      +      "STEEM_MIN_PAYOUT_SBD":{"amount":"20", "precision":3, "nai":"@@000000013"},
      +      "STEEM_MIN_POW_REWARD":{"amount":"1000", "precision":3, "nai":"@@000000021"},
      +      "STEEM_MIN_PRODUCER_REWARD":{"amount":"1000", "precision":3, "nai":"@@000000021"},
      +      "STEEM_MIN_TRANSACTION_EXPIRATION_LIMIT":15,
      +      "STEEM_MIN_TRANSACTION_SIZE_LIMIT":1024,
      +      "STEEM_MIN_UNDO_HISTORY":10,
      +      "STEEM_NULL_ACCOUNT":"null",
      +      "STEEM_NUM_INIT_MINERS":1,
      +      "STEEM_OWNER_AUTH_HISTORY_TRACKING_START_BLOCK_NUM":3186477,
      +      "STEEM_OWNER_AUTH_RECOVERY_PERIOD":"2592000000000",
      +      "STEEM_OWNER_CHALLENGE_COOLDOWN":"86400000000",
      +      "STEEM_OWNER_CHALLENGE_FEE":{"amount":"30000", "precision":3, "nai":"@@000000021"},
      +      "STEEM_OWNER_UPDATE_LIMIT":3600000000,
      +      "STEEM_POST_AVERAGE_WINDOW":86400,
      +      "STEEM_POST_REWARD_FUND_NAME":"post",
      +      "STEEM_POST_WEIGHT_CONSTANT":1600000000,
      +      "STEEM_POW_APR_PERCENT":750,
      +      "STEEM_PRODUCER_APR_PERCENT":750,
      +      "STEEM_PROXY_TO_SELF_ACCOUNT":"",
      +      "STEEM_SBD_INTEREST_COMPOUND_INTERVAL_SEC":2592000,
      +      "STEEM_SECONDS_PER_YEAR":31536000,
      +      "STEEM_RECENT_RSHARES_DECAY_TIME_HF19":"1296000000000",
      +      "STEEM_RECENT_RSHARES_DECAY_TIME_HF17":"2592000000000",
      +      "STEEM_REVERSE_AUCTION_WINDOW_SECONDS":1800,
      +      "STEEM_ROOT_POST_PARENT":"",
      +      "STEEM_SAVINGS_WITHDRAW_REQUEST_LIMIT":100,
      +      "STEEM_SAVINGS_WITHDRAW_TIME":"259200000000",
      +      "STEEM_SBD_START_PERCENT":200,
      +      "STEEM_SBD_STOP_PERCENT":500,
      +      "STEEM_SECOND_CASHOUT_WINDOW":2592000,
      +      "STEEM_SOFT_MAX_COMMENT_DEPTH":255,
      +      "STEEM_START_MINER_VOTING_BLOCK":864000,
      +      "STEEM_START_VESTING_BLOCK":201600,
      +      "STEEM_TEMP_ACCOUNT":"temp",
      +      "STEEM_UPVOTE_LOCKOUT_HF7":60000000,
      +      "STEEM_UPVOTE_LOCKOUT_HF17":"43200000000",
      +      "STEEM_VESTING_FUND_PERCENT":1500,
      +      "STEEM_VESTING_WITHDRAW_INTERVALS":13,
      +      "STEEM_VESTING_WITHDRAW_INTERVALS_PRE_HF_16":104,
      +      "STEEM_VESTING_WITHDRAW_INTERVAL_SECONDS":604800,
      +      "STEEM_VOTE_DUST_THRESHOLD":50000000,
      +      "STEEM_VOTE_REGENERATION_SECONDS":432000,
      +      "STEEM_SYMBOL":null,
      +      "VESTS_SYMBOL":null,
      +      "STEEM_VIRTUAL_SCHEDULE_LAP_LENGTH":"18446744073709551615",
      +      "STEEM_VIRTUAL_SCHEDULE_LAP_LENGTH2":"340282366920938463463374607431768211455",
      +      "STEEM_MAX_LIMIT_ORDER_EXPIRATION":2419200,
      +      "STEEM_DELEGATION_RETURN_PERIOD_HF0":604800,
      +      "STEEM_DELEGATION_RETURN_PERIOD_HF20":864000
      +   }
      +}
      +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-recipes/understanding-dynamic-global-properties.html b/docs/tutorials-recipes/understanding-dynamic-global-properties.html new file mode 100644 index 0000000000000000000000000000000000000000..0667f7403ce90129ffd685f609891a2accc036cc --- /dev/null +++ b/docs/tutorials-recipes/understanding-dynamic-global-properties.html @@ -0,0 +1,648 @@ + + + + + + + + + + + + + + + + + + +Understanding Dynamic Global Properties | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + Understanding Dynamic Global Properties + + +

      + +

      Maintains global state information

      +
      + + +

      Intro

      + +

      Dynamic Global Properties represents a set of values that are calculated during normal chain operations and reflect the current values of global blockchain properties.

      + +

      The API returns an object containing information that changes every block interval such as the head block number, the total vesting fund, etc.

      + +

      Sections

      + + + +

      head_block_number

      + +

      Block height at the head of the blockchain. This represents the latest block produced by witnesses.

      + +
        +
      • example: 24155032
      • +
      + +

      head_block_id

      + +

      Used to implement TaPoS (Transaction as Proof of Stake). The first 4 bytes (8 hex digits) of the block ID represents the block number. E.g., 01709398 in hex is 24155032 in decimal.

      + + + +

      time

      + +

      Point in time (UTC) that the block was included in the chain.

      + +

      Used to synchronize events like Hard Fork activation.

      + +

      When attempting to calculate the validity of a transaction we need to lookup a past block and check its block hash and the time it occurred so we can calculate whether the current transaction is valid and at what time it should expire.

      + +

      For new transactions, expirations originate from this time.

      + +
        +
      • example: 2018-07-14T01:19:51
      • +
      + +

      current_witness

      + +

      Account name of the current witness.

      + +
        +
      • example: blocktrades
      • +
      + +

      total_powDeprecated

      + +

      The total POW accumulated, aka the sum of num_pow_witness at the time new POW is added.

      + +
        +
      • example: 514415
      • +
      + +

      num_pow_witnessesDeprecated

      + +

      The current count of how many pending POW witnesses there are, determines the difficulty of doing pow.

      + +
        +
      • example: 172
      • +
      + +

      virtual_supply

      + +

      The virtual supply is the supply of all STEEM + all SBD if all SBD were converted to STEEM at the current median price.

      + +
        +
      • example: 283290592.652 STEEM
      • +
      + +

      current_supply

      + +

      STEEM currently in existence.

      + +
        +
      • example: 271546371.129 STEEM
      • +
      + +

      confidential_supply

      + +

      Total asset held in confidential balances.

      + +
        +
      • example: 0.000 STEEM
      • +
      + +

      current_sbd_supply

      + +

      SBD currently in existence.

      + +
        +
      • example: 15478883.968 SBD
      • +
      + +

      confidential_sbd_supply

      + +

      Total asset held in confidential balances.

      + +
        +
      • example: 0.000 SBD
      • +
      + +

      total_vesting_fund_steem Deprecated

      + +

      Now deprecated way to get STEEM that is invested in STEEM POWER (powered up).

      + +

      Use condenser_api.get_reward_fund instead.

      + +
        +
      • example: 192713261.007 STEEM
      • +
      + +

      total_vesting_shares

      + +

      VESTS that are invested in STEEM POWER (powered up).

      + +
        +
      • example: 390950506702.452773 VESTS
      • +
      + +

      total_reward_fund_steem

      + +

      STEEM available in the reward pool.

      + +
        +
      • example: 0.000 STEEM
      • +
      + +

      total_reward_shares2 Deprecated

      + +

      Now deprecated way to get the number of shares in the pool.

      + +

      Use condenser_api.get_reward_fund instead.

      + +
        +
      • example: 0
      • +
      + +

      sbd_interest_rate

      + +

      This property defines the interest rate that SBD deposits receive.

      + +
        +
      • example: 0
      • +
      + +

      maximum_block_size

      + +

      Maximum block size is decided by the set of active witnesses which change every round. Each witness posts what they think the maximum size should be as part of their witness properties, the median size is chosen to be the maximum block size for the round.

      + +

      Note: the minimum value for maximum_block_size is defined by the protocol to prevent the network from getting stuck by witnesses attempting to set this too low.

      + +
        +
      • example: 65536
      • +
      + +

      current_aslot

      + +

      The current absolute slot number. Equal to the total number of slots since genesis. Also equal to the total number of missed slots plus head_block_number.

      + +
        +
      • example: 24231997
      • +
      + +

      recent_slots_filled

      + +

      Used to compute witness participation.

      + +
        +
      • example: 340282366920938463463374607431768211455
      • +
      + +

      last_irreversible_block_num

      + +

      The latest block number that has been confirmed by two thirds of all block producers and is thus irreversible.

      + +
        +
      • example: 24155017
      • +
      + +

      vote_power_reserve_rate

      + +

      The number of votes regenerated per day. Any user voting slower than this rate will be “wasting” voting power through spillover; any user voting faster than this rate will have their votes reduced.

      + +
        +
      • example: 10
      • +
      + +

      average_block_size Removed

      + +

      Removed in 0.20.6, see: #3029

      + +

      Average block size is updated every block to be: average_block_size = (99 * average_block_size + new_block_size) / 100. This property is used to update the current_reserve_ratio to maintain approximately * 50% or less utilization of network capacity.

      + +
        +
      • example: 9309
      • +
      + +

      current_reserve_ratio Removed

      + +

      Removed in 0.20.6, see: #3029

      + +

      Any time average_block_size <= 50% maximum_block_size this value grows by 1 until it reaches STEEM_MAX_RESERVE_RATIO. Any time average_block_size is greater than 50% it falls by 1%. Upward adjustments happen once per round, downward adjustments happen every block.

      + +
        +
      • example: 200000000
      • +
      + +

      max_virtual_bandwidth Removed

      + +

      Removed in 0.20.6, see: #3029

      + +

      The maximum bandwidth the blockchain can support is max_bandwidth = maximum_block_size * STEEM_BANDWIDTH_AVERAGE_WINDOW_SECONDS / STEEM_BLOCK_INTERVAL; The maximum virtual bandwidth is: max_bandwidth * current_reserve_ratio

      + +
        +
      • example: 264241152000000000000
      • +
      + +

      Not Covered

      + +

      Fields not covered in this recipe are:

      + +
        +
      • confidential_supply
      • +
      • confidential_sbd_supply
      • +
      • pending_rewarded_vesting_shares
      • +
      • pending_rewarded_vesting_steem
      • +
      • sbd_print_rate
      • +
      • participation_count
      • +
      + +

      Example Method Call

      + +

      To retrieve the current results for condenser_api.get_dynamic_global_properties, we can retrieve the current state information using curl:

      + +
      curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}' https://api.steemit.com
      +
      + +

      Example Output

      + +
      {
      +   "id":1,
      +   "jsonrpc":"2.0",
      +   "result":{
      +      "head_block_number":24238248,
      +      "head_block_id":"0171d8a833dc369abd034b0c67d8725f96df9e5b",
      +      "time":"2018-07-16T22:41:24",
      +      "current_witness":"xeldal",
      +      "total_pow":514415,
      +      "num_pow_witnesses":172,
      +      "virtual_supply":"283434761.199 STEEM",
      +      "current_supply":"271729171.190 STEEM",
      +      "confidential_supply":"0.000 STEEM",
      +      "current_sbd_supply":"15498201.173 SBD",
      +      "confidential_sbd_supply":"0.000 SBD",
      +      "total_vesting_fund_steem":"192913644.627 STEEM",
      +      "total_vesting_shares":"391296886352.617261 VESTS",
      +      "total_reward_fund_steem":"0.000 STEEM",
      +      "total_reward_shares2":"0",
      +      "pending_rewarded_vesting_shares":"379159224.860656 VESTS",
      +      "pending_rewarded_vesting_steem":"185294.019 STEEM",
      +      "sbd_interest_rate":0,
      +      "sbd_print_rate":2933,
      +      "maximum_block_size":65536,
      +      "current_aslot":24315228,
      +      "recent_slots_filled":"340282366920938463463374607431768211400",
      +      "participation_count":128,
      +      "last_irreversible_block_num":24238230,
      +      "vote_power_reserve_rate":10
      +   }
      +}
      +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-recipes/vest-to-steem.html b/docs/tutorials-recipes/vest-to-steem.html new file mode 100644 index 0000000000000000000000000000000000000000..fcc960ac2308afd020952f103895fb20846ee80e --- /dev/null +++ b/docs/tutorials-recipes/vest-to-steem.html @@ -0,0 +1,409 @@ + + + + + + + + + + + + + + + + + + +Converting VESTS to STEEM | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + Converting VESTS to STEEM + + +

      + +

      How to convert VESTS to STEEM or STEEM POWER

      +
      + + +

      Intro

      + +

      Steem’s has base unit is VESTS and usually user doesn’t know about this unit because everything is dynamically calucated and presented in STEEM form for convenience of the user. In this recipe we will talk about how converting is working behind the scenes on all Steem apps. Dynamic Global Properties are used in this recipe to fetch the current values of global blockchain properties.

      + +

      Steps

      + +
        +
      1. Get Dynamic Global Properties Fetch current values of global blockchain properties
      2. +
      3. Formulate VESTS_TO_STEEM Formulate function that will convert given VESTS to STEEM.
      4. +
      + +

      1. Get Dynamic Global Properties

      + +

      Following method can be used to fetch global values

      + +
      curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}' https://api.steemit.com
      +
      + +
      Example Output
      + +
      {
      +   "id":1,
      +   "jsonrpc":"2.0",
      +   "result":{
      +      "head_block_number":24238248,
      +      "head_block_id":"0171d8a833dc369abd034b0c67d8725f96df9e5b",
      +      "time":"2018-07-16T22:41:24",
      +      "current_witness":"xeldal",
      +      "total_pow":514415,
      +      "num_pow_witnesses":172,
      +      "virtual_supply":"283434761.199 STEEM",
      +      "current_supply":"271729171.190 STEEM",
      +      "confidential_supply":"0.000 STEEM",
      +      "current_sbd_supply":"15498201.173 SBD",
      +      "confidential_sbd_supply":"0.000 SBD",
      +      "total_vesting_fund_steem":"192913644.627 STEEM",
      +      "total_vesting_shares":"391296886352.617261 VESTS",
      +      "total_reward_fund_steem":"0.000 STEEM",
      +      "total_reward_shares2":"0",
      +      "pending_rewarded_vesting_shares":"379159224.860656 VESTS",
      +      "pending_rewarded_vesting_steem":"185294.019 STEEM",
      +      "sbd_interest_rate":0,
      +      "sbd_print_rate":2933,
      +      "maximum_block_size":65536,
      +      "current_aslot":24315228,
      +      "recent_slots_filled":"340282366920938463463374607431768211400",
      +      "participation_count":128,
      +      "last_irreversible_block_num":24238230,
      +      "vote_power_reserve_rate":10,
      +      "average_block_size":10950,
      +      "current_reserve_ratio":200000000,
      +      "max_virtual_bandwidth":"264241152000000000000"
      +   }
      +}
      +
      + +

      2. Formulate VESTS_TO_STEEM

      + +

      From above results we have everything we need to calculate STEEM from given VESTS value.

      + +

      Let’s say we have been given availableVESTS variable, value in VESTS and we want to convert that to STEEM. By using values from above returned object our formula would be as follows:

      + +
      vestSteem = ( result.total_vesting_fund_steem x availableVESTS ) / result.total_vesting_shares
      +
      + +

      That’s it!

      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-recipes/virtual-operations-when-streaming-blockchain-transactions.html b/docs/tutorials-recipes/virtual-operations-when-streaming-blockchain-transactions.html new file mode 100644 index 0000000000000000000000000000000000000000..ed69bce44872ba76e7800cd1e630772f5449bfd8 --- /dev/null +++ b/docs/tutorials-recipes/virtual-operations-when-streaming-blockchain-transactions.html @@ -0,0 +1,463 @@ + + + + + + + + + + + + + + + + + + +Streaming blockchain transactions | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + Streaming blockchain transactions + + +

      + +

      Including virtual operations when streaming blockchain transactions

      +
      + + +

      This recipe will take you through the process of streaming blockchain transactions, both from head_block_num and last_irreversible_block_num, and explain the presence/absence of virtual operations in the streamed transactions.

      + +

      Intro

      + +

      There are two points from which Steem blockchain transactions can be streamed to give a “live” view of what’s happening on the blockchain. The first is from the head block which is the most recent block created on the chain (every 3 seconds when a new block is created). The second, is from the last irreversible block which is the newest block that has been confirmed by a sufficient number of block producers so that it can no longer be invalidated. This is not a live view but it is normally not far behind the head block number.

      + +

      There is already a javascript tutorial on the devportal describing how to stream blockchain transactions. This recipe will go into further detail on operations on each block and more specifically the virtual operations that are executed with every new block. We will also assume that you have already run through the basic tutorials on the Steem blockchain and will focus more on the specific functions and outputs pertinent to this topic.

      + +

      Steps

      + +
        +
      1. Blocks, transactions and operations
      2. +
      3. Virtual operation streaming
      4. +
      + +

      1. Blocks, transactions and operations

      + +

      In order to stream a block and get the information as will be shown below we use the blockchain api in the dsteem library. The below method has an option parameter mode that defaults to irreversible but can be set to latest which would then return the head block. This means that both types of blocks can be streamed.

      + +
      stream = client.blockchain.getBlockStream();
      +    stream
      +        .on('data', function(block) {
      +            console.log(block);
      +            ...
      +            ...
      +
      + +

      Below is an example of what a block looks like:

      + +
      {
      +  "block_id":"017fa2a9b142cd8d3607b7e7421412402bf97957",
      +  "extensions":[],
      +  "previous":"017fa2a867978140e7553bbfd65396a5a8136d53",
      +  "signing_key":"STM5gBt5xvdb5vhmXjBqfzQ7vwr4hFF5rjmYmZnSbzdb9eWmk9or5",
      +  "timestamp":"2018-08-17T08:31:48",
      +  "transaction_ids": [],
      +  "transaction_merkle_root":"4f0d61928ce9595aec6558fb53f1af1b8de06d78",
      +  "transactions": [],
      +  "witness":"smooth.witness",
      +  "witness_signature":"204e00e747ce75b24fc26b5d18f12992197c61de0bf27c830416761bd25648238239c5eb26a5e392d474e27c601842e2ccf105ffb47f5a5712727412a18f106dbb"
      +}
      +
      + +

      Each block contains transactions:

      + +
      {
      +  "block_num": 25141929,
      +  "expiration": "2018-08-17T08:41:42",
      +  "extensions": [],
      +  "operations": [],
      +  "ref_block_num": 41616,
      +  "ref_block_prefix": 3838737669,
      +  "signatures": ["1f261ccf59131dcd10334a40b8b76bd2e80b05eee1c8deaedb…ebb7e4a4d6e22f7823940248f1488978d4ec8ecbd8abbd88e"],
      +  "transaction_id": "a972aef3388908f8a4b4a8d889fb89c83d2b8eb3",
      +  "transaction_num": 0
      +}
      +
      + +

      And each transaction contains operations:

      + +
      [
      +  "vote", 
      +  {
      +    "author":"skmedia",
      +    "permlink":"buynearn-new-mlm-plan-launched-4th-june-2018-new-mlm-plan-2018-10inr-4-buynearn-online",
      +    "voter":"nazann",
      +    "weight":4700  
      +  }
      +]
      +
      + +

      2. Virtual operation streaming

      + +

      Virtual operations (curation rewards, etc) are derived from blockchain activity, but aren’t actually stored as operations themselves. They happen based on consensus from the blockchain based on other user initiated operations. These virtual operations are NOT available on the head block, so a 100% live feed of this information would not be possible. In order then to follow these operations you would have to stream the last_irreversible_block. To get a feed of virtual operations, each of the block transactions needs to be investigated for the type of the operations.

      + +

      steem-python provides a very simple method to stream virtual or any other operations directly:

      + +
      from steem import Steem
      +from steem.blockchain import Blockchain
      +import pprint
      +s = Steem()
      +b = Blockchain(s)
      +
      +for op in b.stream('author_reward'):
      +    pprint.pprint(op)
      +    # break
      +
      + +

      With result:

      + +
      {
      +  "_id": "11cb40b9283c8a89ed5d8c348cbc68d76a9d8bd3",
      +  "author": "hopehash",
      +  "block_num": 25145619,
      +  "permlink": "hopehash-btc-1-057",
      +  "sbd_payout": "0.000 SBD",
      +  "steem_payout": "2.341 STEEM",
      +  "timestamp": "2018-08-17T17:11:36.18",
      +  "trx_id": "0000000000000000000000000000000000000000",
      +  "type": "author_reward",
      +  "vesting_payout": "4740.455508 VESTS"
      +}
      +
      + +

      From the above example all operations of type “author_reward” will be printed on the console/terminal. You can change the type to which ever operation you want to stream or remove the parameter and stream all operations. The same logic can be followed when using steem-js by isolating the operations of each transaction and looking for the required operation type. Below example is again a modification of the tutorial initially referenced.

      + +
      stream = client.blockchain.getBlockStream();
      +    stream
      +        .on('data', function(block) {
      +            let x = 0
      +            while (x < block.transactions.length) {
      +                if (block.transactions[x].operations[0][0] = 'author_reward') {
      +                    console.log(block.transactions[x].operations[0]);
      +                }
      +                x += 1
      +            }
      +        });
      +
      + +

      That’s all there is to it.

      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/blog_feed.html b/docs/tutorials-ruby/blog_feed.html new file mode 100644 index 0000000000000000000000000000000000000000..ab89a7beb31d4a0fa2e350115dc476c360c490e7 --- /dev/null +++ b/docs/tutorials-ruby/blog_feed.html @@ -0,0 +1,396 @@ + + + + + + + + + + + + + + + + + + +RB: Blog Feed | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Blog Feed + + +

      + +

      This example will output blog details to the terminal for the author specified, limited to five results.

      +
      + + +

      Full, runnable src of Blog Feed can be downloaded as part of the RB tutorials repository. +

      + +

      Script

      + +

      The script parses the creation date, assuming Zulu timezone (AKA UTC).

      + +

      The output will be the latest five posts/reblogs for the account specified. If the author is the same as the account specified, it is assumed to be a post by this account. Otherwise, it is assumed to be a reblog.

      + +

      It also counts the words in the content body by splitting the text into an array of strings, delimited by whitespace.

      + +

      Finally, it creates the canonical URL by combining parent_permlink, author, and permlink.

      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/01_blog_feed
      +bundle install
      +ruby blog_feed.rb steemitblog
      +
      + +

      Example Output

      + +
      2018-03-24 17:30:36 UTC
      +  Post: Happy 2nd Birthday Steem Blockchain
      +  By: steemitblog
      +  Words: 301
      +  https://steemit.com/steem/@steemitblog/happy-2nd-birthday-steem-blockchain
      +2018-03-07 20:56:36 UTC
      +  Post: Join Team Steemit at TokenFest!
      +  By: steemitblog
      +  Words: 104
      +  https://steemit.com/steemit/@steemitblog/join-team-steemit-at-tokenfest
      +2018-02-27 20:18:36 UTC
      +  Post: Smart Media Token Development
      +  By: steemitblog
      +  Words: 699
      +  https://steemit.com/smt/@steemitblog/smart-media-token-development
      +2018-02-25 20:55:24 UTC
      +  Reblog: I filmed this video of @ned @pkattera and @sneak talking about the SMTs and the future of Steemit
      +  By: ruwan
      +  Words: 89
      +  https://steemit.com/steemit/@ruwan/i-filmed-this-video-of-ned-pkattera-and-sneak-talking-about-the-smts-and-the-future-of-steemit
      +2018-02-22 17:41:00 UTC
      +  Post: STEEM 및 SBD가 GOPAX에 상장되었습니다
      +  By: steemitblog
      +  Words: 317
      +  https://steemit.com/gopax/@steemitblog/steem-sbd-gopa
      +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/edit_content_patching.html b/docs/tutorials-ruby/edit_content_patching.html new file mode 100644 index 0000000000000000000000000000000000000000..81513e13f7db200cb58839447b0c606c8c4ff0f3 --- /dev/null +++ b/docs/tutorials-ruby/edit_content_patching.html @@ -0,0 +1,404 @@ + + + + + + + + + + + + + + + + + + +RB: Edit Content Patching | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Edit Content Patching + + +

      + +
      +
      + + +

      Full, runnable src of Edit Content Patching can be downloaded as part of the RB tutorials repository. +

      + +

      title: How to edit a Post +position: 5 +exclude: true +layout: main-script +description: Patching changes to a post on Steem. +main_script: tutorials-ruby/edit_content_patching.rb +main_type: ruby +main_script_anchor: Script +—

      + +

      Intro

      + +

      This tutorial will show a technique for efficiently editing a post by only broadcasting changes to the post body.

      + +

      Script

      + +

      This script will take an existing post and append a new line by broadcasting a comment operation containing a diff instruction. This instruction will tell the blockchain to append new content to the end of the body of the original comment.

      + +

      Because this is a live example, we set broadcast to false so that it only runs if you modify the example and set broadcast to true.

      + +

      As stated earlier, you will need to change broadcast to true. You can also set other values to test this script on other post:

      + +
        +
      • wif - The posting key of the author.
      • +
      • author - Name of the account that wrote the post we’re modifying.
      • +
      • title - Title of the post.
      • +
      • permlink - Leave this if the permlink is derived from the title or set it to the original permlink if you want to modify the title independently from the permlink.
      • +
      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/12_edit_content_patching
      +bundle install
      +ruby edit_content_patching.rb
      +
      + +

      Example Output

      + +
      Changes:
      +@@ -26,8 +26,26 @@
      +  edited)
      ++%0AAppended content.
      +{
      +  "jsonrpc": "2.0",
      +  "result": {
      +    "id": "f327acc1c51d907a9ba9bfac70e6fc9e99ab2865",
      +    "block_num": 23035803,
      +    "trx_num": 0,
      +    "expired": false
      +  },
      +  "id": 1
      +}
      +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/follow_another_user.html b/docs/tutorials-ruby/follow_another_user.html new file mode 100644 index 0000000000000000000000000000000000000000..9dd414e825bbbd8cffb551854761942be05fb017 --- /dev/null +++ b/docs/tutorials-ruby/follow_another_user.html @@ -0,0 +1,419 @@ + + + + + + + + + + + + + + + + + + +RB: Follow Another User | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Follow Another User + + +

      + +

      How to follow/unfollow another user.

      +
      + + +

      Full, runnable src of Follow Another User can be downloaded as part of the RB tutorials repository. +

      + +

      This tutorial will take you through the process of following/muting/unfollowing/ummuting an author and checking the follow status of an author.

      + +

      Sections

      + +
        +
      1. Follow
      2. +
      3. Check Follow
      4. +
      5. To Run - Running the example.
      6. +
      + +

      Follow

      + +

      In the first example script, we can modify the initial configuration then run:

      + +
      ruby follow.rb
      +
      + +

      Follows (and mutes) are expressed by custom_json with id=follow (mutes also use id=follow).

      + +

      Example custom_json operation:

      + +
      {
      +  "id": "follow",
      +  "required_auths": [],
      +  "required_posting_auths": ["social"],
      +  "json": "[\"follow\",{\"follower\":\"social\",\"following\":\"alice\",\"what\":[\"blog\"]}]"
      +}
      +
      + +

      To broadcast this operation, use the posting wif and matching account name in required_posting_auths. There are three variables required in the json field of the above operation:

      + +
        +
      1. follower - The specific account that will select the author to follow/unfollow.
      2. +
      3. following - The account/author that the account would like to follow.
      4. +
      5. what - The type of follow operation. This variable can have one of three values: blog to follow an author, ignore to mute, and an empty string to unfollow/unmute.
      6. +
      + +

      Check Follow

      + +

      In the second example script:

      + +
      ruby check_follow.rb
      +
      + +

      The API method we’re using here is condenser.get_following. We pass the name of the account we’re checking. If the account follows more than 1,000 other accounts, we execute condenser.get_following multiple times and pass the last followed account we know about to get the next 1,000 (passing the latest follows.last each time).

      + +

      We also specify blog to tell the API method that we’re looking for followed, not muted (to locate muted accounts, use ignore instead of blog).

      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/18_follow_another_user
      +bundle install
      +ruby follow.rb
      +
      + +

      Example Output

      + +
      {
      +  "jsonrpc": "2.0",
      +  "result": {
      +    "id": "025688e27999d3aa514f1f0b77c9f8d8dae31d72",
      +    "block_num": 26349355,
      +    "trx_num": 3,
      +    "expired": false
      +  },
      +  "id": 3
      +}
      +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/get_account_comments.html b/docs/tutorials-ruby/get_account_comments.html new file mode 100644 index 0000000000000000000000000000000000000000..9befc693a4ca947df7aa8478fe46ae5c755f51c0 --- /dev/null +++ b/docs/tutorials-ruby/get_account_comments.html @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + + +RB: Get Account Comments | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      + + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/get_account_replies.html b/docs/tutorials-ruby/get_account_replies.html new file mode 100644 index 0000000000000000000000000000000000000000..b65ae18a85eb6b6c2714a81baa8a9ee5a467d6dc --- /dev/null +++ b/docs/tutorials-ruby/get_account_replies.html @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + + +RB: Get Account Replies | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      + + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/get_follower_and_following_list.html b/docs/tutorials-ruby/get_follower_and_following_list.html new file mode 100644 index 0000000000000000000000000000000000000000..9da3ccf869abc179a7d9cf91c4753b652707fa13 --- /dev/null +++ b/docs/tutorials-ruby/get_follower_and_following_list.html @@ -0,0 +1,428 @@ + + + + + + + + + + + + + + + + + + +RB: Get Follower And Following List | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Get Follower And Following List + + +

      + +

      How to create a list of followers and accounts that you are following.

      +
      + + +

      Full, runnable src of Get Follower And Following List can be downloaded as part of the RB tutorials repository. +

      + +

      This tutorial will take you through the process of requesting either the follower or following list for an account on the blockchain.

      + +

      Intro

      + +

      In radiator, we can request follow results using condenser_api.get_following or condenser_api.get_follows methods. These methods take the following arguments:

      + +
        +
      • account - The account for which the follower/following process will be executed.
      • +
      • start - Where in the list to begin getting results.
      • +
      • type - We are going to pass blog for all requests to only request follow results (as opposed to mute results, which takes the value: ignore).
      • +
      • limit - The number of lines to be returned by the query (limit, maximum 1000 per call)
      • +
      + +

      Steps

      + +
        +
      1. Configure connection Configuration of radiator to communicate with the Steem blockchain
      2. +
      3. Input variables Collecting the required inputs via command line arguments
      4. +
      5. Get followers/following Get the followers or accounts being followed
      6. +
      7. Display Return the array of results to the console
      8. +
      + +

      1. Configure connection

      + +

      In the first few lines we initialize the configured library and packages (libraries are described in Gemfile):

      + +
      require 'rubygems'
      +require 'bundler/setup'
      +
      +Bundler.require
      +
      +api = Radiator::Api.new
      +
      + +

      Above, we have radiator pointing to the production network. To specify a different full node, e.g.:

      + +
      api = Radiator::Api.new(url: 'https://testnet.steemitdev.com')
      +
      + +

      2. Input variables

      + +

      Capture the arguments from the command line.

      + +
      account = ARGV[0]
      +type = ARGV[1] || 'following'
      +limit = (ARGV[2] || '-1').to_i
      +
      + +

      3. Get followers/following

      + +

      Depending on the arguments passed, we call the corresponding method and the element name of what we are requesting:

      + +
      method = "get_#{type}"
      +elem = type.sub(/s/, '').to_sym
      +
      + +

      The name of the elem value stored corresponds with the result elements we’re interested in. For method calls on get_following, we want the following elements. For method calls on get_followers, we want follower elements.

      + +

      4. Display

      + +

      Iterate multiple calls to capture all of the results.

      + +
      until count >= result.size
      +  count = result.size
      +  response = api.send(method, account, result.last, what, [limit, 100].max)
      +  abort response.error.message if !!response.error
      +  result += response.result.map(&elem)
      +  result = result.uniq
      +end
      +
      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/19_get_follower_and_following_list
      +bundle install
      +ruby get_follow.rb
      +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/get_post_comments.html b/docs/tutorials-ruby/get_post_comments.html new file mode 100644 index 0000000000000000000000000000000000000000..eb10c1a420cfbaa839d0de28ed5cdc8d1599d6f8 --- /dev/null +++ b/docs/tutorials-ruby/get_post_comments.html @@ -0,0 +1,387 @@ + + + + + + + + + + + + + + + + + + +RB: Get Post Comments | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Get Post Comments + + +

      + +

      This example will output the reply details and totals for the post/comment passed as an argument to the script.

      +
      + + +

      Full, runnable src of Get Post Comments can be downloaded as part of the RB tutorials repository. +

      + +

      Script

      + +

      First, we ask the blockchain for the replies on a post or comment. Then, we grab the authors of those replies and list them, followed by the total comments count.

      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/07_get_post_comments
      +bundle install
      +ruby comments_list.rb https://steemit.com/steem/@steemitblog/dev-portal-update-new-steem-developer-resources
      +
      + +

      Example Output

      + +
      Replies by:
      +	shahabshah
      +	mumin007
      +	bigblueleadsled
      +	reseller
      +	latikasha
      +	dannywill
      +	steemitag
      +	sequentialvibe
      +	xplosive
      +	whatsup
      +	evolved08gsr
      +	steevc
      +	mightymicke
      +	marc0o
      +	akintunde
      +	oliverlai
      +	zufrizal
      +	bitcointravel
      +	vsf
      +	badribireuen
      +Total replies: 20
      +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/get_post_details.html b/docs/tutorials-ruby/get_post_details.html new file mode 100644 index 0000000000000000000000000000000000000000..8976e2bc19e86d4baba343b5d7eb86580ac7a995 --- /dev/null +++ b/docs/tutorials-ruby/get_post_details.html @@ -0,0 +1,544 @@ + + + + + + + + + + + + + + + + + + +RB: Get Post Details | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Get Post Details + + +

      + +

      Understand and use the most common fields of the requested content.

      +
      + + +

      Full, runnable src of Get Post Details can be downloaded as part of the RB tutorials repository. +

      + +

      Intro

      + +

      This tutorial fetches the contents of a single post and explains all data related to that post.

      + +

      We will also describe the most commonly used fields from the response object.

      + +

      Sections

      + +
        +
      1. Making the api call - Use steem-rb to a specific post +
          +
        1. Example api call - make the call in code
        2. +
        3. Example api call using script - using our tutorial script
        4. +
        5. Example Output - output from a successful call
        6. +
        +
      2. +
      3. Post Fields - General use of the method to determine … +
          +
        1. parent_author - if the content is a root post or reply
        2. +
        3. last_update and created - if the content has been modified
        4. +
        5. cashout_time - if the content has reached payout
        6. +
        7. beneficiaries - reward routes other accounts
        8. +
        9. active_votes - all votes applied
        10. +
        11. json_metadata - things like tags and app
        12. +
        +
      4. +
      5. Script - Delving into the example script.
      6. +
      7. To Run - Running the example.
      8. +
      + +

      Making the api call

      + +

      To request a specific post we use the get_content method:

      + +
      api = Radiator::Api.new
      +
      +api.get_content(author, permlink) do |content|
      +  # .
      +  # ... your code here
      +  # .
      +end
      +
      + +

      Example api call

      +

      If we want to get the post “announcing-the-steem-developer-portal” by user @steemitdev

      +
      api.get_content("steemitdev", "announcing-the-steem-developer-portal") do |content| ...
      +
      + +

      Example api call using script

      +

      And to do the same with our tutorial script

      +
      ruby get_post_details.rb https://steemit.com/steemdev/@steemitdev/announcing-the-steem-developer-portal
      +
      + +

      Example Output

      + +

      From the example we get the following output from our script

      + +
      Post by steemitdev
      +	title: Announcing the Steem Developer Portal!
      +	permlink: announcing-the-steem-developer-portal
      +	category: steemdev
      +	body_length: 2342 (381 words)
      +	posted at: 2017-10-30T16:34:27, updated at: 2017-10-30T16:34:27, active at: 2018-04-11T10:34:00
      +	children: 66
      +	net_rshares: 0
      +	vote_rshares: 0
      +	payout:
      +		max_accepted_payout: 0.000 SBD
      +		percent_steem_dollars: 100.00 %
      +		payout at: 2017-11-06T16:34:27 (235.2 days ago)
      +		author_rewards: 0.000 SBD
      +		curator_payout_value: 0.000 SBD
      +		total_payout_value: 0.000 SBD
      +	promoted: 0.000 SBD
      +	total_vote_weight: 0
      +	reward_weight: 100.00 %
      +	net_votes: 181, upvotes: 234, downvotes: 1, unvotes: 0, total: 235, top voter: thejohalfiles
      +	allow_replies: true
      +	allow_votes: true
      +	allow_curation_rewards: true
      +	author_reputation: 14487360227924
      +	tags: steemdev, steem, dev
      +	app: steemit/0.1
      +
      + +

      Post fields

      + +

      Most console applications that use the get_content method are probably looking for the body field. But there are many other fields to look at. Let’s break them down by use:

      + +

      parent_author

      + +

      In our script (get_post_details.rb), we use the ruby statement:

      + +
      content.parent_author.empty?
      +
      + +

      With the above idiom, your application can determine if the content is a root post or reply. If it’s empty, then you’re working with a root post, otherwise, it’s a reply.

      + +

      Once you know you’re dealing with a reply, other fields can be useful for additional details. For instance, root_author, root_permlink, and root_title can be used to figure out what the original post details are, even if the reply is deeply nested.

      + +

      last_update and created

      + +

      In our script, we use the ruby statement:

      + +
      content.last_update == content.created
      +
      + +

      With the above idiom, your application can determine if the content has been modified since it was originally posted. If they are the same, then there has been no modification.

      + +

      cashout_time

      + +

      In our script, we use the ruby statement:

      + +
      (cashout = Time.parse(content.cashout_time + 'Z') - Time.now.utc) > 0
      +
      + +

      With the above idiom, you can use cashout_time to determine if the content has reached payout. If cashout_time is in the future, the content has not been paid yet. You can determine the possible future payout by inspecting pending_payout_value.

      + +

      You will note that we must parse the string found in content.cashout_time by appending Z (Zulu Time, aka UTC) in order for Time.parse to get the right timezone.

      + +

      Even before payout, you can determine what the max_accepted_payout is. Most often, this is set to one of two values by the author:

      + +
        +
      • 1000000.000 SBD - Accepted Payout
      • +
      • 0.000 SBD - Declined Payout
      • +
      + +

      In addition to max_accepted_payout, the author may specify how much of the author reward should be in STEEM Power or liquid rewards. The most common settings are:

      + +
        +
      • 10000 - Maximum Liquid Reward
      • +
      • 0 - STEEM Power Only
      • +
      + +

      Once the payout time has arrived, it’s possible to determine the split between author and curation by inspecting at author_rewards and curator_payout_value.

      + +

      beneficiaries

      + +

      In our script, we use the ruby statement:

      + +
      content.beneficiaries.any?
      +
      + +

      Some content will have a beneficiaries array. This is used to determine reward routes any account, up to eight. Payouts are in STEEM Power and are expressed as a reward percentage of the author reward.

      + +

      To display a list of who the beneficiaries are, use the following ruby code, as seen in the example:

      + +
      content.beneficiaries.each do |beneficiary|
      +  puts "\t\t#{beneficiary.account}: #{'%.2f %' % (beneficiary.weight / 100.0)}"
      +end
      +
      + +

      Note, if you just want an array of beneficiary account names, this will work in a pinch:

      + +
      accounts = content.beneficiaries.map do |beneficiary|
      +  beneficiary.account
      +end
      +
      + +

      active_votes

      + +

      In our script, we use the ruby statements:

      + +
      votes = content.active_votes
      +upvotes = votes.select { |v| v.percent > 0 }.size
      +downvotes = votes.select { |v| v.percent < 0 }.size
      +unvotes = votes.select { |v| v.percent == 0 }.size
      +top_voter = votes.sort_by { |v| v.rshares.to_i }.last.voter
      +
      + +

      The above idiom splits all vote types and identifies the top voter. This is because the active_votes field is an array that shows all votes applied to the content, including upvotes, downvotes, and unvotes (where a vote previously cast is revoked).

      + +

      json_metadata

      + +

      In our script, we use the ruby statements:

      + +
      metadata = JSON[content.json_metadata || '{}'] rescue {}
      +tags = metadata['tags'] || []
      +app = metadata['app']
      +
      + +

      As you can see from the above example, json_metadata starts out as a string of JSON that can be parsed to determine things like tags and app. Other data may be present, depending on the application that created the content.

      + +

      Note, we’re using rescue in case the json_metadata string contains invalid JSON because there is no validation performed on this field by the blockchain when content is broadcasted.

      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +

      *<content-url>

      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/05_get_post_details
      +bundle install
      +ruby get_post_details.rb <content-url>
      +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/get_posts.html b/docs/tutorials-ruby/get_posts.html new file mode 100644 index 0000000000000000000000000000000000000000..3add2e8c1940f88d3d6d0031c0a5c04c32f7f7e5 --- /dev/null +++ b/docs/tutorials-ruby/get_posts.html @@ -0,0 +1,404 @@ + + + + + + + + + + + + + + + + + + +RB: Get Posts | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Get Posts + + +

      + +

      This example will output posts depending on which category is provided as the arguments.

      +
      + + +

      Full, runnable src of Get Posts can be downloaded as part of the RB tutorials repository. +

      + +

      Script

      + +

      Create a filed called get_posts_by_category.rb.

      + +

      This script will pick a method to call based on the arguments passed. The expected categories are:

      + +
        +
      • trending
      • +
      • hot
      • +
      • active
      • +
      • created
      • +
      • votes
      • +
      • promoted
      • +
      • children
      • +
      + +

      We will base the name of the API method to execute on the provided argument. Once we know which method to execute, we can build the query options. The defaults for this script is limit: 10 and tag: ''.

      + +

      For each post we retrieve, we are going to build up a summary to display the interesting fields. In this case, we’re interested in:

      + +
        +
      • Creation Timestamp
      • +
      • Title
      • +
      • Author
      • +
      • Net Votes
      • +
      • Number of replies
      • +
      • If it’s promoted
      • +
      • Number of words in the body
      • +
      • Canonical URL
      • +
      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/04_get_posts
      +bundle install
      +ruby get_posts_by_category.rb trending 1 steem
      +
      + +

      Example Output

      + +
      2018-05-24 06:38:33 UTC
      +  Post: New Phone App For Steemit - Wow!
      +  By: happymoneyman
      +  Votes: 1087
      +  Replies: 332
      +  Promoted: 0.001 SBD
      +  Words: 190
      +  https://steemit.com/steemit/@happymoneyman/new-phone-app-for-steemit-wow
      +
      + +

      Error Handling

      + +

      We’re checking the result for error in case the remote node has an issue to raise. Normally, it will be nil, but if it’s populated, output error.message and exit.

      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/get_voters_list_on_post.html b/docs/tutorials-ruby/get_voters_list_on_post.html new file mode 100644 index 0000000000000000000000000000000000000000..2815b051da8a149d92d648d37d70a87b5ccbd3d9 --- /dev/null +++ b/docs/tutorials-ruby/get_voters_list_on_post.html @@ -0,0 +1,372 @@ + + + + + + + + + + + + + + + + + + +RB: Get Voters List On Post | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Get Voters List On Post + + +

      + +

      This example will output the active vote totals for the post/comment passed as an argument to the script.

      +
      + + +

      Full, runnable src of Get Voters List On Post can be downloaded as part of the RB tutorials repository. +

      + +

      Script

      + +

      First, we ask the blockchain for the active votes on a post or comment. Then, we count the upvotes, downvotes, and unvotes (which are votes that have been removed after being cast in a previous transaction).

      + +

      Then, we sort the votes by rshares to find the top voter.

      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/06_get_voters_list_on_post
      +bundle install
      +ruby voter_list.rb https://steemit.com/steemdev/@steemitdev/announcing-the-steem-developer-portal
      +
      + +

      Example Output

      + +
      Upvotes: 231
      +Downvotes: 1
      +Unvotes: 0
      +Total: 232
      +Top Voter: thejohalfiles
      +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/getting_started.html b/docs/tutorials-ruby/getting_started.html new file mode 100644 index 0000000000000000000000000000000000000000..013184199fe1a023d3f196e7d9261afbb300dcc8 --- /dev/null +++ b/docs/tutorials-ruby/getting_started.html @@ -0,0 +1,415 @@ + + + + + + + + + + + + + + + + + + +RB: Getting Started | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Getting Started + + +

      + +

      To access the Steem blockchain using Ruby, install the Radiator gem: https://github.com/inertia186/radiator. Full documentation on Radiator api methods are hosted on rubydoc.info.

      +
      + + +

      Full, runnable src of Getting Started can be downloaded as part of the RB tutorials repository. +

      + +

      Setup

      + +

      The following is a minimal Gemfile for running .rb files in these examples.

      + +

      Add gem 'radiator' to your Gemfile. Then install the gem:

      + +
      bundle install
      +
      + +

      It is also possible to install radiator directly with gem:

      + +
      gem install radiator
      +
      + +

      Then, to execute a script without a Gemfile, add to the top of your .rb files:

      + +
      require 'radiator'
      +
      + +

      Then, use the ruby command with radiator specified:

      + +
      ruby -r radiator myscript.rb
      +
      + +

      Examples

      + +

      The tutorials on this site are available within this site’s repository. To get a copy, clone this repository, change directory to devportal/_includes/tutorials-ruby and do a bundle install to install the required local gems.

      + +

      From there, you can see all of the .rb files referenced on this site.

      + +
      git clone https://github.com/steemit/devportal.git
      +cd devportal/_includes/tutorials-ruby/
      +bundle install
      +
      + +

      Typical-Usage

      + +

      Most methods can be accessed by creating an instance of Radiator::Api. It is also possible to specify a different node by passing a url option.

      + +

      Radiator also internally supports failover by specifying the failover_urls option.

      + +

      To use the defaults:

      + +
      api = Radiator::Api.new
      +
      + +

      To override the url option:

      + +
      api = Radiator::Api.new(url: 'https://rpc.steemliberator.com')
      +
      + +

      To override both url and failover_urls options:

      + +
      options = {
      +  url: 'https://rpc.steemliberator.com',
      +  failover_urls: [
      +    'https://gtg.steem.house:8090',
      +    'https://steemd.minnowsupportproject.org',
      +    'https://steemd.privex.io',
      +  ]
      +}
      +api = Radiator::Api.new(options)
      +
      + +

      Next Step

      + +

      If you’d like to dive right into the first tutorial, have a look at: Blog Feed

      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/reblogging_post.html b/docs/tutorials-ruby/reblogging_post.html new file mode 100644 index 0000000000000000000000000000000000000000..c65955381a8ea6fdbaa94b43bd045534c8a5282c --- /dev/null +++ b/docs/tutorials-ruby/reblogging_post.html @@ -0,0 +1,639 @@ + + + + + + + + + + + + + + + + + + +RB: Reblogging Post | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Reblogging Post + + +

      + +

      To reblog (‘resteem’) a post, we can use a custom json operation that is handled by the follow plugin.

      +
      + + +

      Full, runnable src of Reblogging Post can be downloaded as part of the RB tutorials repository. +

      + +

      For this operation, we will use custom_json and a properly formed id and payload so that follow_plugin will pick up the reblog data and display the selected post in the feed of the account doing the reblog.

      + +

      Sections

      + +
        +
      1. Making the api call - broadcasting the operation +
          +
        1. Example api call - make the call in code
        2. +
        3. Example api call using script - using our tutorial script
        4. +
        5. Example Output - output from a successful call
        6. +
        7. Example Error - error output from a unsuccessful call
        8. +
        +
      2. +
      3. Custom JSON Fields - understanding the result
      4. +
      5. To Run - Running the example.
      6. +
      + +

      Making the api call

      + +

      To broadcast the operation, we can use a Radiator::Transaction instance:

      + +
      tx = Radiator::Transaction.new
      +
      +
      +tx.process(true)
      +
      + +

      Passing true to Radiator::Transaction#process will broadcast the operations queued in the operations array of the transaction.

      + +

      Example api call

      + +

      If we want to reblog, we need to form the json properly, for example:

      + +
      data = [
      +  :reblog, {
      +    account: reblogger,
      +    author: author,
      +    permlink: permlink
      +  }
      +]
      +
      +tx.operations << {
      +  type: :custom_json,
      +  id: 'follow',
      +  required_auths: [],
      +  required_posting_auths: [reblogger],
      +  json: data.to_json
      +}
      +
      + +

      Example api call using script

      + +

      And to do the same with our tutorial script:

      + +
      ruby reblogging_post.rb https://steemit.com/@inertia/kinda-spooky
      +
      + +

      Example Output

      + +

      From the example we get the following output from our script:

      + +
      {
      +  "jsonrpc": "2.0",
      +  "result": {
      +    "id": "0aa41e06b2612315d32cadeb671eb1201f266dd7",
      +    "block_num": 24063620,
      +    "trx_num": 19,
      +    "expired": false
      +  },
      +  "id": 3
      +}
      +
      + +

      The response we get after broadcasting the transaction gives us the transaction id (0aa41e0...), block number (24063620), and the transaction number of that block (19).

      + +

      Example Error

      + +

      If a post has already been reblogged by the account, we will get back an error:

      + +
      {
      +  "jsonrpc": "2.0",
      +  "error": {
      +    "code": -32000,
      +    "message": "Assert Exception:blog_itr == blog_comment_idx.end(): Account has already reblogged this post",
      +    "data": {
      +      "code": 10,
      +      "name": "assert_exception",
      +      "message": "Assert Exception",
      +      "stack": [
      +        {
      +          "context": {
      +            "level": "error",
      +            "file": "follow_evaluators.cpp",
      +            "line": 143,
      +            "method": "do_apply",
      +            "hostname": "",
      +            "timestamp": "2018-07-10T21:33:11"
      +          },
      +          "format": "blog_itr == blog_comment_idx.end(): Account has already reblogged this post",
      +          "data": {
      +          }
      +        },
      +        {
      +          "context": {
      +            "level": "warn",
      +            "file": "follow_evaluators.cpp",
      +            "line": 216,
      +            "method": "do_apply",
      +            "hostname": "",
      +            "timestamp": "2018-07-10T21:33:11"
      +          },
      +          "format": "",
      +          "data": {
      +            "o": {
      +              "account": "social",
      +              "author": "inertia",
      +              "permlink": "kinda-spooky"
      +            }
      +          }
      +        },
      +        {
      +          "context": {
      +            "level": "warn",
      +            "file": "generic_custom_operation_interpreter.hpp",
      +            "line": 195,
      +            "method": "apply",
      +            "hostname": "",
      +            "timestamp": "2018-07-10T21:33:11"
      +          },
      +          "format": "",
      +          "data": {
      +            "outer_o": {
      +              "required_auths": [
      +
      +              ],
      +              "required_posting_auths": [
      +                "social"
      +              ],
      +              "id": "follow",
      +              "json": "[\"reblog\",{\"account\":\"social\",\"author\":\"inertia\",\"permlink\":\"kinda-spooky\"}]"
      +            }
      +          }
      +        },
      +        {
      +          "context": {
      +            "level": "warn",
      +            "file": "database.cpp",
      +            "line": 3221,
      +            "method": "_apply_transaction",
      +            "hostname": "",
      +            "timestamp": "2018-07-10T21:33:11"
      +          },
      +          "format": "",
      +          "data": {
      +            "op": {
      +              "type": "custom_json_operation",
      +              "value": {
      +                "required_auths": [
      +
      +                ],
      +                "required_posting_auths": [
      +                  "social"
      +                ],
      +                "id": "follow",
      +                "json": "[\"reblog\",{\"account\":\"social\",\"author\":\"inertia\",\"permlink\":\"kinda-spooky\"}]"
      +              }
      +            }
      +          }
      +        },
      +        {
      +          "context": {
      +            "level": "warn",
      +            "file": "database.cpp",
      +            "line": 3227,
      +            "method": "_apply_transaction",
      +            "hostname": "",
      +            "timestamp": "2018-07-10T21:33:11"
      +          },
      +          "format": "",
      +          "data": {
      +            "trx": {
      +              "ref_block_num": 12404,
      +              "ref_block_prefix": 1445149887,
      +              "expiration": "2018-07-10T21:43:09",
      +              "operations": [
      +                {
      +                  "type": "custom_json_operation",
      +                  "value": {
      +                    "required_auths": [
      +
      +                    ],
      +                    "required_posting_auths": [
      +                      "social"
      +                    ],
      +                    "id": "follow",
      +                    "json": "[\"reblog\",{\"account\":\"social\",\"author\":\"inertia\",\"permlink\":\"kinda-spooky\"}]"
      +                  }
      +                }
      +              ],
      +              "extensions": [
      +
      +              ],
      +              "signatures": [
      +                "1c063e22868f107dbafaa0452d86cfe19894f2f7fc3ea46b5c73dc7906edcd88244548f001c1d128aa07f862819e80e2f46b6cd74c6769d1d48ef4ad1f147b4dab"
      +              ]
      +            }
      +          }
      +        },
      +        {
      +          "context": {
      +            "level": "warn",
      +            "file": "database.cpp",
      +            "line": 788,
      +            "method": "push_transaction",
      +            "hostname": "",
      +            "timestamp": "2018-07-10T21:33:11"
      +          },
      +          "format": "",
      +          "data": {
      +            "trx": {
      +              "ref_block_num": 12404,
      +              "ref_block_prefix": 1445149887,
      +              "expiration": "2018-07-10T21:43:09",
      +              "operations": [
      +                {
      +                  "type": "custom_json_operation",
      +                  "value": {
      +                    "required_auths": [
      +
      +                    ],
      +                    "required_posting_auths": [
      +                      "social"
      +                    ],
      +                    "id": "follow",
      +                    "json": "[\"reblog\",{\"account\":\"social\",\"author\":\"inertia\",\"permlink\":\"kinda-spooky\"}]"
      +                  }
      +                }
      +              ],
      +              "extensions": [
      +
      +              ],
      +              "signatures": [
      +                "1c063e22868f107dbafaa0452d86cfe19894f2f7fc3ea46b5c73dc7906edcd88244548f001c1d128aa07f862819e80e2f46b6cd74c6769d1d48ef4ad1f147b4dab"
      +              ]
      +            }
      +          }
      +        }
      +      ]
      +    }
      +  },
      +  "id": 3
      +}
      +
      + +

      This indicates that the operation was not included in the blockchain because it was already reblogged in the past.

      + +

      Custom JSON Fields

      + +

      Broadcasting a custom_json operation will require the following fields:

      + +
        +
      • id - set to follow to indicate that this operation is handled by the follow_plugin
      • +
      • required_auths - leave this as an empty JSON Array, we only need the posting authority
      • +
      • required_posting_auths - JSON Array containing the account name with the posting authority
      • +
      • json - the actual payload of the operation, containing a JSON Array: +
          +
        • First element - reblog
        • +
        • Second element - JSON Object containing: +
            +
          • account - account that is doing the reblog op
          • +
          • author - author of the post being reblogged
          • +
          • permlink - permlink of the post being reblogged
          • +
          +
        • +
        +
      • +
      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +
        +
      • <url>
      • +
      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/14_reblogging_post
      +bundle install
      +ruby reblogging_post.rb <url>
      +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/search_accounts.html b/docs/tutorials-ruby/search_accounts.html new file mode 100644 index 0000000000000000000000000000000000000000..c0f287eb3618dbec7b934e9ae3481ef5eb37bf5d --- /dev/null +++ b/docs/tutorials-ruby/search_accounts.html @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + + + + + +RB: Search Accounts | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Search Accounts + + +

      + +

      Performing a search on account by names starting with a given input.

      +
      + + +

      Full, runnable src of Search Accounts can be downloaded as part of the RB tutorials repository. +

      + +

      This tutorial will return account names matching the input given, up to a specified limit.

      + +

      Sections

      + +
        +
      1. Making the api call - performing the lookup +
          +
        1. Example api call - make the call in code
        2. +
        3. Example api call using script - using our tutorial script
        4. +
        5. Example Output - output from a successful call
        6. +
        +
      2. +
      3. To Run - Running the example.
      4. +
      + +

      Making the api call

      + +

      To request the a list of accounts starting with a particular lookup pattern, we can use the lookup_accounts method:

      + +
      api = Radiator::Api.new
      +
      +api.lookup_accounts(lower_bound_name, limit) do |accounts|
      +  puts accounts.join(' ')
      +end
      +
      + +

      Notice, the above example can request up to 1000 accounts as an array.

      + +

      Example api call

      + +

      If we want to get the accounts starting with “alice” …

      + +
      api.lookup_accounts("alice", 10) do |content| ...
      +
      + +

      Example api call using script

      + +

      And to do the same with our tutorial script, which has its own default limit of 10:

      + +
      ruby search_accounts.rb alice
      +
      + +

      Example Output

      + +

      From the example we get the following output from our script:

      + +
      alice alice-22 alice-is alice-labardo alice-mikhaylova alice-n-chains alice-radster alice-sandra alice-thuigh alice-way
      +
      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +
        +
      • <lower-bound-name>
      • +
      • [limit] (optional)
      • +
      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/15_search_accounts
      +bundle install
      +ruby search_accounts.rb <lower-bound-name> [limit]
      +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/search_tags.html b/docs/tutorials-ruby/search_tags.html new file mode 100644 index 0000000000000000000000000000000000000000..f5ad2b6afaf7c0c36eb19ede5f5b6b3f1d226acc --- /dev/null +++ b/docs/tutorials-ruby/search_tags.html @@ -0,0 +1,433 @@ + + + + + + + + + + + + + + + + + + +RB: Search Tags | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Search Tags + + +

      + +

      Performing a search for tags.

      +
      + + +

      Full, runnable src of Search Tags can be downloaded as part of the RB tutorials repository. +

      + +

      This tutorial will return tags sorted by trending, up to a specified limit.

      + +

      Sections

      + +
        +
      1. Making the api call - performing the lookup +
          +
        1. Example api call - make the call in code
        2. +
        3. Example api call using script - using our tutorial script
        4. +
        5. Example Output - output from a successful call
        6. +
        7. Tag Fields - details of fields returned
        8. +
        +
      2. +
      3. To Run - Running the example.
      4. +
      + +

      Making the api call

      + +

      To request the a list of tags, we can use the get_trending_tags method:

      + +
      api = Radiator::Api.new
      +
      +api.get_trending_tags(nil, 100) do |tags|
      +  puts tags
      +end
      +
      + +

      Notice, the above example can request up to 100 tags as an array.

      + +

      Example api call

      + +

      If we want to get 10 tags starting from the tag named “music” …

      + +
      api.get_trending_tags("music", 10) do |content| ...
      +
      + +

      Example api call using script

      + +

      And to do the same with our tutorial script, which has its own default limit of 10. Internally, the api method only allows at most 100 results, so this tutorial will paginate the results to go beyond 100:

      + +
      ruby search_tags.rb
      +
      + +

      Example Output

      + +

      From the example we get the following output from our script:

      + +
      tag: <empty>, total_payouts: 57513246.041 SBD, net_votes: 47471936, top_posts: 4523493, comments: 27287924, trending: 100430269400
      +tag: life, total_payouts: 12563434.550 SBD, net_votes: 10898489, top_posts: 1193059, comments: 1164873, trending: 7440962326
      +tag: photography, total_payouts: 7529111.644 SBD, net_votes: 8578110, top_posts: 819008, comments: 1498469, trending: 7311205387
      +tag: kr, total_payouts: 2953387.067 SBD, net_votes: 749380, top_posts: 79842, comments: 2138776, trending: 7009078414
      +tag: steemit, total_payouts: 8531217.920 SBD, net_votes: 5393375, top_posts: 580400, comments: 1156174, trending: 5471456871
      +tag: art, total_payouts: 4017591.434 SBD, net_votes: 3577651, top_posts: 330597, comments: 716566, trending: 3302526197
      +tag: bitcoin, total_payouts: 3556944.650 SBD, net_votes: 2885034, top_posts: 416088, comments: 625529, trending: 3284115413
      +tag: introduceyourself, total_payouts: 1863437.063 SBD, net_votes: 725570, top_posts: 24891, comments: 986875, trending: 3185017448
      +tag: spanish, total_payouts: 1221282.258 SBD, net_votes: 2683931, top_posts: 154983, comments: 827033, trending: 3103643123
      +tag: travel, total_payouts: 3976626.578 SBD, net_votes: 2505962, top_posts: 229401, comments: 622754, trending: 2687292306
      +
      + +

      Tag fields

      + +

      Tags in the results of get_trending_tags returns the following fields:

      + +
        +
      • name - Name of the tag or empty.
      • +
      • total_payouts - Rewards paid in this tag.
      • +
      • net_votes - Net votes in this tag.
      • +
      • top_posts - Top votes in this tag.
      • +
      • comments - Number of comments in this tag.
      • +
      • trending - Total trending.
      • +
      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +
        +
      • [limit] (optional)
      • +
      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/16_search_tags
      +bundle install
      +ruby search_tags.rb [limit]
      +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/stream_blockchain_transactions.html b/docs/tutorials-ruby/stream_blockchain_transactions.html new file mode 100644 index 0000000000000000000000000000000000000000..1f2665d8e33705a389edd87af681e2139e299da2 --- /dev/null +++ b/docs/tutorials-ruby/stream_blockchain_transactions.html @@ -0,0 +1,437 @@ + + + + + + + + + + + + + + + + + + +RB: Stream Blockchain Transactions | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Stream Blockchain Transactions + + +

      + +

      How to stream transactions and operations from Steem blockchain.

      +
      + + +

      Full, runnable src of Stream Blockchain Transactions can be downloaded as part of the RB tutorials repository. +

      + +

      To respond to live activity on the blockchain, a common approach is to make a request for the current block number, access all of the information in that block, and repeat. Many API clients have dedicated tools for simplifying this process. In Radiator, this tool is part of the Radiator::Stream class. In addition, Radiator will allow you to specify exactly what type of operation you’re interested in.

      + +

      Sections

      + +
        +
      1. Streaming Transactions
      2. +
      3. Streaming Operations
      4. +
      5. To Run - Running the example.
      6. +
      + +

      Streaming Transactions

      + +

      In the example script, we can stream transactions with the following arguments:

      + +
      ruby stream_blockchain_transactions.rb head transactions
      +
      + +

      This will instruct the script to follow transactions at head block_num instead of irreversible.

      + +

      See: head_block_number vs. last_irreversible_block_num

      + +

      This is done by using the following ruby:

      + +
      stream.transactions(*args) do |trx|
      +  puts JSON.pretty_generate trx
      +end
      +
      + +

      The args variable contains the start (block_num to start from) and mode (head or irreversible).

      + +

      Streaming Operations

      + +

      In the example script, we can also pass the following arguments:

      + +
      ruby stream_blockchain_transactions.rb head ops comment
      +
      + +

      This will instruct the script to follow the blockchain at head block_num instead of irreversible. It will stream operations, with the type of comment.

      + +

      The script will allow multiple operation types:

      + +
      ruby stream_blockchain_transactions.rb head ops comment vote
      +
      + +

      Virtual operations are also allowed, but make sure to pass irreversible instead of head:

      + +
      ruby stream_blockchain_transactions.rb irreversible ops producer_reward author_reward
      +
      + +

      Or, if you pass no operation types, the script will stream all types:

      + +
      ruby stream_blockchain_transactions.rb head ops
      +
      + +

      This is done by using the following ruby:

      + +
      stream.operations(type, *args) do |op|
      +  puts op.to_json
      +end
      +
      + +

      The type variable can be nil or the type of ops we’re looking for whereas args contains the start (block_num to start from) and mode (head or irreversible).

      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/13_stream_blockchain_transactions
      +bundle install
      +ruby stream_blockchain_transactions.rb
      +
      + +

      Example Output

      + +
      {"voter":"piggypet","author":"tanama","permlink":"daily-2018-9-12","weight":10000}
      +{"voter":"votes4minnows","author":"askquestion","permlink":"latest-bitcoin-price-and-news-update-13-09-2018","weight":250}
      +{"voter":"vncedora2018","author":"adncabrera","permlink":"nicomedescuentalacadadelreytanospoema-98jxnjsjzu","weight":10000}
      +{"voter":"baimatjeh81","author":"albertvhons","permlink":"promoting-steemit-post-via-proof-of-participation-pop","weight":10000}
      +{"voter":"steemulator","author":"bonanza-kreep","permlink":"communicate-and-travel-with-alfa-enzo-new-social-network","weight":10000}
      +{"voter":"kernigeetrueset","author":"haejin","permlink":"vitamin-shoppe-vsi-analysis","weight":10000}
      +{"voter":"borrowedearth","author":"rijalmahyud","permlink":"this-is-my-job","weight":10000}
      +{"voter":"renatdag","author":"algarion","permlink":"cards-3-1536663927","weight":10000}
      +{"voter":"elieserurabno","author":"cathyhaack","permlink":"my-introduction-hello-word-of-steemit","weight":10000}
      +{"voter":"jmotip","author":"glennolua","permlink":"btc-chart-review-sept-12-20-00-pst","weight":10000}
      +{"voter":"bishalacharya","author":"barber78","permlink":"beautiful-cloudformations","weight":10000}
      +{"voter":"ivan174","author":"securixio","permlink":"cloud-mining-is-no-longer-profitable","weight":10000}
      +{"voter":"admiralbot","author":"homsys","permlink":"rare-photo-picture-698-105","weight":-10000}
      +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/submit_comment_reply.html b/docs/tutorials-ruby/submit_comment_reply.html new file mode 100644 index 0000000000000000000000000000000000000000..80f1c6a03807be0064afd3056db6e26c5da80aa7 --- /dev/null +++ b/docs/tutorials-ruby/submit_comment_reply.html @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + +RB: Submit Comment Reply | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Submit Comment Reply + + +

      + +

      By the end of this tutorial you should know how to prepare comments for Steem and then submit using Radiator.

      +
      + + +

      Full, runnable src of Submit Comment Reply can be downloaded as part of the RB tutorials repository. +

      + +

      Intro

      + +

      This example will broadcast a reply to the blockchain using the values provided. To create a post in ruby, we will use a Radiator::Transaction containing a comment operation, which is how all content is stored internally.

      + +

      A reply is differentiated from a post by whether or not a parent_author exists. When there is no parent_author, then it’s a post, otherwise it’s a comment (like in this example).

      + +

      Script

      + +

      You should change wif to the posting key that matches your author. This script will pass along the values as a comment operation:

      + +
        +
      • author - Account name of the author currently replying.
      • +
      • permlink - Value unique to the author
      • +
      • parent_author - The name of the author of the being replied to, in the case of a reply like this example.
      • +
      • parent_permlink - The permlink of the content being replied to, in the case of a reply like this example.
      • +
      • title - Typically empty.
      • +
      • body - The actual content of the post.
      • +
      • json_metadata - JSON containing the parent_permlink of the root post as a tags array.
      • +
      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/11_submit_comment_reply
      +bundle install
      +ruby submit_comment_reply.rb
      +
      + +

      Example Output

      + +
      {
      +  "jsonrpc": "2.0",
      +  "result": {
      +    "id": "3fef14cac921e9baa7b31e43245e5380f3fb4332",
      +    "block_num": 23355115,
      +    "trx_num": 13,
      +    "expired": false
      +  },
      +  "id": 3
      +}
      +
      + +

      The response we get after broadcasting the transaction gives us the transaction id (3fef14c...), block number (22867626), and the transaction number of that block (13).

      + +

      Error Handling

      + +

      We’re checking the result for error in case the remote node has an issue to raise. Normally, it will be nil, but if it’s populated, output error.message and exit.

      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/submit_post.html b/docs/tutorials-ruby/submit_post.html new file mode 100644 index 0000000000000000000000000000000000000000..1acb647e802faea15bd6ba3ca38f4102cacdd03c --- /dev/null +++ b/docs/tutorials-ruby/submit_post.html @@ -0,0 +1,393 @@ + + + + + + + + + + + + + + + + + + +RB: Submit Post | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Submit Post + + +

      + +

      This example will broadcast a new post to the blockchain using the values provided. To create a post in ruby, we will use a Radiator::Transaction containing a comment operation, which is how all content is stored internally.

      +
      + + +

      Full, runnable src of Submit Post can be downloaded as part of the RB tutorials repository. +

      + +

      A post is differentiated from a comment by whether or not a parent_author exists. When there is no parent_author, then it’s a post, otherwise it’s a comment.

      + +

      Script

      + +

      You should change wif to the posting key that matches your author. This script will pass along the values as a comment operation:

      + +
        +
      • author - Account name of the author currently posting.
      • +
      • permlink - Value unique to the author
      • +
      • parent_author - An empty string, in the case of a root post like this example.
      • +
      • parent_permlink - The first tag, in the case of a root post like this example.
      • +
      • title - Human readable title.
      • +
      • body - The actual content of the post.
      • +
      • json_metadata - JSON containing all of the tags.
      • +
      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):

      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/10_submit_post
      +bundle install
      +ruby submit_a_new_post.rb
      +
      + +

      Example Output

      + +
      {
      +  "jsonrpc": "2.0",
      +  "result": {
      +    "id": "768f7f64cee94413da0017ef79f592bb4da86baf",
      +    "block_num": 22867626,
      +    "trx_num": 43,
      +    "expired": false
      +  },
      +  "id": 1
      +}
      +
      + +

      The response we get after broadcasting the transaction gives us the transaction id (768f7f6...), block number (22867626), and the transaction number of that block (43).

      + +

      Error Handling

      + +

      We’re checking the result for error in case the remote node has an issue to raise. Normally, it will be nil, but if it’s populated, output error.message and exit.

      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials-ruby/vote_on_content.html b/docs/tutorials-ruby/vote_on_content.html new file mode 100644 index 0000000000000000000000000000000000000000..b1fc74a79a7c4fbb5ac2fd498adb108c912f10ac --- /dev/null +++ b/docs/tutorials-ruby/vote_on_content.html @@ -0,0 +1,549 @@ + + + + + + + + + + + + + + + + + + +RB: Vote On Content | Steem Developer + + + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      +

      + + RB: Vote On Content + + +

      + +

      To vote for a post (or reply), we can use a vote operation and provide the voting weight (the percentage of one vote being cast).

      +
      + + +

      Full, runnable src of Vote On Content can be downloaded as part of the RB tutorials repository. +

      + +

      Sections

      + +
        +
      1. Making the api call - broadcasting the operation +
          +
        1. Example api call - make the call in code
        2. +
        3. Example api call using script - using our tutorial script
        4. +
        5. Example Output - output from a successful call
        6. +
        7. Example Error - error output from a unsuccessful call
        8. +
        +
      2. +
      3. Vote Fields - understanding the result
      4. +
      5. To Run - Running the example.
      6. +
      + +

      Making the api call

      + +

      To broadcast the operation, we can use a Radiator::Transaction instance:

      + +
      tx = Radiator::Transaction.new
      +
      +
      +tx.process(true)
      +
      + +

      Passing true to Radiator::Transaction#process will broadcast the operations queued in the operations array of the transaction.

      + +

      Example api call

      + +

      If we want to vote, for example:

      + +
      tx.operations << {
      +  type: :vote,
      +  voter: voter,
      +  author: author,
      +  permlink: permlink,
      +  weight: weight
      +}
      +
      + +

      Example api call using script

      + +

      And to do the same with our tutorial script:

      + +
      ruby vote_on_content.rb https://steemit.com/@inertia/kinda-spooky
      +
      + +

      Example Output

      + +

      From the example we get the following output from our script:

      + +
      {
      +  "jsonrpc": "2.0",
      +  "result": {
      +    "id": "244a67bf1e64f05fb2ab52a0652a8edd30c5d273",
      +    "block_num": 27035223,
      +    "trx_num": 15,
      +    "expired": false
      +  },
      +  "id": 3
      +}
      +
      + +

      The response we get after broadcasting the transaction gives us the transaction id (244a67b...), block number (27035223), and the transaction number of that block (15).

      + +

      Note, this script accepts accepts an optional percentage (defaulting 100.0 %). To set the vote to 50.0 %:

      + +
      ruby vote_on_content.rb https://steemit.com/@inertia/kinda-spooky 50
      +
      + +

      Example Error

      + +

      If an invalid vote weight is given (e.g.: 101 %), we will get back an error:

      + +
      {
      +  "jsonrpc": "2.0",
      +  "error": {
      +    "code": -32000,
      +    "message": "Assert Exception:abs(weight) <= STEEM_100_PERCENT: Weight is not a STEEMIT percentage",
      +    "data": {
      +      "code": 10,
      +      "name": "assert_exception",
      +      "message": "Assert Exception",
      +      "stack": [
      +        {
      +          "context": {
      +            "level": "error",
      +            "file": "steem_operations.cpp",
      +            "line": 179,
      +            "method": "validate",
      +            "hostname": "",
      +            "timestamp": "2018-10-22T16:09:50"
      +          },
      +          "format": "abs(weight) <= STEEM_100_PERCENT: Weight is not a STEEMIT percentage",
      +          "data": {
      +          }
      +        },
      +        {
      +          "context": {
      +            "level": "warn",
      +            "file": "database.cpp",
      +            "line": 3491,
      +            "method": "_apply_transaction",
      +            "hostname": "",
      +            "timestamp": "2018-10-22T16:09:50"
      +          },
      +          "format": "",
      +          "data": {
      +            "trx": {
      +              "ref_block_num": 34171,
      +              "ref_block_prefix": 1240848906,
      +              "expiration": "2018-10-22T16:19:48",
      +              "operations": [
      +                {
      +                  "type": "vote_operation",
      +                  "value": {
      +                    "voter": "social",
      +                    "author": "inertia",
      +                    "permlink": "kinda-spooky",
      +                    "weight": 10100
      +                  }
      +                }
      +              ],
      +              "extensions": [
      +
      +              ],
      +              "signatures": [
      +                "1c50556b312dd71446621fc3b509da3f5596ab20e8846edd7e55ce5fb13f51742c77d1ab021afa43e039ed2655f28beb1859924ddc6db1087742f3e63e4bc2502b"
      +              ]
      +            }
      +          }
      +        },
      +        {
      +          "context": {
      +            "level": "warn",
      +            "file": "database.cpp",
      +            "line": 817,
      +            "method": "push_transaction",
      +            "hostname": "",
      +            "timestamp": "2018-10-22T16:09:50"
      +          },
      +          "format": "",
      +          "data": {
      +            "trx": {
      +              "ref_block_num": 34171,
      +              "ref_block_prefix": 1240848906,
      +              "expiration": "2018-10-22T16:19:48",
      +              "operations": [
      +                {
      +                  "type": "vote_operation",
      +                  "value": {
      +                    "voter": "social",
      +                    "author": "inertia",
      +                    "permlink": "kinda-spooky",
      +                    "weight": 10100
      +                  }
      +                }
      +              ],
      +              "extensions": [
      +
      +              ],
      +              "signatures": [
      +                "1c50556b312dd71446621fc3b509da3f5596ab20e8846edd7e55ce5fb13f51742c77d1ab021afa43e039ed2655f28beb1859924ddc6db1087742f3e63e4bc2502b"
      +              ]
      +            }
      +          }
      +        }
      +      ]
      +    }
      +  },
      +  "id": 3
      +}
      +
      + +

      This indicates that the operation was not included in the blockchain because it was given an invalid weight argument.

      + +

      Vote Fields

      + +

      Broadcasting a vote operation will require the following fields:

      + +
        +
      • voter - account that is doing the vote op
      • +
      • author - author of the post being voted for
      • +
      • permlink - permlink of the post being voted for
      • +
      • weight - percentage of one vote being cast, expressed as an integer (e.g.: 100.0 % = 10000)
      • +
      + +

      To Run

      + +

      First, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository) with the following arguments:

      + +
        +
      • <url> - the URL to vote on
      • +
      • [weight] - the weight of the vote as percentage, optional (default 100.0 %)
      • +
      + +
      git clone git@github.com:steemit/devportal-tutorials-rb.git
      +cd devportal-tutorials-rb/tutorials/17_vote_on_content
      +bundle install
      +ruby vote_on_content.rb <url> [weight]
      +
      + +
      + +
      + +
      + + + + + + + + diff --git a/docs/tutorials/index.html b/docs/tutorials/index.html new file mode 100644 index 0000000000000000000000000000000000000000..dbe0306568b33ebe1a214f99beee8be417316ec5 --- /dev/null +++ b/docs/tutorials/index.html @@ -0,0 +1,941 @@ + + + + + + + + + + + + + + + + + + +Tutorials | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal - Tutorials

      + + + +
      + +
      +
      +

      Read, play, and learn Steem.

      + + + + + + +

      Javascript

      +
        + + +
      • + JS: Getting Started +

        Prepare your development environment to use Javascript with the Steem blockchain.

        +
        +
      • + +
      • + JS: Blog Feed +

        By the end of this tutorial you should know how to fetch most recent five posts from particular user on Steem.

        +
        +
      • + +
      • + JS: Steemconnect +

        Understand the basics of using Steemconnect with your Steem application.

        +
        +
      • + +
      • + JS: Client Signing +

        By the end of this tutorial you would know how to sign, verify broadcast transactions locally on Steem.

        +
        +
      • + +
      • + JS: Get Posts +

        Query for the most recent posts having a specific tag, using a Steem filter

        +
        +
      • + +
      • + JS: Get Post Details +

        By the end of this tutorial you would know how to get post details and use them appropriately.

        +
        +
      • + +
      • + JS: Get Voters List On Post +

        By the end of this tutorial you would know how to get voters list on any content.

        +
        +
      • + +
      • + JS: Get Post Comments +

        By the end of this tutorial you would know how to get comments made by others on any post.

        +
        +
      • + +
      • + JS: Get Account Replies +

        By the end of this tutorial you would know how to get replies made on particular account’s content.

        +
        +
      • + +
      • + JS: Get Account Comments +

        By the end of this tutorial you should know how to retrieve account comments from the steem blockchain

        +
        +
      • + +
      • + JS: Submit Post +

        By the end of this tutorial you should know how to prepare comments for Steem and then submit using the broadcast.comment function.

        +
        +
      • + +
      • + JS: Submit Comment Reply +

        By the end of this tutorial you should know how to post a simple comment to Steem.

        +
        +
      • + +
      • + JS: Edit Content Patching +

        By the end of this tutorial you should know how to patch post edits to Steem.

        +
        +
      • + +
      • + JS: Stream Blockchain Transactions +

        By the end of this tutorial you should know how to stream transactions and blocks from Steem blockchain.

        +
        +
      • + +
      • + JS: Reblogging Post +

        By the end of this tutorial you should know how to reblog (resteem) a blog from steem

        +
        +
      • + +
      • + JS: Search Accounts +

        By the end of this tutorial you should know how to call a list of user names from the steem blockchain

        +
        +
      • + +
      • + JS: Search Tags +

        By the end of this tutorial you should know how to run a search for trending tags

        +
        +
      • + +
      • + JS: Vote On Content +

        Create a weighted up or down vote on a comment/post.

        +
        +
      • + +
      • + JS: Follow A User +

        Follow and unfollow a user / author.

        +
        +
      • + +
      • + JS: Get Follower And Following List +

        Get the followers of a user/author & the authors that user is following.

        +
        +
      • + +
      • + JS: Account Reputation +

        Learn how to interpret account reputation.

        +
        +
      • + +
      • + JS: Transfer Steem And Sbd +

        Transfer both STEEM and SBD from one account to another.

        +
        +
      • + +
      • + JS: Witness Listing And Voting +

        Create a list of available witnesses as well as vote for and remove your vote for a witness.

        +
        +
      • + +
      • + JS: Claim Rewards +

        Learn how to claim rewards from unclaimed reward balance using Steemconnect as well as client signing method.

        +
        +
      • + +
      • + JS: Power Up Steem +

        Power up an account’s Steem using either Steemconnect or a client-side signing.

        +
        +
      • + +
      • + JS: Power Down +

        Perform a power down on all or part of an account’s VESTS using either Steemconnect or client-side signing.

        +
        +
      • + +
      • + JS: Create Account +

        Create Steem account using Steemconnect as well as with client-side signing.

        +
        +
      • + +
      • + JS: Delegate Power +

        Delegate power to other users using Steemconnect or Client-side signing.

        +
        +
      • + +
      • + JS: Set Withdraw Route +

        Set routes to an account’s power downs or withdraws.

        +
        +
      • + +
      • + JS: Get Delegations By User +

        View the vesting delegations made by a user as well as the delegations that are expiring.

        +
        +
      • + +
      • + JS: Grant Posting Permission +

        How to grant and revoke posting permission to another user.

        +
        +
      • + +
      • + JS: Grant Active Permission +

        How to grant and revoke active permission to another user.

        +
        +
      • + +
      • + JS: Convert Sbd To Steem +

        How to convert SBD to STEEM for a specified account.

        +
        +
      • + +
      • + JS: Get State Replacement Api +

        This is a list of replacement API calls for each of the different routes available from the getState function.

        +
        +
      • + +
      + + + + + +

      Python

      + + + + + + +

      Ruby

      +
        + + +
      • + RB: Getting Started +

        To access the Steem blockchain using Ruby, install the Radiator gem: https://github.com/inertia186/radiator. Full documentation on Radiator api methods are hosted on rubydoc.info.

        +
        +
      • + +
      • + RB: Blog Feed +

        This example will output blog details to the terminal for the author specified, limited to five results.

        +
        +
      • + +
      • + RB: Get Posts +

        This example will output posts depending on which category is provided as the arguments.

        +
        +
      • + +
      • + RB: Get Post Details +

        Understand and use the most common fields of the requested content.

        +
        +
      • + +
      • + RB: Get Voters List On Post +

        This example will output the active vote totals for the post/comment passed as an argument to the script.

        +
        +
      • + +
      • + RB: Get Post Comments +

        This example will output the reply details and totals for the post/comment passed as an argument to the script.

        +
        +
      • + +
      • + RB: Get Account Replies +

        Fetching the replies written to a particular account.

        +
        +
      • + +
      • + RB: Get Account Comments +

        Fetching the comments written by a particular account.

        +
        +
      • + +
      • + RB: Submit Post +

        This example will broadcast a new post to the blockchain using the values provided. To create a post in ruby, we will use a Radiator::Transaction containing a comment operation, which is how all content is stored internally.

        +
        +
      • + +
      • + RB: Submit Comment Reply +

        By the end of this tutorial you should know how to prepare comments for Steem and then submit using Radiator.

        +
        +
      • + +
      • + RB: Edit Content Patching +
        +
        +
      • + +
      • + RB: Stream Blockchain Transactions +

        How to stream transactions and operations from Steem blockchain.

        +
        +
      • + +
      • + RB: Reblogging Post +

        To reblog (‘resteem’) a post, we can use a custom json operation that is handled by the follow plugin.

        +
        +
      • + +
      • + RB: Search Accounts +

        Performing a search on account by names starting with a given input.

        +
        +
      • + +
      • + RB: Search Tags +

        Performing a search for tags.

        +
        +
      • + +
      • + RB: Vote On Content +

        To vote for a post (or reply), we can use a vote operation and provide the voting weight (the percentage of one vote being cast).

        +
        +
      • + +
      • + RB: Follow Another User +

        How to follow/unfollow another user.

        +
        +
      • + +
      • + RB: Get Follower And Following List +

        How to create a list of followers and accounts that you are following.

        +
        +
      • + +
      + + + + + +

      Recipes

      + + + + +
      +
      + +
      + + + + + + + + diff --git a/docs/unused/accounts.md b/docs/unused/accounts.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/unused/authority_and_validation.md b/docs/unused/authority_and_validation.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/unused/blocks_and_transactions.md b/docs/unused/blocks_and_transactions.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/unused/community.html b/docs/unused/community.html new file mode 100644 index 0000000000000000000000000000000000000000..2885e79d4bea01211a5c0024ed51c946eb15a185 --- /dev/null +++ b/docs/unused/community.html @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + +Community | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +

      Steemdata

      + +

      Mongo database for accessing steem data.

      + +
      Host: mongo0.steemdata.com
      +Port: 27017
      +
      +Database: Steem
      +Username: steemit
      +Password: steemit
      +
      + +

      Official site: steemdata

      + +

      SteemSQL

      + +

      Microsoft SQL database for accessing steem data

      + +

      Official site: steemsql

      + +
      + + + + + + + + diff --git a/docs/unused/database_api.html b/docs/unused/database_api.html new file mode 100644 index 0000000000000000000000000000000000000000..ad41ffee8b308d8a62d2393daa156da776cbca3e --- /dev/null +++ b/docs/unused/database_api.html @@ -0,0 +1,348 @@ + + + + + + + + + + + + + + + + + + +Database API | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +

      Subscription examples

      + +
      steem.api.setSubscribeCallback(callback, clearFilter, function(err, result) {
      +  console.log(err, result);
      +});
      +
      + +
      steem.api.setPendingTransactionCallback(cb, function(err, result) {
      +  console.log(err, result);
      +});
      +
      + +
      steem.api.setBlockAppliedCallback(cb, function(err, result) {
      +  console.log(err, result);
      +});
      +
      + +
      steem.api.cancelAllSubscriptions(function(err, result) {
      +  console.log(err, result);
      +});
      +
      + +
      + + + + + + + + diff --git a/docs/unused/docker.html b/docs/unused/docker.html new file mode 100644 index 0000000000000000000000000000000000000000..5ea750c43f00c21d74cb2d8aecd4025e005a22db --- /dev/null +++ b/docs/unused/docker.html @@ -0,0 +1,364 @@ + + + + + + + + + + + + + + + + + + +Docker | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +

      Just want to get up and running quickly? Try deploying a pre-built dockerized container. Both common binary types are included.

      + +

      Just want to get up and running quickly? Try deploying a pre-built +dockerized container. Both common binary types are included.

      + +

      Dockerized p2p Node

      + +

      To run a p2p node (ca. 2GB of memory is required at the moment):

      + +
      docker run \
      +    -d -p 2001:2001 -p 8090:8090 --name steemd-default \
      +    steemit/steem
      +
      +docker logs -f steemd-default  # follow along
      +
      + +

      Dockerized Full Node

      + +

      To run a node with all the data (e.g. for supporting a content website) +that uses ca. 14GB of memory and growing:

      + +
      docker run \
      +    --env USE_WAY_TOO_MUCH_RAM=1 \
      +    -d -p 2001:2001 -p 8090:8090 --name steemd-full \
      +    steemit/steem
      +
      +docker logs -f steemd-full
      +
      + +

      Seed Nodes

      + +

      A list of some seed nodes to get you started can be found in +doc/seednodes.txt.

      + +

      This same file is baked into the docker images and can be overridden by +setting STEEMD_SEED_NODES in the container environment at docker run +time to a whitespace delimited list of seed nodes (with port).

      + +
      + + + + + + + + diff --git a/docs/unused/globals.md b/docs/unused/globals.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/unused/keys.md b/docs/unused/keys.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/unused/market.md b/docs/unused/market.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/unused/steemd.html b/docs/unused/steemd.html new file mode 100644 index 0000000000000000000000000000000000000000..a1e8f5142cf830d295abe63f8db679e1c457a793 --- /dev/null +++ b/docs/unused/steemd.html @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + +Steemd | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      + + +
      + + + + + + + + diff --git a/docs/unused/tags.html b/docs/unused/tags.html new file mode 100644 index 0000000000000000000000000000000000000000..574ee9e045f1e051ab09a640f2aeaaa11119a156 --- /dev/null +++ b/docs/unused/tags.html @@ -0,0 +1,333 @@ + + + + + + + + + + + + + + + + + + +Tags | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +

      Tags examples

      + +
      steem.api.setSubscribeCallback(callback, clearFilter, function(err, result) {
      +  console.log(err, result);
      +});
      +
      + +
      + + + + + + + + diff --git a/docs/unused/tutorials.html b/docs/unused/tutorials.html new file mode 100644 index 0000000000000000000000000000000000000000..aa6c3a896c851205373771371c13aa821c0331a9 --- /dev/null +++ b/docs/unused/tutorials.html @@ -0,0 +1,391 @@ + + + + + + + + + + + + + + + + + + +Tutorials | Steem Developer + + + + + + + + + + + + + + + +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + + + + + + + + + +
      +
      +
      +

      Steem Developer Portal

      + + + +
      +
      steem-py examples
      +

      Install steem-py:

      + +
      $ sudo apt-get install libffi-dev libssl-dev python-dev python3-pip
      +$ pip3 install steem
      +
      + +
      Auto Reply Bot
      +

      The most easy auto-reply bot can be coded with just a few lines of code:

      + +
      Block Stream
      +

      This module allows to stream blocks and individual operations from the blockchain and run bots with a minimum of code. +This example code shows all comments starting at block 1893850.

      + +
      Operation Stream
      +

      Example for operation Stream:

      + +
      Decentralized Exchange
      +

      Example for decentralized exchange:

      + +
      from steem import Steem
      +import os
      +import json
      +steem = Steem(wif="<posting-key-for-default-author>")
      +for c in steem.stream_comments():
      +if "Anything you want" in c["body"]:
      +    print(c.reply(".. anything you want"))
      +
      + +
      from steem.blockchain import Blockchain
      +from pprint import pprint
      +
      +for a in blockchain.blocks()
      +    pprint(a)
      +
      + +
      from steem.blockchain import Blockchain
      +from pprint import pprint
      +
      +for a in blockchain.ops()
      +    pprint(a)
      +
      + +
      from pprint import pprint
      +from steem import Steem
      +from steem.dex import Dex
      +
      +steem = Steem()
      +dex = Dex(steem)
      +pprint(dex.buy(10, "SBD", 100))
      +pprint(dex.sell(10, "SBD", 100))
      +pprint(dex.cancel("24432422"))
      +pprint(dex.returnTicker())
      +pprint(dex.return24Volume())
      +pprint(dex.returnOrderBook(2))
      +pprint(dex.ws.get_order_book(10, api="market_history"))
      +pprint(dex.returnTradeHistory())
      +pprint(dex.returnMarketHistoryBuckets())
      +pprint(dex.returnMarketHistory(300))
      +pprint(dex.get_lowest_ask())
      +pprint(dex.get_higest_bid())
      +pprint(dex.transfer(10, "SBD", "fabian", "foobar"))
      +
      + + +
      + + + + + + + +