20 |
21 |
--------------------------------------------------------------------------------
/_plugins/keywordify_filter.rb:
--------------------------------------------------------------------------------
1 | module Jekyll
2 | module KeywordifyFilter
3 | SEP = /[^a-z0-9_]+/i
4 | STOP_WORDS = %w(i me my myself we our ours ourselves you your yours yourself
5 | yourselves he him his himself she her hers herself it its itself they them
6 | their theirs themselves what which who whom this that these those am is
7 | are was were be been being have has had having do does did doing a an the
8 | and but if or because as until while of at by for with about against
9 | between into through during before after above below to from up down in
10 | out on off over under again further then once here there when where why
11 | how all any both each few more most other some such no nor not only own
12 | same so than too very s t can will just don should now)
13 |
14 | def keywordify(object, mode = 'subtract', extra_keywords = nil)
15 | output = []
16 |
17 | case object
18 | when Hash
19 | object.each do |k, v|
20 | output += keywordify(k).split(SEP)
21 | output += keywordify(v).split(SEP)
22 | end
23 | when Array
24 | object.each do |k, v|
25 | output += keywordify(v).split(SEP)
26 | end
27 | when NilClass
28 | # no-op
29 | else
30 | output += object.inspect.split(SEP)
31 | end
32 |
33 | output = output.map(&:strip).map(&:downcase)
34 | extra_keywords = extra_keywords.to_s.split(SEP).map(&:strip).map(&:downcase)
35 |
36 | case mode
37 | when 'subtract' then output -= extra_keywords
38 | when 'add' then output += extra_keywords
39 | else; raise "Unknown mode: #{mode}"
40 | end
41 |
42 | (output - STOP_WORDS).uniq.compact.join(' ').strip
43 | end
44 | end
45 | end
46 |
47 | Liquid::Template.register_filter(Jekyll::KeywordifyFilter)
48 |
49 | # USAGE:
50 | # {{object | keywordify}}
51 | # {{object | keywordify 'subtract', 'some words to subtract'}}
52 | # {{object | keywordify 'add', 'additional words to add'}}
53 |
--------------------------------------------------------------------------------
/_plugins/liquify_filter.rb:
--------------------------------------------------------------------------------
1 | module Jekyll
2 | module LiquidFilter
3 | def liquify(input)
4 | Liquid::Template.parse(input).render(@context)
5 | end
6 | end
7 | end
8 |
9 | Liquid::Template.register_filter(Jekyll::LiquidFilter)
10 |
--------------------------------------------------------------------------------
/_plugins/neat_json_filter.rb:
--------------------------------------------------------------------------------
1 | require 'neatjson'
2 |
3 | module Jekyll
4 | module NeatJsonFilter
5 | def neat_json(input)
6 | input = JSON[input] rescue input if input.class == String
7 |
8 | begin
9 | JSON.neat_generate(input, wrap: 50, after_comma: 1, after_colon: 1)
10 | rescue JSON::GeneratorError => e
11 | "Error: #{e}."
12 | end
13 | end
14 | end
15 | end
16 |
17 | Liquid::Template.register_filter(Jekyll::NeatJsonFilter)
18 |
19 | # USAGE:
20 | # {{ site.data.user | neat_json }}
21 | #
22 | # neatjson formatting options: https://github.com/Phrogz/NeatJSON#options
23 |
--------------------------------------------------------------------------------
/_plugins/post_generator.rb:
--------------------------------------------------------------------------------
1 | require 'steem'
2 |
3 | module Jekyll
4 | module SteemPostGenerator
5 | def steem_post(slug)
6 | slug = slug.split('@').last
7 | slug = slug.split('/')
8 | author = slug[0]
9 | permlink = slug[1..-1].join('/')
10 | permlink = permlink.split('?').first
11 | permlink = permlink.split('#').first
12 | api = Steem::CondenserApi.new
13 |
14 | api.get_content(author, permlink) do |content|
15 | body = content.body
16 |
17 | # This will normalize image hoster proxy URLs that the author copied
18 | # from another post.
19 |
20 | body = body.gsub(/https:\/\/steemitimages.com\/[0-9]+x0\/https:\/\//, 'https://')
21 |
22 | # Although it works on steemit.com and many other markdown interpretors,
23 | # kramdown doesn't like this, so we have to fix it:
24 | #
25 | #
26 | # This *won't* work.
27 | #
28 | #
29 | # See: https://stackoverflow.blog/2008/06/25/three-markdown-gotcha/
30 |
31 | body = body.gsub(/<([^\/].+)>(.+)<\/\1>/m) do
32 | match = Regexp.last_match
33 | html = Kramdown::Document.new(match[2]).to_html
34 |
35 | "<#{match[1]}>#{html.gsub("\n", " ")}#{match[1]}>"
36 | end
37 |
38 | body + <<~DONE
39 | \n
40 |
45 | DONE
46 | end
47 | end
48 | end
49 | end
50 |
51 | Liquid::Template.register_filter(Jekyll::SteemPostGenerator)
52 |
53 | # USAGE:
54 | # {{'@stoodkev/how-to-set-up-and-use-multisignature-accounts-on-steem-blockchain' | steem_post}}
55 |
--------------------------------------------------------------------------------
/_quickstart/_defaults.md:
--------------------------------------------------------------------------------
1 | ---
2 | title:
3 | position:
4 | type:
5 | description:
6 | ---
7 |
--------------------------------------------------------------------------------
/_quickstart/choose_library.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Choose Library
3 | position: 1
4 | exclude: true
5 | ---
6 |
7 | 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.
8 |
9 | Building a picture discovery app is a breeze with the [JavaScript]({{ '/tutorials/#tutorials-javascript' | relative_url }}) library. There is also a [Python]({{ '/tutorials/#tutorials-python' | relative_url }}) library available, [Steemit.com]({{ '/services/#services-steemit' | relative_url }}) and [SBDS]({{ '/services/#services-sbds' | relative_url }}) services, as well as many [community projects]({{ '/resources/#resources-overview' | relative_url }}) which could be beneficial for your steem project.
10 |
--------------------------------------------------------------------------------
/_resources/_defaults.md:
--------------------------------------------------------------------------------
1 | ---
2 | title:
3 | position:
4 | type:
5 | description:
6 | ---
7 |
--------------------------------------------------------------------------------
/_resources/_piston.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: PistonCLI
3 | position: 4
4 | ---
5 |
6 | Piston is a command line tool to interact with the STEEM network. Piston is
7 | written in Python and highly customizable for building steem tools and performing
8 | wallet operations.
9 |
10 | **Piston** - [https://github.com/xeroc/python-steem](https://github.com/xeroc/python-steem)
11 |
12 | Install with pip3:
13 |
14 | ```
15 | sudo apt-get install libffi-dev libssl-dev python-dev python3-pip
16 | pip3 install steem
17 | ```
18 |
19 | Manual installation:
20 |
21 | ```
22 | git clone https://github.com/xeroc/python-steem/
23 | cd python-steem
24 | python3 setup.py install --user
25 | ```
26 |
27 | Upgrade
28 |
29 | ```
30 | pip3 install steem --user --upgrade
31 | ```
32 |
33 | Additional dependencies
34 |
35 | steemapi.steemasyncclient:
36 |
37 | - asyncio==3.4.3
38 | - pyyaml==3.11
39 | - Documentation
40 |
41 | Thanks to readthedocs.io, the documentation can be viewed on pysteem.com
42 |
43 | Documentation is written with the help of sphinx and can be compile to html with:
44 |
45 | ~~~
46 | cd docs
47 | make html
48 | ~~~
--------------------------------------------------------------------------------
/_resources/bluepaper.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Bluepaper
3 | position: 2
4 | ---
5 |
6 | The Steem Bluepaper describes how the Steem blockchain works, and provides an overview of the key features.
7 |
8 | [https://steem.com/steem-bluepaper.pdf](https://steem.com/steem-bluepaper.pdf)
9 |
--------------------------------------------------------------------------------
/_resources/client_libs.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Client Libraries
3 | position: 2
4 | ---
5 |
6 | **Radiator** - [https://github.com/inertia186/radiator](https://github.com/inertia186/radiator)
7 |
8 | Radiator is a Ruby API client to interact with the steem blockchain.
9 |
10 | ---
11 |
12 | **Steem-JS** - [https://github.com/steemit/steem-js](https://github.com/steemit/steem-js)
13 |
14 | Pure JavaScript Steem crypto library for node.js and browsers. Can be used to construct, sign and broadcast transactions in JavaScript.
15 |
16 | ---
17 |
18 | **Steem-TX-JS** - [https://github.com/mahdiyari/steem-tx-js](https://github.com/mahdiyari/steem-tx-js)
19 |
20 | Lightweight JavaScript library for creating and signing transactions. Works with frameworks like Nativescript. This library is a solution to such cases when other libraries are not working. And also an alternative for *only* creating, signing, and broadcasting transactions.
21 |
22 | ---
23 |
24 | **DSteem** - [https://github.com/jnordberg/dsteem](https://github.com/jnordberg/dsteem)
25 |
26 | A Typescript Steem crypto library for node.js and browsers. Steemit Inc [also maintains a version of this library](https://github.com/steemit/dsteem)
27 |
28 | ---
29 |
30 | **Beem** - [https://github.com/holgern/beem](https://github.com/holgern/beem)
31 |
32 | A python library to interact with the STEEM blockchain. It includes the CLI tool beempy.
33 |
34 | ---
35 |
36 | **PHP Steem** - [https://github.com/lukestokes/php-steem-tools](https://github.com/lukestokes/php-steem-tools)
37 |
38 | Various tools and scripts written in PHP for exploring the STEEM blockchain.
39 |
40 | ---
41 |
42 | **SteemJ** - [https://github.com/marvin-we/steem-java-api-wrapper](https://github.com/marvin-we/steem-java-api-wrapper)
43 |
44 | An API Wrapper for Steem written in Java
45 |
46 | ---
47 |
48 | **GoSteem** - [https://github.com/go-steem/rpc](https://github.com/go-steem/rpc)
49 |
50 | Golang RPC client library for Steem
51 |
52 | ---
53 |
54 | **SteemClientRS** - [https://github.com/cyberpunk-ventures/steem-client-rs](https://github.com/cyberpunk-ventures/steem-client-rs)
55 |
56 | Client library for Steem blockchain built with Rust
57 |
--------------------------------------------------------------------------------
/_resources/developeradvocate.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Community & Help
3 | position: 6
4 | ---
5 |
6 | **Developer Advocate**
7 |
8 | The members of the Steemit Inc. development team are currently the main contributors to the Steem blockchain software. They oversee the open source [Steem](https://github.com/steemit/steem) GitHub repository, and maintain many of the open source [libraries](https://github.com/steemit) that developers use.
9 |
10 | Steemit’s [Developer Advocate](mailto:da@steemit.com) 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](mailto:da@steemit.com).
11 |
12 | The D.A. receives a lot of emails, but will respond as quickly as possible.
13 |
14 | ---
15 |
16 | **SteemDevs Chat** - [https://discord.gg/B29Bbng](https://discord.gg/B29Bbng)
17 |
18 | SteemDevs chat is a public Discord chat community where members of the Steem development community go to discuss Steem development, and other related topics.
19 | 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.
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/_resources/overview.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Overview
3 | position: 1
4 | ---
5 |
6 | Steem has an active developer community that is constantly innovating on the blockchain.
7 | While the their presence on this page doesn't constitute endorsement,
8 | it's likely a few of these projects could be beneficial for your Steem idea.
--------------------------------------------------------------------------------
/_resources/steem_connect_libs.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: SteemConnect Libs
3 | position: 4
4 | ---
5 |
6 | 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.
7 |
8 | If you're wondering what SteemConnect is, go [here]({{ '/services/#services-steemconnect' | relative_url }}).
9 |
10 | ---
11 |
12 | **SteemConnect SDK** - [https://github.com/steemit/steemconnect-sdk](https://github.com/steemit/steemconnect-sdk)
13 |
14 | An official javascript library for utilizing SteemConnect.
15 |
16 | ---
17 |
18 | **steem-connect-firebase-function** - [https://jakipatryk.github.io/steemconnect-firebase-functions/](https://jakipatryk.github.io/steemconnect-firebase-functions/)
19 |
20 | A TypeScript library that can help you build applications with SteemConnect and Firebase.
21 |
22 | ---
23 |
24 | **Sc2 SDK PHP** - [https://github.com/hernandev/sc2-sdk-php](https://github.com/hernandev/sc2-sdk-php)
25 |
26 | Easily integrate STEEM blockchain into your PHP applications, though SteemConnect.
27 |
28 | ---
29 |
30 | **Social Auth SteemConnect** - [https://pypi.python.org/pypi/social-auth-steemconnect/0.0.2](https://pypi.python.org/pypi/social-auth-steemconnect/0.0.2)
31 |
32 | Pluggable authentication backend for python-social-auth, that allows authentication via SteemConnect (v2).
33 |
34 | ---
35 |
36 | **steemconnect-python-client** - [https://github.com/emre/steemconnect-python-client](https://github.com/emre/steemconnect-python-client)
37 |
38 | steemconnect-python-client is a simple yet powerful library to interact with the Steemconnect.
39 |
40 | ---
41 |
42 | **omniauth-steemconnect** - [https://rubygems.org/gems/omniauth-steemconnect/versions/0.1.0](https://rubygems.org/gems/omniauth-steemconnect/versions/0.1.0)
43 |
44 | Ruby Omniauth2 Strategy for SteemConnect.
45 |
46 | ---
47 |
48 | **SwiftyConnect** - [https://github.com/caspernikus/SwiftyConnect](https://github.com/caspernikus/SwiftyConnect)
49 |
50 | SteemConnect Library for iOS / Swift.
51 |
52 | ---
53 |
54 | **SteemConnect4j** - [https://github.com/hapramp/steemconnect4j](https://github.com/hapramp/steemconnect4j)
55 |
56 | Steemconnect SDK for Java.
57 |
--------------------------------------------------------------------------------
/_resources/steem_keychain.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Steem Keychain
3 | position: 5
4 | ---
5 |
6 | Steem Keychain is a browser extension solution to integrate web sites with the Steem blockchain.
7 |
8 | **Installation for Steem Keychain on:**
9 | * Google Chrome or Brave - [https://chrome.google.com/webstore/detail/steem-keychain/lkcjlnjfpbikmcmbachjpdbijejflpcm](https://chrome.google.com/webstore/detail/steem-keychain/lkcjlnjfpbikmcmbachjpdbijejflpcm)
10 | * Firefox - [https://addons.mozilla.org/en-US/firefox/addon/steem-keychain/](https://addons.mozilla.org/en-US/firefox/addon/steem-keychain/)
11 |
12 | For information on integrating Steem Keychain into your own web application, see: [**Website Integration**](https://github.com/MattyIce/steem-keychain/blob/master/README.md#website-integration)
13 |
--------------------------------------------------------------------------------
/_resources/tools.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Tools
3 | position: 3
4 | ---
5 |
6 | **ChainSync** - [https://github.com/aaroncox/chainsync](https://github.com/aaroncox/chainsync)
7 |
8 | A simple library to stream blocks and operations for digesting into other mediums.
9 |
10 | ---
11 |
12 | **SteemIAPI** - [http://steem.esteem.ws/](http://steem.esteem.ws/)
13 |
14 | Interactive Steem API swagger, [open-source](https://github.com/eSteemApp/steemapi) script allows you to interact with blockchain.
15 |
16 | ---
17 |
18 | **SteemSQL** - [http://www.steemsql.com/](http://www.steemsql.com/)
19 |
20 | A private Microsoft SQL server database with Steem blockchain data, subscription based, allows you to do flexible queries and analyze blockchain data.
21 |
22 | ---
23 |
24 | **eSync** - [https://github.com/eSteemApp/esync](https://github.com/eSteemApp/esync)
25 |
26 | eSync extracts Steem blockchain data and saves into Mongodb, written in Nodejs.
27 |
28 | ---
29 |
30 | **SteemPress** - [https://github.com/drov0/steempress](https://github.com/drov0/steempress)
31 |
32 | SteemPress is a WordPress plugin to allow you to automatically publish your articles to the Steem blockchain whenever you publish them on your blog.
33 |
34 | ---
35 |
36 | _**Many more projects and tools can be found at [https://steemprojects.com](https://steemprojects.com)**_
37 |
38 | ---
39 |
--------------------------------------------------------------------------------
/_resources/whitepaper.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Whitepaper
3 | position: 3
4 | ---
5 |
6 | The Steem Whitepaper provides a more in depth technical analysis of how the Steem blockchain operates.
7 |
8 | [https://steem.com/SteemWhitePaper.pdf](https://steem.com/SteemWhitePaper.pdf)
9 |
--------------------------------------------------------------------------------
/_sass/_borland.scss:
--------------------------------------------------------------------------------
1 | code .hll { background-color: #ffffcc }
2 | code .c { color: #aaaaaa; font-style: italic } /* Comment */
3 | code .err { color: #F00000; background-color: #F0A0A0 } /* Error */
4 | code .k { color: #0000aa } /* Keyword */
5 | code .cm { color: #aaaaaa; font-style: italic } /* Comment.Multiline */
6 | code .cp { color: #4c8317 } /* Comment.Preproc */
7 | code .c1 { color: #aaaaaa; font-style: italic } /* Comment.Single */
8 | code .cs { color: #0000aa; font-style: italic } /* Comment.Special */
9 | code .gd { color: #aa0000 } /* Generic.Deleted */
10 | code .ge { font-style: italic } /* Generic.Emph */
11 | code .gr { color: #aa0000 } /* Generic.Error */
12 | code .gh { color: #000080; font-weight: bold } /* Generic.Heading */
13 | code .gi { color: #00aa00 } /* Generic.Inserted */
14 | code .go { color: #888888 } /* Generic.Output */
15 | code .gp { color: #555555 } /* Generic.Prompt */
16 | code .gs { font-weight: bold } /* Generic.Strong */
17 | code .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
18 | code .gt { color: #aa0000 } /* Generic.Traceback */
19 | code .kc { color: #0000aa } /* Keyword.Constant */
20 | code .kd { color: #0000aa } /* Keyword.Declaration */
21 | code .kn { color: #0000aa } /* Keyword.Namespace */
22 | code .kp { color: #0000aa } /* Keyword.Pseudo */
23 | code .kr { color: #0000aa } /* Keyword.Reserved */
24 | code .kt { color: #00aaaa } /* Keyword.Type */
25 | code .m { color: #009999 } /* Literal.Number */
26 | code .s { color: #aa5500 } /* Literal.String */
27 | code .na { color: #1e90ff } /* Name.Attribute */
28 | code .nb { color: #00aaaa } /* Name.Builtin */
29 | code .nc { color: #00aa00; text-decoration: underline } /* Name.Class */
30 | code .no { color: #aa0000 } /* Name.Constant */
31 | code .nd { color: #888888 } /* Name.Decorator */
32 | code .ni { color: #800000; font-weight: bold } /* Name.Entity */
33 | code .nf { color: #00aa00 } /* Name.Function */
34 | code .nn { color: #00aaaa; text-decoration: underline } /* Name.Namespace */
35 | code .nt { color: #1e90ff; font-weight: bold } /* Name.Tag */
36 | code .nv { color: #aa0000 } /* Name.Variable */
37 | code .ow { color: #0000aa } /* Operator.Word */
38 | code .w { color: #bbbbbb } /* Text.Whitespace */
39 | code .mf { color: #009999 } /* Literal.Number.Float */
40 | code .mh { color: #009999 } /* Literal.Number.Hex */
41 | code .mi { color: #009999 } /* Literal.Number.Integer */
42 | code .mo { color: #009999 } /* Literal.Number.Oct */
43 | code .sb { color: #aa5500 } /* Literal.String.Backtick */
44 | code .sc { color: #aa5500 } /* Literal.String.Char */
45 | code .sd { color: #aa5500 } /* Literal.String.Doc */
46 | code .s2 { color: #aa5500 } /* Literal.String.Double */
47 | code .se { color: #aa5500 } /* Literal.String.Escape */
48 | code .sh { color: #aa5500 } /* Literal.String.Heredoc */
49 | code .si { color: #aa5500 } /* Literal.String.Interpol */
50 | code .sx { color: #aa5500 } /* Literal.String.Other */
51 | code .sr { color: #009999 } /* Literal.String.Regex */
52 | code .s1 { color: #aa5500 } /* Literal.String.Single */
53 | code .ss { color: #0000aa } /* Literal.String.Symbol */
54 | code .bp { color: #00aaaa } /* Name.Builtin.Pseudo */
55 | code .vc { color: #aa0000 } /* Name.Variable.Class */
56 | code .vg { color: #aa0000 } /* Name.Variable.Global */
57 | code .vi { color: #aa0000 } /* Name.Variable.Instance */
58 | code .il { color: #009999 } /* Literal.Number.Integer.Long */
59 |
--------------------------------------------------------------------------------
/_sass/_mixins.scss:
--------------------------------------------------------------------------------
1 | @mixin flex-direction($values) {
2 | -webkit-flex-direction: $values;
3 | flex-direction: $values;
4 | }
5 |
6 | @mixin flex-flow($values) {
7 | -webkit-flex-flow: $values;
8 | flex-flow: $values;
9 | }
10 |
11 | @mixin align-items($values) {
12 | -webkit-align-items: $values;
13 | align-items: $values;
14 | }
15 |
16 | @mixin justify-content($values) {
17 | -webkit-justify-content: $values;
18 | justify-content: $values;
19 | }
20 |
21 | @mixin flex($values) {
22 | -webkit-flex: $values;
23 | flex: $values;
24 | }
25 |
26 | @mixin display-flex() {
27 | display: -webkit-flex;
28 | display: flex;
29 | }
30 |
31 | @mixin display-inline-flex() {
32 | display: -webkit-inline-flex;
33 | display: inline-flex;
34 | }
35 |
--------------------------------------------------------------------------------
/_services/_defaults.md:
--------------------------------------------------------------------------------
1 | ---
2 | title:
3 | position:
4 | type:
5 | description:
6 | ---
7 |
--------------------------------------------------------------------------------
/_services/steem.dao.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Steem.DAO
3 | position: 5
4 | ---
5 |
6 | #### Intro
7 |
8 | Steem.DAO is an account on the Steem blockchain ([@steem.dao](https://steemd.com/@steem.dao)) that receives 10% of the [annual new supply]({{ '/tutorials-recipes/understanding-configuration-values#STEEM_INFLATION_NARROWING_PERIOD' | relative_url }}). These funds are dedicated to the Steem Proposal System (SPS) for platform improvements.
9 |
10 | Every day a portion of the SBD fund managed by the Steem.DAO is distributed to various proposals, depending on **a)** how much the proposal is asking for and **b)** how much approval the proposal has.
11 |
12 | > The Steem.DAO was a concept proposed by [@blocktrades](https://steemd.com/@blocktrades) to allow Steem users to publicly propose work they are willing to do in exchange for pay. Steem users can then vote on these proposals in almost the same way they vote for witnesses. It uses stake-weighted votes, but voters can vote for as many proposals as they want.
13 |
14 | See original announcement: [https://steemit.com/steem/@steemitblog/hf21-sps-and-eip-explained](https://steemit.com/steem/@steemitblog/hf21-sps-and-eip-explained)
15 |
16 | #### Tools
17 |
18 | * [https://steemproposals.com](https://steemproposals.com) - Steem Proposals UI by [@dmitrydao](https://steemit.com/@dmitrydao)
19 | * [https://steempeak.com/proposals](https://steempeak.com/proposals) - Steem Proposals UI by [@steempeak](https://steemit.com/@steempeak)
20 | * [https://steemitwallet.com/proposals](https://steemitwallet.com/proposals) - Vote for your favorite Steem proposals without leaving the safety of steemitwallet.com.
21 | * [https://joticajulian.github.io/steemexplorer/#/proposals](https://joticajulian.github.io/steemexplorer/#/proposals) - Check who voted what.
22 | * [https://steemit.com/@proposalalert](https://steemit.com/@proposalalert) - Follow this account to be notified of new proposals.
23 |
24 | #### API
25 |
26 | To access the proposal system by JSON-RPC request, see: [`database_api.list_proposals`]({{ '/apidefinitions/#database_api.list_proposals' | relative_url }}). Proposal creation by broadcast operation, see: [`create_proposal`]({{ '/apidefinitions/#broadcast_ops_create_proposal' | relative_url }}).
27 |
--------------------------------------------------------------------------------
/_services/steemconnect.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: SteemConnect
3 | position: 2
4 | ---
5 |
6 | **What is SteemConnect?**
7 |
8 | 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.
9 |
10 |
11 | **How SteemConnect is implemented**
12 |
13 | SteemConnect works by granting an access token to the requesting app once the application has been approved.
14 | A full tutorial on how to set up an application, request authorisation and grant access can be found [here]({{ '/tutorials-javascript/steemconnect' | relative_url }}).
15 |
16 | **Steem Authorisation and OAuth 2**
17 |
18 | 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.
19 | Simplified, the process includes the following steps:
20 |
21 | 1. The user is presented with an authorisation link that requests a token from the API
22 | 2. The user has to log in to the service to verify their identity whereupon they will be prompted to authorise the application
23 | 3. The user is redirected to the application redirect URI along with the access token
24 |
25 | 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.
26 | A full breakdown of OAuth2 and how it applies to SteemIt and SteemConnect can be found [here](https://github.com/steemit/steemconnect/wiki/OAuth-2#code-authorization-flow).
27 |
28 | **Useful Links**
29 |
30 | * [SteemConnect Repo](https://github.com/steemit/steemconnect)
31 | * [Community Resources]({{ '/resources/#community-steem-connect-libs' | relative_url }})
32 |
33 |
34 | For additional material you can refer to the original steemit [blog](https://steemit.com/steemconnect/@busy.org/introducing-steemconnect-by-busy-identity-authentication-authorization-for-steem-blockchain-s-apps) post by [busy.org](https://busy.org/)
35 |
--------------------------------------------------------------------------------
/_steemjs/_defaults.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/steemit/devportal/78bffd6aa73a4bb0f5f278ca9f003c7b890a398f/_steemjs/_defaults.md
--------------------------------------------------------------------------------
/_steemjs/getting_started.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/steemit/devportal/78bffd6aa73a4bb0f5f278ca9f003c7b890a398f/_steemjs/getting_started.md
--------------------------------------------------------------------------------
/_testnet/_defaults.md:
--------------------------------------------------------------------------------
1 | ---
2 | title:
3 | position:
4 | type:
5 | description:
6 | ---
7 |
--------------------------------------------------------------------------------
/_testnet/tools.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Tools
3 | position: 1
4 | description: Directory of community testnet tools
5 | ---
6 |
7 | Testnet ID | Tool | Purpose
8 | -----------|------|--------
9 | {%
10 | for tool in site.data.testnet.tools
11 | %}{{
12 | tool.testnet_id
13 | }} | [{{tool.name}}]({{tool.url}}) | {{
14 | tool.purpose
15 | }}
16 | {% endfor %}
17 |
--------------------------------------------------------------------------------
/_tutorials-javascript/_defaults.md:
--------------------------------------------------------------------------------
1 | ---
2 | title:
3 | position:
4 | type:
5 | description:
6 | ---
7 |
--------------------------------------------------------------------------------
/_tutorials-javascript/getting_started.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'JS: Getting Started'
3 | position: 0
4 | description: "Prepare your development environment to use Javascript with the Steem blockchain."
5 | layout: full
6 | ---
7 | Full, runnable src of [Getting Started](https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/00_getting_started) can be downloaded as part of the [JS tutorials repository](https://github.com/steemit/devportal-tutorials-js).
8 |
9 |
10 |
11 |
12 | For Javascript tutorials, we will use the opensource library [dsteem](https://github.com/steemit/dsteem).
13 |
14 | ### Node.js
15 |
16 | To get the most out of these tutorials, you should be familiar with [Node.js](https://nodejs.org/en/), [ES6](https://babeljs.io/learn-es2015/) aka [es2015](http://www.ecma-international.org/ecma-262/6.0/), the DOM, and modern Javascript programming practices.
17 | 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.
18 |
19 | ### Your Dev Environment
20 |
21 | These tutorials require [Node.js 8.9+](https://nodejs.org/en/download/). [Yarn](https://yarnpkg.com/en/) is nice, but not required. Runnable versions of the tutorials are located [in this github repo](https://github.com/steemit/devportal-tutorials-js).
22 | If you haven't chosen an editor, you can use [Atom](https://atom.io/), [Sublime](https://www.sublimetext.com/), [Intellij](https://www.jetbrains.com/idea/), [Vi](https://en.wikipedia.org/wiki/Vi), etc.
23 |
24 | If you want to keep multiple versions of Node on your system try [Node Version Manager](https://github.com/creationix/nvm).
25 |
26 | ### Running a typical Tutorial
27 |
28 | Let's say you wanted to run the very [first tutorial](blog_feed), `01_blog_feed`. Here's how you'd do it:
29 |
30 | 1. From Bash:
31 |
32 | ```bash
33 | git clone https://github.com/steemit/devportal-tutorials-js.git
34 |
35 | cd devportal-tutorials-js/tutorials/01_blog_feed
36 | npm i
37 | npm run dev-server
38 | ```
39 |
40 | 1. open http://localhost:3000/ in your web browser
41 |
42 | ```
43 | ### Github
44 |
45 | If you'd rather clone projects in a windowed environment rather than the terminal, consider [Github Desktop](https://desktop.github.com/).
46 | ```
47 |
48 |
49 | ---
50 |
--------------------------------------------------------------------------------
/_tutorials-javascript/search_accounts.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'JS: Search Accounts'
3 | position: 15
4 | description: "_By the end of this tutorial you should know how to call a list of user names from the steem blockchain_"
5 | layout: full
6 | ---
7 | Full, runnable src of [Search Accounts](https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/15_search_accounts) can be downloaded as part of the [JS tutorials repository](https://github.com/steemit/devportal-tutorials-js).
8 |
9 |
10 |
11 |
12 | 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`.
13 |
14 | ## Intro
15 |
16 | 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:
17 |
18 | 1. The max number of user names that needs to be displayed by the search
19 | 2. The string representing the first characters of the user name you are searching for
20 |
21 | 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.
22 |
23 | ## Steps
24 |
25 | 1. [**Configure connection**](#configure_connection) Configuration of `dsteem` to use the proper connection and network.
26 | 2. [**Collecting input variables**](#collecting_input_variables) Assigning and collecting the necessary variables
27 | 3. [**Blockchain query**](#blockchain_query) Finding the data on the blockchain based on the inputs
28 | 4. [**Output**](#output) Displaying query results
29 |
30 |
31 | #### 1. **Configure connection**
32 |
33 | 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:
34 |
35 | ```javascript
36 | const dsteem = require('dsteem');
37 | let opts = {};
38 | //connect to production server
39 | opts.addressPrefix = 'STM';
40 | opts.chainId =
41 | '0000000000000000000000000000000000000000000000000000000000000000';
42 | //connect to server which is connected to the network/production
43 | const client = new dsteem.Client('https://api.steemit.com');
44 | ```
45 |
46 | #### 2. **Collecting input variables**
47 |
48 | 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.
49 |
50 | ```javascript
51 | const max = 10;
52 | window.submitAcc = async () => {
53 | const accSearch = document.getElementById("username").value;
54 | ```
55 |
56 | #### 3. **Blockchain query**
57 |
58 | 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.
59 |
60 | ```javascript
61 | const _accounts = await client.database.call('lookup_accounts',[accSearch, max]);
62 | console.log(`_accounts:`, _accounts);
63 | ```
64 |
65 | #### 4. **Output**
66 |
67 | Finally we create a list from the "_accounts" array generated in step 3.
68 |
69 | ```javascript
70 | document.getElementById('accList').innerHTML = _accounts.join(' ');
71 | }
72 | ```
73 |
74 | ## To run this tutorial
75 |
76 | 1. clone this repo
77 | 2. `cd tutorials/15_search_accounts`
78 | 3. `npm i`
79 | 4. `npm run dev-server` or `npm run start`
80 | 5. After a few moments, the server should be running at [http://localhost:3000/](http://localhost:3000/)
81 |
82 |
83 | ---
84 |
--------------------------------------------------------------------------------
/_tutorials-javascript/search_tags.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'JS: Search Tags'
3 | position: 16
4 | description: "_By the end of this tutorial you should know how to run a search for trending tags_"
5 | layout: full
6 | ---
7 | Full, runnable src of [Search Tags](https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/16_search_tags) can be downloaded as part of the [JS tutorials repository](https://github.com/steemit/devportal-tutorials-js).
8 |
9 |
10 |
11 |
12 | This tutorial runs on the main Steem blockchain.
13 |
14 | ## Intro
15 |
16 | 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.
17 |
18 | ## steps
19 |
20 | 1. [**Configure connection**](#configure-conn) Configuration of `dsteem` to use the proper connection and network.
21 | 2. [**Search input**](#search-input) Collecting the relevant search criteria
22 | 3. [**Run Search**](#run-search) Running the search on the blockchain
23 | 4. [**Output**](#output) Displaying the results of the search query
24 |
25 | #### 1. Configure connection
26 |
27 | 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:
28 |
29 | ```javascript
30 | const dsteem = require('dsteem');
31 | let opts = {};
32 | //connect to production server
33 | opts.addressPrefix = 'STM';
34 | opts.chainId =
35 | '0000000000000000000000000000000000000000000000000000000000000000';
36 | //connect to server which is connected to the network/production
37 | const client = new dsteem.Client('https://api.steemit.com');
38 | ```
39 |
40 | #### 2. Search input
41 |
42 | 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:
43 |
44 | ```javascript
45 | const max = 10;
46 | window.submitTag = async () => {
47 | const tagSearch = document.getElementById("tagName").value;
48 | ```
49 |
50 | #### 3. Run Search
51 |
52 | 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.
53 |
54 | ```javascript
55 | const _tags = await client.database.call('get_trending_tags',[tagSearch, max]);
56 | ```
57 |
58 | The result of the search is an array of tags along with their respective vital data like `comments`, `payouts`, etc.
59 |
60 | #### 4. Output
61 |
62 | 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.
63 |
64 | ```javascript
65 | console.log('tags: ', _tags);
66 | var posts = [];
67 | _tags.forEach(post => {
68 | posts.push(
69 | `
${
70 | post.name
71 | }
`
72 | );
73 | });
74 | //disply list of tags with line breaks
75 | document.getElementById('tagList').innerHTML = posts.join(' ');
76 | ```
77 |
78 | ### To run this tutorial
79 |
80 | 1. clone this repo
81 | 1. `cd tutorials/16_search_tags`
82 | 1. `npm i`
83 | 1. `npm run dev-server` or `npm run start`
84 | 1. After a few moments, the server should be running at http://localhost:3000/
85 |
86 |
87 | ---
88 |
--------------------------------------------------------------------------------
/_tutorials-python/_defaults.md:
--------------------------------------------------------------------------------
1 | ---
2 | title:
3 | position:
4 | type:
5 | description:
6 | ---
7 |
--------------------------------------------------------------------------------
/_tutorials-python/getting_started.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'PY: Getting Started'
3 | position: 0
4 | description: "The official Steem library for Python is `steem-python`. It comes with a BIP38 encrypted wallet and a practical CLI utility called `steempy`."
5 | layout: full
6 | ---
7 | Full, runnable src of [Getting Started](https://github.com/steemit/devportal-tutorials-py/tree/master/tutorials/00_getting_started) can be downloaded as part of the [PY tutorials repository](https://github.com/steemit/devportal-tutorials-py).
8 |
9 |
10 |
11 |
12 | The library was designed to allow Python developers to easily access the network as well as build utilities and applications.
13 |
14 | Currently steem-python documentation is generated in the standard [pydoc format](https://steem.readthedocs.io/en/latest/).
15 |
16 | Documentation is available at: [Official steem-python Docs](https://github.com/steemit/steem-python).
17 |
18 | ---
19 |
20 | #### Dev requirements
21 |
22 | In our Python tutorials we recommend developers to be familiar with following requirements/libraries.
23 |
24 |
25 | * Python developer should be familiar with Python 3.x and above
26 |
27 | * Medium knowledge of package manager `pip/pip3` and/or `pipenv` is required, since our tutorials will be using package manager to get started quickly.
28 |
29 | * 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.
30 |
31 | * Python environment path should be set up properly so that terminal can access proper python library without conflicts.
32 |
33 | * Additional and optional packages that we might use: setuptools, brew
34 |
35 |
36 | To get started with Python, you can also check official [Python installation](https://wiki.python.org/moin/BeginnersGuide/Download) and [Python tutorial](https://docs.python.org/3/tutorial/).
37 |
38 | To get started with our Python tutorials, checkout our [first tutorial here](get_posts).
39 |
40 |
41 | ---
42 |
--------------------------------------------------------------------------------
/_tutorials-python/reblogging_post.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'PY: Reblogging Post'
3 | position: 14
4 | description: "We will show how to reblog or resteem post using Python, with username and posting private key."
5 | layout: full
6 | ---
7 | Full, runnable src of [Reblogging Post](https://github.com/steemit/devportal-tutorials-py/tree/master/tutorials/14_reblogging_post) can be downloaded as part of the [PY tutorials repository](https://github.com/steemit/devportal-tutorials-py).
8 |
9 |
10 |
11 |
12 | Tutorial will also explain and show you how to sign/broadcast transaction on **Steem** blockchain using the [steem-python](https://github.com/steemit/steem-python) library.
13 |
14 | ## Intro
15 |
16 | Steem python library has built-in function to commit transaction and broadcast it to the network.
17 |
18 | ## Steps
19 |
20 | 1. [**App setup**](#app-setup) - Library install and import
21 | 1. [**Post list**](#post-list) - List of posts to select from trending filter
22 | 1. [**Enter user credentials**](#credentials-list) - Enter user credentails to sign transaction
23 |
24 | #### 1. App setup
25 |
26 | 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.
27 |
28 | First we import all three library and initialize Steem class
29 |
30 | ```python
31 | import pprint
32 | from pick import pick
33 | # initialize Steem class
34 | from steem import Steem
35 |
36 | s = Steem()
37 | ```
38 |
39 | #### 2. Post list
40 |
41 |
42 | Next we will fetch and make list of accounts and setup `pick` properly.
43 |
44 | ```python
45 | query = {
46 | "limit":5, #number of posts
47 | "tag":"" #tag of posts
48 | }
49 | # post list from trending post list
50 | posts = s.get_discussions_by_trending(query)
51 |
52 | title = 'Please choose post to reblog: '
53 | options = []
54 | # post list
55 | for post in posts:
56 | options.append('@'+post["author"]+'/'+post["permlink"])
57 |
58 | ```
59 |
60 | 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.
61 |
62 | #### 3. Enter user credentials
63 |
64 | Next in order to sign transaction, application asks for username and posting private key to sign transaction and broadcast it.
65 |
66 | ```python
67 | # get index and selected post
68 | option, index = pick(options, title)
69 | pprint.pprint("You selected: "+option)
70 |
71 | account = input("Enter your username? ")
72 | wif = input("Enter your Posting private key? ")
73 |
74 | # commit or build transaction
75 | c = Commit(steem=Steem(keys=[wif]))
76 |
77 | # broadcast transaction
78 | c.resteem(option, account=account)
79 |
80 | ```
81 |
82 |
83 | That's it, if transaction is successful you shouldn't see any error messages, otherwise you will be notified.
84 |
85 | ### To Run the tutorial
86 |
87 | 1. [review dev requirements](getting_started)
88 | 1. clone this repo
89 | 1. `cd tutorials/14_reblogging_post`
90 | 1. `pip install -r requirements.txt`
91 | 1. `python index.py`
92 | 1. After a few moments, you should see output in terminal/command prompt screen.
93 |
94 |
95 |
96 | ---
97 |
--------------------------------------------------------------------------------
/_tutorials-python/search_tags.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'PY: Search Tags'
3 | position: 16
4 | description: "How to pull a list of the trending tags from the blockchain using Python."
5 | layout: full
6 | ---
7 | Full, runnable src of [Search Tags](https://github.com/steemit/devportal-tutorials-py/tree/master/tutorials/16_search_tags) can be downloaded as part of the [PY tutorials repository](https://github.com/steemit/devportal-tutorials-py).
8 |
9 |
10 |
11 |
12 | Please refer to [15_search_accounts](search_accounts) which includes a tutorial for `trending tags` as well.
13 |
14 | ---
15 |
--------------------------------------------------------------------------------
/_tutorials-python/stream_blockchain_transactions.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'PY: Stream Blockchain Transactions'
3 | position: 13
4 | description: "How to stream transactions on the live **Steem** blockchain"
5 | layout: full
6 | ---
7 | Full, runnable src of [Stream Blockchain Transactions](https://github.com/steemit/devportal-tutorials-py/tree/master/tutorials/13_stream_blockchain_transactions) can be downloaded as part of the [PY tutorials repository](https://github.com/steemit/devportal-tutorials-py).
8 |
9 |
10 |
11 |
12 | In this tutorial we show you how to stream transactions on the **Steem** blockchain using the `blockchain` class found within the [steem-python](https://github.com/steemit/steem-python) library.
13 |
14 | ## Intro
15 |
16 | 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.
17 |
18 | 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.
19 |
20 | ## Steps
21 |
22 | 1. [**App setup**](#app-setup) Configure imports and initialization of libraries
23 | 1. [**Stream blocks**](#stream-blocks) Stream blocks
24 | 1. [**Sample result**](#sample-result) Stream blocks
25 |
26 | #### 1. App setup
27 |
28 | In this tutorial we use 1 package:
29 |
30 | steem - steem-python library and interaction with Blockchain
31 |
32 | ```python
33 | from steem.blockain import Blockchain
34 |
35 | blockchain = Blockchain()
36 | ```
37 |
38 | Above we create an instance of Blockchain which will give us the ability to stream the live transactions from the blockchain.
39 |
40 | #### 2. Stream blocks
41 |
42 | Next we create an instance of `stream` and then loop through the steam as transactions are available and print them to the screen.
43 |
44 | ```python
45 | stream = blockchain.stream()
46 |
47 | for post in stream:
48 | print(post)
49 | ```
50 |
51 | #### 3. Sample result
52 |
53 | ```json
54 | {
55 | "curator": "idx",
56 | "reward": "4.042446 VESTS",
57 | "comment_author": "blackbunny",
58 | "comment_permlink": "6tfv5e",
59 | "_id": "5801d1c99ca7ecd1d4387ebd89d4edab08612b35",
60 | "type": "curation_reward",
61 | "timestamp": "2018-09-21T21:11:02.005Z",
62 | "block_num": 26136919,
63 | "trx_id": "0000000000000000000000000000000000000000"
64 | }
65 | ```
66 |
67 |
68 | That's it!
69 |
70 | ### To Run the tutorial
71 |
72 | 1. [review dev requirements](getting_started)
73 | 1. clone this repo
74 | 1. `cd tutorials/13_stream_blockchain_transactions`
75 | 1. `pip install -r requirements.txt`
76 | 1. `python index.py`
77 | 1. After a few moments, you should see a prompt for input in terminal screen.
78 |
79 | ---
80 |
--------------------------------------------------------------------------------
/_tutorials-recipes/_defaults.md:
--------------------------------------------------------------------------------
1 | ---
2 | title:
3 | position:
4 | type:
5 | description:
6 | ---
--------------------------------------------------------------------------------
/_tutorials-recipes/how-to-serialize-and-sign-using-js.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: How to serialize and sign Steem transactions using Javascript
3 | position: 1
4 | description: Serialization and signing without additional Steem Javascript libraries.
5 | exclude: true
6 | layout: steem-post
7 | canonical_url: https://steemit.com/steem/@mahdiyari/how-to-serialize-and-sign-steem-transactions-using-javascript-without-steem-javascript-libraries
8 | ---
9 |
10 | {{'@mahdiyari/how-to-serialize-and-sign-steem-transactions-using-javascript-without-steem-javascript-libraries' | steem_post}}
11 |
--------------------------------------------------------------------------------
/_tutorials-recipes/mira-performance-tuning.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'MIRA: Performance Tuning'
3 | position: 1
4 | description: Provides a way to get the most performance on specific hardware.
5 | exclude: true
6 | layout: steem-post
7 | canonical_url: https://steemit.com/steemit/@gerbino/mira-performance-tuning
8 | ---
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | {{'@gerbino/mira-performance-tuning' | steem_post}}
17 |
--------------------------------------------------------------------------------
/_tutorials-recipes/using-multisignatire-accounts.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Using Multisignature Accounts
3 | position: 1
4 | description: How to set up and use multisignature accounts on Steem Blockchain.
5 | exclude: true
6 | layout: steem-post
7 | canonical_url: https://steemit.com/utopian-io/@crokkon/steem-multi-signature-transaction-guide-for-beem-python-1546636997324
8 | ---
9 |
10 | {{'@crokkon/steem-multi-signature-transaction-guide-for-beem-python-1546636997324' | steem_post}}
11 |
--------------------------------------------------------------------------------
/_tutorials-recipes/vest-to-steem.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Converting VESTS to STEEM
3 | position: 1
4 | description: How to convert VESTS to STEEM or STEEM POWER
5 | exclude: true
6 | layout: full
7 | ---
8 |
9 | ### Intro
10 |
11 | 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.
12 |
13 | ## Steps
14 |
15 | 1. [**Get Dynamic Global Properties**](#get-global) Fetch current values of global blockchain properties
16 | 1. [**Formulate VESTS_TO_STEEM**](#formula) Formulate function that will convert given VESTS to STEEM.
17 |
18 |
19 | #### 1. Get Dynamic Global Properties
20 |
21 | Following method can be used to fetch global values
22 |
23 | ```bash
24 | curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}' https://api.steemit.com
25 | ```
26 |
27 | ##### Example Output
28 |
29 | ```json
30 | {
31 | "id":1,
32 | "jsonrpc":"2.0",
33 | "result":{
34 | "head_block_number":24238248,
35 | "head_block_id":"0171d8a833dc369abd034b0c67d8725f96df9e5b",
36 | "time":"2018-07-16T22:41:24",
37 | "current_witness":"xeldal",
38 | "total_pow":514415,
39 | "num_pow_witnesses":172,
40 | "virtual_supply":"283434761.199 STEEM",
41 | "current_supply":"271729171.190 STEEM",
42 | "confidential_supply":"0.000 STEEM",
43 | "current_sbd_supply":"15498201.173 SBD",
44 | "confidential_sbd_supply":"0.000 SBD",
45 | "total_vesting_fund_steem":"192913644.627 STEEM",
46 | "total_vesting_shares":"391296886352.617261 VESTS",
47 | "total_reward_fund_steem":"0.000 STEEM",
48 | "total_reward_shares2":"0",
49 | "pending_rewarded_vesting_shares":"379159224.860656 VESTS",
50 | "pending_rewarded_vesting_steem":"185294.019 STEEM",
51 | "sbd_interest_rate":0,
52 | "sbd_print_rate":2933,
53 | "maximum_block_size":65536,
54 | "current_aslot":24315228,
55 | "recent_slots_filled":"340282366920938463463374607431768211400",
56 | "participation_count":128,
57 | "last_irreversible_block_num":24238230,
58 | "vote_power_reserve_rate":10,
59 | "average_block_size":10950,
60 | "current_reserve_ratio":200000000,
61 | "max_virtual_bandwidth":"264241152000000000000"
62 | }
63 | }
64 | ```
65 |
66 | #### 2. Formulate VESTS_TO_STEEM
67 |
68 | From above results we have everything we need to calculate STEEM from given VESTS value.
69 |
70 | 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:
71 |
72 | ```
73 | vestSteem = ( result.total_vesting_fund_steem x availableVESTS ) / result.total_vesting_shares
74 | ```
75 |
76 | That's it!
77 |
--------------------------------------------------------------------------------
/_tutorials-ruby/_defaults.md:
--------------------------------------------------------------------------------
1 | ---
2 | title:
3 | position:
4 | type:
5 | description:
6 | ---
7 |
--------------------------------------------------------------------------------
/_tutorials-ruby/blog_feed.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'RB: Blog Feed'
3 | position: 1
4 | description: "This example will output blog details to the terminal for the author specified, limited to five results."
5 | layout: full
6 | ---
7 | Full, runnable src of [Blog Feed](https://github.com/steemit/devportal-tutorials-rb/tree/master/tutorials/01_blog_feed) can be downloaded as part of the [RB tutorials repository](https://github.com/steemit/devportal-tutorials-rb).
8 |
9 |
10 |
11 |
12 | ### Script
13 |
14 | The script parses the creation date, assuming Zulu timezone (AKA UTC).
15 |
16 | 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.
17 |
18 | It also counts the words in the content body by splitting the text into an array of strings, delimited by whitespace.
19 |
20 | Finally, it creates the canonical URL by combining `parent_permlink`, `author`, and `permlink`.
21 |
22 | ### To Run
23 |
24 | First, set up your workstation using the steps provided in [Getting Started](https://developers.steem.io/tutorials-ruby/getting_started). Then you can create and execute the script (or clone from this repository):
25 |
26 | ```bash
27 | git clone git@github.com:steemit/devportal-tutorials-rb.git
28 | cd devportal-tutorials-rb/tutorials/01_blog_feed
29 | bundle install
30 | ruby blog_feed.rb steemitblog
31 | ```
32 |
33 | ### Example Output
34 |
35 | ```
36 | 2018-03-24 17:30:36 UTC
37 | Post: Happy 2nd Birthday Steem Blockchain
38 | By: steemitblog
39 | Words: 301
40 | https://steemit.com/steem/@steemitblog/happy-2nd-birthday-steem-blockchain
41 | 2018-03-07 20:56:36 UTC
42 | Post: Join Team Steemit at TokenFest!
43 | By: steemitblog
44 | Words: 104
45 | https://steemit.com/steemit/@steemitblog/join-team-steemit-at-tokenfest
46 | 2018-02-27 20:18:36 UTC
47 | Post: Smart Media Token Development
48 | By: steemitblog
49 | Words: 699
50 | https://steemit.com/smt/@steemitblog/smart-media-token-development
51 | 2018-02-25 20:55:24 UTC
52 | Reblog: I filmed this video of @ned @pkattera and @sneak talking about the SMTs and the future of Steemit
53 | By: ruwan
54 | Words: 89
55 | https://steemit.com/steemit/@ruwan/i-filmed-this-video-of-ned-pkattera-and-sneak-talking-about-the-smts-and-the-future-of-steemit
56 | 2018-02-22 17:41:00 UTC
57 | Post: STEEM 및 SBD가 GOPAX에 상장되었습니다
58 | By: steemitblog
59 | Words: 317
60 | https://steemit.com/gopax/@steemitblog/steem-sbd-gopa
61 | ```
62 |
63 |
64 | ---
65 |
--------------------------------------------------------------------------------
/_tutorials-ruby/edit_content_patching.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'RB: Edit Content Patching'
3 | position: 12
4 | description: "---"
5 | layout: full
6 | ---
7 | Full, runnable src of [Edit Content Patching](https://github.com/steemit/devportal-tutorials-rb/tree/master/tutorials/12_edit_content_patching) can be downloaded as part of the [RB tutorials repository](https://github.com/steemit/devportal-tutorials-rb).
8 |
9 |
10 | title: How to edit a Post
11 | position: 5
12 | exclude: true
13 | layout: main-script
14 | description: Patching changes to a post on Steem.
15 | main_script: tutorials-ruby/edit_content_patching.rb
16 | main_type: ruby
17 | main_script_anchor: Script
18 | ---
19 |
20 | ### Intro
21 |
22 | This tutorial will show a technique for efficiently editing a post by only broadcasting changes to the post body.
23 |
24 | ### Script
25 |
26 | 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.
27 |
28 | 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`.
29 |
30 | As stated earlier, you will need to change `broadcast` to `true`. You can also set other values to test this script on other post:
31 |
32 | * `wif` - The posting key of the author.
33 | * `author` - Name of the account that wrote the post we're modifying.
34 | * `title` - Title of the post.
35 | * `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`.
36 |
37 | ### To Run
38 |
39 | First, set up your workstation using the steps provided in [Getting Started](https://developers.steem.io/tutorials-ruby/getting_started). Then you can create and execute the script (or clone from this repository):
40 |
41 | ```bash
42 | git clone git@github.com:steemit/devportal-tutorials-rb.git
43 | cd devportal-tutorials-rb/tutorials/12_edit_content_patching
44 | bundle install
45 | ruby edit_content_patching.rb
46 | ```
47 |
48 | ### Example Output
49 |
50 | ```
51 | Changes:
52 | @@ -26,8 +26,26 @@
53 | edited)
54 | +%0AAppended content.
55 | {
56 | "jsonrpc": "2.0",
57 | "result": {
58 | "id": "f327acc1c51d907a9ba9bfac70e6fc9e99ab2865",
59 | "block_num": 23035803,
60 | "trx_num": 0,
61 | "expired": false
62 | },
63 | "id": 1
64 | }
65 | ```
66 |
67 |
68 | ---
69 |
--------------------------------------------------------------------------------
/_tutorials-ruby/follow_another_user.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'RB: Follow Another User'
3 | position: 18
4 | description: "*How to follow/unfollow another user.*"
5 | layout: full
6 | ---
7 | Full, runnable src of [Follow Another User](https://github.com/steemit/devportal-tutorials-rb/tree/master/tutorials/18_follow_another_user) can be downloaded as part of the [RB tutorials repository](https://github.com/steemit/devportal-tutorials-rb).
8 |
9 |
10 |
11 |
12 | This tutorial will take you through the process of following/muting/unfollowing/ummuting an author and checking the follow status of an author.
13 |
14 | ### Sections
15 |
16 | 1. [Follow](#follow)
17 | 1. [Check Follow](#check-follow)
18 | 1. [To Run](#to-run) - Running the example.
19 |
20 | ### Follow
21 |
22 | In the first example script, we can modify the initial configuration then run:
23 |
24 | ```bash
25 | ruby follow.rb
26 | ```
27 |
28 | Follows (and mutes) are expressed by `custom_json` with `id=follow` (mutes also use `id=follow`).
29 |
30 | Example `custom_json` operation:
31 |
32 | ```json
33 | {
34 | "id": "follow",
35 | "required_auths": [],
36 | "required_posting_auths": ["social"],
37 | "json": "[\"follow\",{\"follower\":\"social\",\"following\":\"alice\",\"what\":[\"blog\"]}]"
38 | }
39 | ```
40 |
41 | 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:
42 |
43 | 1. `follower` - The specific account that will select the author to follow/unfollow.
44 | 2. `following` - The account/author that the account would like to follow.
45 | 3. `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.
46 |
47 | #### Check Follow
48 |
49 | In the second example script:
50 |
51 | ```bash
52 | ruby check_follow.rb
53 | ```
54 |
55 | 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).
56 |
57 | 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`).
58 |
59 | ### To Run
60 |
61 | First, set up your workstation using the steps provided in [Getting Started](https://developers.steem.io/tutorials-ruby/getting_started). Then you can create and execute the script (or clone from this repository):
62 |
63 | ```bash
64 | git clone git@github.com:steemit/devportal-tutorials-rb.git
65 | cd devportal-tutorials-rb/tutorials/18_follow_another_user
66 | bundle install
67 | ruby follow.rb
68 | ```
69 |
70 | ### Example Output
71 |
72 | ```json
73 | {
74 | "jsonrpc": "2.0",
75 | "result": {
76 | "id": "025688e27999d3aa514f1f0b77c9f8d8dae31d72",
77 | "block_num": 26349355,
78 | "trx_num": 3,
79 | "expired": false
80 | },
81 | "id": 3
82 | }
83 | ```
84 |
85 | ---
86 |
--------------------------------------------------------------------------------
/_tutorials-ruby/get_follower_and_following_list.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'RB: Get Follower And Following List'
3 | position: 19
4 | description: "_How to create a list of followers and accounts that you are following._"
5 | layout: full
6 | ---
7 | Full, runnable src of [Get Follower And Following List](https://github.com/steemit/devportal-tutorials-rb/tree/master/tutorials/19_get_follower_and_following_list) can be downloaded as part of the [RB tutorials repository](https://github.com/steemit/devportal-tutorials-rb).
8 |
9 |
10 |
11 |
12 | This tutorial will take you through the process of requesting either the `follower` or `following` list for an account on the blockchain.
13 |
14 | ## Intro
15 |
16 | In `radiator`, we can request follow results using `condenser_api.get_following` or `condenser_api.get_follows` methods. These methods take the following arguments:
17 |
18 | * `account` - The account for which the follower/following process will be executed.
19 | * `start` - Where in the list to begin getting results.
20 | * `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`).
21 | * `limit` - The number of lines to be returned by the query (`limit`, maximum 1000 per call)
22 |
23 | ## Steps
24 |
25 | 1. [**Configure connection**](#connection) Configuration of `radiator` to communicate with the Steem blockchain
26 | 2. [**Input variables**](#input) Collecting the required inputs via command line arguments
27 | 3. [**Get followers/following**](#query) Get the followers or accounts being followed
28 | 4. [**Display**](#display) Return the array of results to the console
29 |
30 | #### 1. Configure connection
31 |
32 | In the first few lines we initialize the configured library and packages (libraries are described in `Gemfile`):
33 |
34 | ```ruby
35 | require 'rubygems'
36 | require 'bundler/setup'
37 |
38 | Bundler.require
39 |
40 | api = Radiator::Api.new
41 | ```
42 |
43 | Above, we have `radiator` pointing to the production network. To specify a different full node, e.g.:
44 |
45 | ```ruby
46 | api = Radiator::Api.new(url: 'https://testnet.steemitdev.com')
47 | ```
48 |
49 | #### 2. Input variables
50 |
51 | Capture the arguments from the command line.
52 |
53 | ```ruby
54 | account = ARGV[0]
55 | type = ARGV[1] || 'following'
56 | limit = (ARGV[2] || '-1').to_i
57 | ```
58 |
59 | #### 3. Get followers/following
60 |
61 | Depending on the arguments passed, we call the corresponding method and the element name of what we are requesting:
62 |
63 | ```ruby
64 | method = "get_#{type}"
65 | elem = type.sub(/s/, '').to_sym
66 | ```
67 |
68 | 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.
69 |
70 | #### 4. Display
71 |
72 | Iterate multiple calls to capture all of the results.
73 |
74 | ```ruby
75 | until count >= result.size
76 | count = result.size
77 | response = api.send(method, account, result.last, what, [limit, 100].max)
78 | abort response.error.message if !!response.error
79 | result += response.result.map(&elem)
80 | result = result.uniq
81 | end
82 | ```
83 |
84 | ### To Run
85 |
86 | First, set up your workstation using the steps provided in [Getting Started](https://developers.steem.io/tutorials-ruby/getting_started). Then you can create and execute the script (or clone from this repository):
87 |
88 | ```bash
89 | git clone git@github.com:steemit/devportal-tutorials-rb.git
90 | cd devportal-tutorials-rb/tutorials/19_get_follower_and_following_list
91 | bundle install
92 | ruby get_follow.rb
93 | ```
94 |
95 |
96 | ---
97 |
--------------------------------------------------------------------------------
/_tutorials-ruby/get_post_comments.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'RB: Get Post Comments'
3 | position: 7
4 | description: "This example will output the reply details and totals for the post/comment passed as an argument to the script."
5 | layout: full
6 | ---
7 | Full, runnable src of [Get Post Comments](https://github.com/steemit/devportal-tutorials-rb/tree/master/tutorials/07_get_post_comments) can be downloaded as part of the [RB tutorials repository](https://github.com/steemit/devportal-tutorials-rb).
8 |
9 |
10 |
11 |
12 | ### Script
13 |
14 | 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.
15 |
16 | ### To Run
17 |
18 | First, set up your workstation using the steps provided in [Getting Started](https://developers.steem.io/tutorials-ruby/getting_started). Then you can create and execute the script (or clone from this repository):
19 |
20 | ```bash
21 | git clone git@github.com:steemit/devportal-tutorials-rb.git
22 | cd devportal-tutorials-rb/tutorials/07_get_post_comments
23 | bundle install
24 | ruby comments_list.rb https://steemit.com/steem/@steemitblog/dev-portal-update-new-steem-developer-resources
25 | ```
26 |
27 | ### Example Output
28 |
29 | ```
30 | Replies by:
31 | shahabshah
32 | mumin007
33 | bigblueleadsled
34 | reseller
35 | latikasha
36 | dannywill
37 | steemitag
38 | sequentialvibe
39 | xplosive
40 | whatsup
41 | evolved08gsr
42 | steevc
43 | mightymicke
44 | marc0o
45 | akintunde
46 | oliverlai
47 | zufrizal
48 | bitcointravel
49 | vsf
50 | badribireuen
51 | Total replies: 20
52 | ```
53 |
54 |
55 | ---
56 |
--------------------------------------------------------------------------------
/_tutorials-ruby/get_posts.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'RB: Get Posts'
3 | position: 4
4 | description: "This example will output posts depending on which category is provided as the arguments."
5 | layout: full
6 | ---
7 | Full, runnable src of [Get Posts](https://github.com/steemit/devportal-tutorials-rb/tree/master/tutorials/04_get_posts) can be downloaded as part of the [RB tutorials repository](https://github.com/steemit/devportal-tutorials-rb).
8 |
9 |
10 |
11 |
12 | ### Script
13 |
14 | Create a filed called `get_posts_by_category.rb`.
15 |
16 | This script will pick a method to call based on the arguments passed. The expected categories are:
17 |
18 | * trending
19 | * hot
20 | * active
21 | * created
22 | * votes
23 | * promoted
24 | * children
25 |
26 | 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: ''`.
27 |
28 | 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:
29 |
30 | * Creation Timestamp
31 | * Title
32 | * Author
33 | * Net Votes
34 | * Number of replies
35 | * If it's promoted
36 | * Number of words in the body
37 | * Canonical URL
38 |
39 | ### To Run
40 |
41 | First, set up your workstation using the steps provided in [Getting Started](https://developers.steem.io/tutorials-ruby/getting_started). Then you can create and execute the script (or clone from this repository):
42 |
43 | ```bash
44 | git clone git@github.com:steemit/devportal-tutorials-rb.git
45 | cd devportal-tutorials-rb/tutorials/04_get_posts
46 | bundle install
47 | ruby get_posts_by_category.rb trending 1 steem
48 | ```
49 |
50 | ### Example Output
51 |
52 | ```
53 | 2018-05-24 06:38:33 UTC
54 | Post: New Phone App For Steemit - Wow!
55 | By: happymoneyman
56 | Votes: 1087
57 | Replies: 332
58 | Promoted: 0.001 SBD
59 | Words: 190
60 | https://steemit.com/steemit/@happymoneyman/new-phone-app-for-steemit-wow
61 | ```
62 |
63 | #### Error Handling
64 |
65 | 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.
66 |
67 |
68 |
69 | ---
70 |
--------------------------------------------------------------------------------
/_tutorials-ruby/get_voters_list_on_post.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'RB: Get Voters List On Post'
3 | position: 6
4 | description: "This example will output the active vote totals for the post/comment passed as an argument to the script."
5 | layout: full
6 | ---
7 | Full, runnable src of [Get Voters List On Post](https://github.com/steemit/devportal-tutorials-rb/tree/master/tutorials/06_get_voters_list_on_post) can be downloaded as part of the [RB tutorials repository](https://github.com/steemit/devportal-tutorials-rb).
8 |
9 |
10 |
11 |
12 | ### Script
13 |
14 | 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).
15 |
16 | Then, we sort the votes by `rshares` to find the top voter.
17 |
18 | ### To Run
19 |
20 | First, set up your workstation using the steps provided in [Getting Started](https://developers.steem.io/tutorials-ruby/getting_started). Then you can create and execute the script (or clone from this repository):
21 |
22 | ```bash
23 | git clone git@github.com:steemit/devportal-tutorials-rb.git
24 | cd devportal-tutorials-rb/tutorials/06_get_voters_list_on_post
25 | bundle install
26 | ruby voter_list.rb https://steemit.com/steemdev/@steemitdev/announcing-the-steem-developer-portal
27 | ```
28 |
29 | ### Example Output
30 |
31 | ```
32 | Upvotes: 231
33 | Downvotes: 1
34 | Unvotes: 0
35 | Total: 232
36 | Top Voter: thejohalfiles
37 | ```
38 |
39 |
40 | ---
41 |
--------------------------------------------------------------------------------
/_tutorials-ruby/getting_started.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'RB: Getting Started'
3 | position: 0
4 | description: "To access the Steem blockchain using Ruby, install the Radiator gem: [https://github.com/inertia186/radiator](https://github.com/inertia186/radiator). Full documentation on Radiator api methods are hosted on [rubydoc.info](http://www.rubydoc.info/gems/radiator)."
5 | layout: full
6 | ---
7 | Full, runnable src of [Getting Started](https://github.com/steemit/devportal-tutorials-rb/tree/master/tutorials/00_getting_started) can be downloaded as part of the [RB tutorials repository](https://github.com/steemit/devportal-tutorials-rb).
8 |
9 |
10 |
11 |
12 | ### Setup
13 |
14 | The following is a minimal `Gemfile` for running `.rb` files in these examples.
15 |
16 | Add `gem 'radiator'` to your `Gemfile`. Then install the gem:
17 |
18 | ```bash
19 | bundle install
20 | ```
21 |
22 | It is also possible to install `radiator` directly with `gem`:
23 |
24 | ```bash
25 | gem install radiator
26 | ```
27 |
28 | Then, to execute a script without a `Gemfile`, add to the top of your `.rb` files:
29 |
30 | ```ruby
31 | require 'radiator'
32 | ```
33 |
34 | Then, use the `ruby` command with `radiator` specified:
35 |
36 | ```bash
37 | ruby -r radiator myscript.rb
38 | ```
39 |
40 | ### Examples
41 |
42 | 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.
43 |
44 | From there, you can see all of the `.rb` files referenced on this site.
45 |
46 | ```bash
47 | git clone https://github.com/steemit/devportal.git
48 | cd devportal/_includes/tutorials-ruby/
49 | bundle install
50 | ```
51 |
52 | ### Typical-Usage
53 |
54 | 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.
55 |
56 | Radiator also internally supports failover by specifying the `failover_urls` option.
57 |
58 | To use the defaults:
59 |
60 | ```ruby
61 | api = Radiator::Api.new
62 | ```
63 |
64 | To override the `url` option:
65 |
66 | ```ruby
67 | api = Radiator::Api.new(url: 'https://rpc.steemliberator.com')
68 | ```
69 |
70 | To override both `url` and `failover_urls` options:
71 |
72 | ```ruby
73 | options = {
74 | url: 'https://rpc.steemliberator.com',
75 | failover_urls: [
76 | 'https://gtg.steem.house:8090',
77 | 'https://steemd.minnowsupportproject.org',
78 | 'https://steemd.privex.io',
79 | ]
80 | }
81 | api = Radiator::Api.new(options)
82 | ```
83 |
84 | ### Next Step
85 |
86 | If you'd like to dive right into the first tutorial, have a look at: [Blog Feed](https://github.com/steemit/devportal-tutorials-rb/tree/master/tutorials/01_blog_feed)
87 |
88 |
89 | ---
90 |
--------------------------------------------------------------------------------
/_tutorials-ruby/search_accounts.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'RB: Search Accounts'
3 | position: 15
4 | description: "Performing a search on account by names starting with a given input."
5 | layout: full
6 | ---
7 | Full, runnable src of [Search Accounts](https://github.com/steemit/devportal-tutorials-rb/tree/master/tutorials/15_search_accounts) can be downloaded as part of the [RB tutorials repository](https://github.com/steemit/devportal-tutorials-rb).
8 |
9 |
10 |
11 |
12 | This tutorial will return account names matching the input given, up to a specified limit.
13 |
14 | ### Sections
15 |
16 | 1. [Making the api call](#making-the-api-call) - performing the lookup
17 | 1. [Example api call](#example-api-call) - make the call in code
18 | 1. [Example api call using script](#example-api-call-using-script) - using our tutorial script
19 | 1. [Example Output](#example-output) - output from a successful call
20 | 1. [To Run](#to-run) - Running the example.
21 |
22 | ### Making the api call
23 |
24 | To request the a list of accounts starting with a particular lookup pattern, we can use the `lookup_accounts` method:
25 |
26 | ```ruby
27 | api = Radiator::Api.new
28 |
29 | api.lookup_accounts(lower_bound_name, limit) do |accounts|
30 | puts accounts.join(' ')
31 | end
32 | ```
33 |
34 | Notice, the above example can request up to 1000 accounts as an array.
35 |
36 | #### Example api call
37 |
38 | If we want to get the accounts starting with "alice" ...
39 |
40 | ```ruby
41 | api.lookup_accounts("alice", 10) do |content| ...
42 | ```
43 |
44 | #### Example api call using script
45 |
46 | And to do the same with our tutorial script, which has its own default limit of 10:
47 |
48 | ```bash
49 | ruby search_accounts.rb alice
50 | ```
51 |
52 | #### Example Output
53 |
54 | From the example we get the following output from our script:
55 |
56 | ```
57 | alice alice-22 alice-is alice-labardo alice-mikhaylova alice-n-chains alice-radster alice-sandra alice-thuigh alice-way
58 | ```
59 |
60 | ### To Run
61 |
62 | First, set up your workstation using the steps provided in [Getting Started](https://developers.steem.io/tutorials-ruby/getting_started). Then you can create and execute the script (or clone from this repository):
63 |
64 | * ``
65 | * `[limit]` (optional)
66 |
67 | ```bash
68 | git clone git@github.com:steemit/devportal-tutorials-rb.git
69 | cd devportal-tutorials-rb/tutorials/15_search_accounts
70 | bundle install
71 | ruby search_accounts.rb [limit]
72 | ```
73 |
74 |
75 | ---
76 |
--------------------------------------------------------------------------------
/_tutorials-ruby/submit_comment_reply.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'RB: Submit Comment Reply'
3 | position: 11
4 | description: "_By the end of this tutorial you should know how to prepare comments for Steem and then submit using Radiator._"
5 | layout: full
6 | ---
7 | Full, runnable src of [Submit Comment Reply](https://github.com/steemit/devportal-tutorials-rb/tree/master/tutorials/11_submit_comment_reply) can be downloaded as part of the [RB tutorials repository](https://github.com/steemit/devportal-tutorials-rb).
8 |
9 |
10 |
11 |
12 | ### Intro
13 |
14 | 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.
15 |
16 | 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).
17 |
18 | ### Script
19 |
20 | You should change `wif` to the posting key that matches your `author`. This script will pass along the values as a [`comment` operation](https://developers.steem.io/apidefinitions/broadcast-ops#broadcast_ops_comment):
21 |
22 | * `author` - Account name of the author currently replying.
23 | * `permlink` - Value unique to the author
24 | * `parent_author` - The name of the author of the being replied to, in the case of a reply like this example.
25 | * `parent_permlink` - The permlink of the content being replied to, in the case of a reply like this example.
26 | * `title` - Typically empty.
27 | * `body` - The actual content of the post.
28 | * `json_metadata` - JSON containing the `parent_permlink` of the root post as a tags array.
29 |
30 | ### To Run
31 |
32 | First, set up your workstation using the steps provided in [Getting Started](https://developers.steem.io/tutorials-ruby/getting_started). Then you can create and execute the script (or clone from this repository):
33 |
34 | ```bash
35 | git clone git@github.com:steemit/devportal-tutorials-rb.git
36 | cd devportal-tutorials-rb/tutorials/11_submit_comment_reply
37 | bundle install
38 | ruby submit_comment_reply.rb
39 | ```
40 |
41 | ### Example Output
42 |
43 | ```json
44 | {
45 | "jsonrpc": "2.0",
46 | "result": {
47 | "id": "3fef14cac921e9baa7b31e43245e5380f3fb4332",
48 | "block_num": 23355115,
49 | "trx_num": 13,
50 | "expired": false
51 | },
52 | "id": 3
53 | }
54 | ```
55 |
56 | The response we get after broadcasting the transaction gives us the transaction id ([`3fef14c...`](https://steemd.com/tx/3fef14cac921e9baa7b31e43245e5380f3fb4332)), block number ([`22867626`](https://steemd.com/b/23355115)), and the transaction number of that block (`13`).
57 |
58 | #### Error Handling
59 |
60 | 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.
61 |
62 |
63 | ---
64 |
--------------------------------------------------------------------------------
/_tutorials-ruby/submit_post.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'RB: Submit Post'
3 | position: 10
4 | description: "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."
5 | layout: full
6 | ---
7 | Full, runnable src of [Submit Post](https://github.com/steemit/devportal-tutorials-rb/tree/master/tutorials/10_submit_post) can be downloaded as part of the [RB tutorials repository](https://github.com/steemit/devportal-tutorials-rb).
8 |
9 |
10 |
11 |
12 | 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.
13 |
14 | ### Script
15 |
16 | You should change `wif` to the posting key that matches your `author`. This script will pass along the values as a [`comment` operation]({{ '/apidefinitions/broadcast-ops#broadcast_ops_comment' | relative_url }}):
17 |
18 | * `author` - Account name of the author currently posting.
19 | * `permlink` - Value unique to the author
20 | * `parent_author` - An empty string, in the case of a root post like this example.
21 | * `parent_permlink` - The first tag, in the case of a root post like this example.
22 | * `title` - Human readable title.
23 | * `body` - The actual content of the post.
24 | * `json_metadata` - JSON containing all of the tags.
25 |
26 | ### To Run
27 |
28 | First, set up your workstation using the steps provided in [Getting Started](https://developers.steem.io/tutorials-ruby/getting_started). Then you can create and execute the script (or clone from this repository):
29 |
30 | ```bash
31 | git clone git@github.com:steemit/devportal-tutorials-rb.git
32 | cd devportal-tutorials-rb/tutorials/10_submit_post
33 | bundle install
34 | ruby submit_a_new_post.rb
35 | ```
36 |
37 | ### Example Output
38 |
39 | ```json
40 | {
41 | "jsonrpc": "2.0",
42 | "result": {
43 | "id": "768f7f64cee94413da0017ef79f592bb4da86baf",
44 | "block_num": 22867626,
45 | "trx_num": 43,
46 | "expired": false
47 | },
48 | "id": 1
49 | }
50 | ```
51 |
52 | The response we get after broadcasting the transaction gives us the transaction id ([`768f7f6...`](https://steemd.com/tx/768f7f64cee94413da0017ef79f592bb4da86baf)), block number ([`22867626`](https://steemd.com/b/22867626)), and the transaction number of that block (`43`).
53 |
54 | #### Error Handling
55 |
56 | 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.
57 |
58 |
59 | ---
60 |
--------------------------------------------------------------------------------
/_tutorials/_defaults.md:
--------------------------------------------------------------------------------
1 | ---
2 | title:
3 | position:
4 | type:
5 | description:
6 | ---
7 |
--------------------------------------------------------------------------------
/_tutorials/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Tutorials
3 | section: Tutorials
4 | exclude: true
5 | ---
6 | {% assign nav = site.data.nav.toc | where: "collection", "tutorials" | first %}
7 |
8 |
9 |
Read, play, and learn Steem.
10 | {% if nav.docs %}
11 | {% assign sorted_nav_docs = nav.docs | sort: "position" %}
12 | {% for nav_doc in sorted_nav_docs %}
13 | {% assign collection = site.collections | where: "id", nav_doc.collection | first %}
14 | {% if collection %}
15 |
16 |
10 | 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.
11 |