diff --git a/_data/testnet/tools.yml b/_data/testnet/tools.yml index 4dca49a8..11da911b 100644 --- a/_data/testnet/tools.yml +++ b/_data/testnet/tools.yml @@ -7,9 +7,9 @@ purpose: For anyone who wants to start testing their node and applications. - name: testnet.steem.vc testnet_id: 79276ae - url: https://steemprojects.com/projects/p/steem-testnet/ + url: https://steemscan.com/projects/p/steem-testnet/ purpose: General bootstrapping to `testnet.steem.vc` maintained maintained by `@almost-digital`. - name: TestNET Condenser testnet_id: 79276ae - url: https://steemprojects.com/projects/p/testnet-condenser/ + url: https://steemscan.com/projects/p/testnet-condenser/ purpose: A condenser instance for `testnet.steem.vc`. diff --git a/_quickstart/steemd_nodes.md b/_quickstart/steemd_nodes.md index d6c64dbe..7f399535 100644 --- a/_quickstart/steemd_nodes.md +++ b/_quickstart/steemd_nodes.md @@ -1,5 +1,5 @@ --- -title: steemd Nodes +title: Steemd Nodes position: 2 exclude: true --- diff --git a/_resources/client_libs.md b/_resources/client_libs.md index 1a337c27..bc621330 100644 --- a/_resources/client_libs.md +++ b/_resources/client_libs.md @@ -15,12 +15,6 @@ Pure JavaScript Steem crypto library for node.js and browsers. Can be used to co --- -**Steem-TX-JS** - [https://github.com/mahdiyari/steem-tx-js](https://github.com/mahdiyari/steem-tx-js) - -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. - ---- - **DSteem** - [https://github.com/jnordberg/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](https://github.com/steemit/dsteem) diff --git a/_resources/developeradvocate.md b/_resources/developeradvocate.md index a96e7235..65fdebe8 100644 --- a/_resources/developeradvocate.md +++ b/_resources/developeradvocate.md @@ -11,13 +11,6 @@ Steemit’s [Developer Advocate](mailto:da@steemit.com) is here to make the proc The D.A. receives a lot of emails, but will respond as quickly as possible. ---- - -**SteemDevs Chat** - [https://discord.gg/B29Bbng](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/_resources/steem_connect_libs.md b/_resources/steem_connect_libs.md deleted file mode 100644 index d1262590..00000000 --- a/_resources/steem_connect_libs.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: SteemConnect Libs -position: 4 ---- - -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]({{ '/services/#services-steemconnect' | relative_url }}). - ---- - -**SteemConnect SDK** - [https://github.com/steemit/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/](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](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](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](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](https://rubygems.org/gems/omniauth-steemconnect/versions/0.1.0) - -Ruby Omniauth2 Strategy for SteemConnect. - ---- - -**SwiftyConnect** - [https://github.com/caspernikus/SwiftyConnect](https://github.com/caspernikus/SwiftyConnect) - -SteemConnect Library for iOS / Swift. - ---- - -**SteemConnect4j** - [https://github.com/hapramp/steemconnect4j](https://github.com/hapramp/steemconnect4j) - -Steemconnect SDK for Java. diff --git a/_resources/steem_login_libs.md b/_resources/steem_login_libs.md new file mode 100644 index 00000000..0eea35ab --- /dev/null +++ b/_resources/steem_login_libs.md @@ -0,0 +1,56 @@ +--- +title: SteemLogin Libs +position: 4 +--- + +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 SteemLogin API. + +If you're wondering what SteemLogin is, go [here]({{ '/services/#services-steemlogin' | relative_url }}). + +--- + +**SteemLogin SDK** - [https://github.com/futureshockco/steemlogin.js](https://github.com/futureshockco/steemlogin.js) + +An javascript library for utilizing SteemLogin. + +--- + +**steem-login-firebase-function** - [https://jakipatryk.github.io/steemconnect-firebase-functions/](https://jakipatryk.github.io/steemconnect-firebase-functions/) + +A TypeScript library that can help you build applications with SteemLogin and Firebase. + +--- + +**Sc2 SDK PHP** - [https://github.com/hernandev/sc2-sdk-php](https://github.com/hernandev/sc2-sdk-php) + +Easily integrate STEEM blockchain into your PHP applications, though SteemLogin. + +--- + +**Social Auth SteemLogin** - [https://pypi.python.org/pypi/social-auth-steemconnect/0.0.2](https://pypi.python.org/pypi/social-auth-steemconnect/0.0.2) + +Pluggable authentication backend for python-social-auth, that allows authentication via SteemLogin (v2). + +--- + +**steemlogin-python-client** - [https://github.com/emre/steemconnect-python-client](https://github.com/emre/steemconnect-python-client) + +steemlogin-python-client is a simple yet powerful library to interact with the Steemlogin. + +--- + +**omniauth-steemlogin** - [https://rubygems.org/gems/omniauth-steemconnect/versions/0.1.0](https://rubygems.org/gems/omniauth-steemconnect/versions/0.1.0) + +Ruby Omniauth2 Strategy for SteemLogin. + +--- + +**SwiftyConnect** - [https://github.com/caspernikus/SwiftyConnect](https://github.com/caspernikus/SwiftyConnect) + +SteemLogin Library for iOS / Swift. + +--- + +**steemlogin4j** - [https://github.com/hapramp/steemconnect4j](https://github.com/hapramp/steemconnect4j) + +Steemlogin SDK for Java. diff --git a/_resources/tools.md b/_resources/tools.md index 756b53c7..9e04ba51 100644 --- a/_resources/tools.md +++ b/_resources/tools.md @@ -15,12 +15,6 @@ Interactive Steem API swagger, [open-source](https://github.com/eSteemApp/steema --- -**SteemSQL** - [http://www.steemsql.com/](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](https://github.com/eSteemApp/esync) eSync extracts Steem blockchain data and saves into Mongodb, written in Nodejs. @@ -33,6 +27,6 @@ SteemPress is a WordPress plugin to allow you to automatically publish your arti --- -_**Many more projects and tools can be found at [https://steemprojects.com](https://steemprojects.com)**_ +_**Many more projects and tools can be found at [https://steemscan.com](https://steemscan.com)**_ --- diff --git a/_services/steemconnect.md b/_services/steemlogin.md similarity index 51% rename from _services/steemconnect.md rename to _services/steemlogin.md index 7981ce5e..8d3ebe90 100644 --- a/_services/steemconnect.md +++ b/_services/steemlogin.md @@ -1,17 +1,17 @@ --- -title: SteemConnect +title: SteemLogin position: 2 --- -**What is SteemConnect?** +**What is SteemLogin?** -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. +The goal of SteemLogin (olderly known as 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 SteemLogin nor the authorised app store the private keys as the posting key is incrypted on your cookie. -**How SteemConnect is implemented** +**How SteemLogin 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]({{ '/tutorials-javascript/steemconnect' | relative_url }}). +SteemLogin 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]({{ '/tutorials-javascript/steemlogin' | relative_url }}). **Steem Authorisation and OAuth 2** @@ -23,12 +23,12 @@ Simplified, the process includes the following steps: 3. The user is redirected to the application redirect URI along with the access token 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](https://github.com/steemit/steemconnect/wiki/OAuth-2#code-authorization-flow). +A full breakdown of OAuth2 and how it applies to SteemIt and SteemLogin can be found [here](https://github.com/steemit/steemlogin/wiki/OAuth-2#code-authorization-flow). **Useful Links** -* [SteemConnect Repo](https://github.com/steemit/steemconnect) -* [Community Resources]({{ '/resources/#community-steem-connect-libs' | relative_url }}) +* [SteemLogin Repo](https://github.com/futureshockco/steemlogin.js) +* [Community Resources]({{ '/resources/#community-steem-login-libs' | relative_url }}) -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/) +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://steemit.com/@busy.org) diff --git a/_tutorials-javascript/claim_rewards.md b/_tutorials-javascript/claim_rewards.md index 16680ade..d84425e0 100644 --- a/_tutorials-javascript/claim_rewards.md +++ b/_tutorials-javascript/claim_rewards.md @@ -1,7 +1,7 @@ --- title: 'JS: Claim Rewards' position: 23 -description: "_Learn how to claim rewards from unclaimed reward balance using Steemconnect as well as client signing method._" +description: "_Learn how to claim rewards from unclaimed reward balance using Steemlogin as well as client signing method._" layout: full --- Full, runnable src of [Claim Rewards](https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/23_claim_rewards) can be downloaded as part of the [JS tutorials repository](https://github.com/steemit/devportal-tutorials-js). @@ -20,7 +20,7 @@ This tutorial will show few functions such as querying account by name and getti 1. [**App setup**](#app-setup) Setup `dsteem` to use the proper connection and network. 2. [**Search account**](#search-account) Get account details after input has account name 3. [**Fill form**](#fill-form) Fill form with account reward balances -4. [**Claim reward**](#claim-reward) Claim reward with Steemconnect or Client signing options +4. [**Claim reward**](#claim-reward) Claim reward with Steemlogin or Client signing options #### 1. App setup @@ -66,7 +66,7 @@ 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. +We have 2 options on how to claim rewards. Steemlogin and Client signing options. We generate Steemlogin 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. diff --git a/_tutorials-javascript/client_signing.md b/_tutorials-javascript/client_signing.md index fea7a4da..c9067ed1 100644 --- a/_tutorials-javascript/client_signing.md +++ b/_tutorials-javascript/client_signing.md @@ -17,7 +17,7 @@ We have predefined accounts to select for you to quickly use and few transaction ## Intro -Client side signing of transaction is yet another way of interacting with Steem blockchain. Compare to [Steemconnect](https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/02_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. +Client side signing of transaction is yet another way of interacting with Steem blockchain. Compare to [Steemlogin](https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/02_steemlogin) 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 diff --git a/_tutorials-javascript/convert_sbd_to_steem.md b/_tutorials-javascript/convert_sbd_to_steem.md index c23a7883..a0e51e59 100644 --- a/_tutorials-javascript/convert_sbd_to_steem.md +++ b/_tutorials-javascript/convert_sbd_to_steem.md @@ -15,10 +15,10 @@ It should be noted that the converted STEEM will not be available instantly as i 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](https://steemit.com/steem/@epico/convert-sbd-to-steem-and-steem-power-guide-2017625t103821622z) 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](https://steemit.com/sbd/@timcliff/how-to-convert-sbd-into-steem-using-steemconnect) has more information on using steemconnect +Steemlogin 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://steemlogin.com/sign/convert?owner=username&requestid=1234567&amount=0.000%20SBD +This is similar to the steemlogin links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://steemlogin.com/sign +[This article](https://steemit.com/sbd/@timcliff/how-to-convert-sbd-into-steem-using-steemlogin) has more information on using steemlogin ## Intro diff --git a/_tutorials-javascript/create_account.md b/_tutorials-javascript/create_account.md index 201e0e0c..318c2bcf 100644 --- a/_tutorials-javascript/create_account.md +++ b/_tutorials-javascript/create_account.md @@ -1,7 +1,7 @@ --- title: 'JS: Create Account' position: 26 -description: "_Create Steem account using Steemconnect as well as with client-side signing._" +description: "_Create Steem account using Steemlogin as well as with client-side signing._" layout: full --- Full, runnable src of [Create Account](https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/26_create_account) can be downloaded as part of the [JS tutorials repository](https://github.com/steemit/devportal-tutorials-js). @@ -20,7 +20,7 @@ This tutorial will show few functions such as querying account by name and check 1. [**App setup**](#app-setup) Setup `dsteem` to use the proper connection and network. 2. [**Search account**](#search-account) Get account details after input has account name 3. [**Generate private keys**](#generate-keys) Generate proper keys for new account -4. [**Create account**](#create-account) Create account via Client-side or Steemconnect +4. [**Create account**](#create-account) Create account via Client-side or Steemlogin #### 1. App setup diff --git a/_tutorials-javascript/delegate_power.md b/_tutorials-javascript/delegate_power.md index ba95cbd5..58835f28 100644 --- a/_tutorials-javascript/delegate_power.md +++ b/_tutorials-javascript/delegate_power.md @@ -1,7 +1,7 @@ --- title: 'JS: Delegate Power' position: 27 -description: "_Delegate power to other users using Steemconnect or Client-side signing._" +description: "_Delegate power to other users using Steemlogin or Client-side signing._" layout: full --- Full, runnable src of [Delegate Power](https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/27_delegate_power) can be downloaded as part of the [JS tutorials repository](https://github.com/steemit/devportal-tutorials-js). @@ -20,7 +20,7 @@ This tutorial will show few functions such as querying account by name and getti 1. [**App setup**](#app-setup) Setup `dsteem` to use the proper connection and network. 2. [**Search account**](#search-account) Get account details after input has account name 3. [**Calculate and Fill form**](#fill-form) Calculate available vesting shares and Fill form with details -4. [**Delegate power**](#delegate-power) Delegate VESTS with Steemconnect or Client-side signing. +4. [**Delegate power**](#delegate-power) Delegate VESTS with Steemlogin or Client-side signing. #### 1. App setup @@ -68,7 +68,7 @@ Once form is filled with maximum available VESTS balance, you can choose portion #### 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. +We have 2 options on how to delegate others. Steemlogin and Client-side signing options. By default we generate Steemlogin 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. diff --git a/_tutorials-javascript/grant_active_permission.md b/_tutorials-javascript/grant_active_permission.md index be2af9fc..440bd85b 100644 --- a/_tutorials-javascript/grant_active_permission.md +++ b/_tutorials-javascript/grant_active_permission.md @@ -173,9 +173,9 @@ client.broadcast.updateAccount(accObj, privateKey).then( 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 +Steemlogin 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://steemlogin.com/revoke/@username +This is similar to the steemlogin links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://steemlogin.com/sign ### To run this tutorial diff --git a/_tutorials-javascript/grant_posting_permission.md b/_tutorials-javascript/grant_posting_permission.md index 6af07d7c..7822d1ff 100644 --- a/_tutorials-javascript/grant_posting_permission.md +++ b/_tutorials-javascript/grant_posting_permission.md @@ -162,9 +162,9 @@ client.broadcast.updateAccount(accObj, privateKey).then( 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 +Steemlogin 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://steemlogin.com/revoke/@username +This is similar to the steemlogin links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://steemlogin.com/sign ### To run this tutorial diff --git a/_tutorials-javascript/power_down.md b/_tutorials-javascript/power_down.md index 97cede10..5d32423a 100644 --- a/_tutorials-javascript/power_down.md +++ b/_tutorials-javascript/power_down.md @@ -1,7 +1,7 @@ --- title: 'JS: Power Down' position: 25 -description: "_Perform a power down on all or part of an account's VESTS using either Steemconnect or client-side signing._" +description: "_Perform a power down on all or part of an account's VESTS using either Steemlogin or client-side signing._" layout: full --- Full, runnable src of [Power Down](https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/25_power_down) can be downloaded as part of the [JS tutorials repository](https://github.com/steemit/devportal-tutorials-js). @@ -20,7 +20,7 @@ This tutorial will demonstrate a few functions such as querying account by name 1. [**App setup**](#app-setup) Setup `dsteem` to use the proper connection and network. 2. [**Search account**](#search-account) Get account details after input has account name 3. [**Calculate and Fill form**](#fill-form) Calculate available vesting shares and fill the form with details -4. [**Power down**](#power-down) Power down VESTS with Steemconnect or client-side signing. +4. [**Power down**](#power-down) Power down VESTS with Steemlogin or client-side signing. #### 1. App setup @@ -76,7 +76,7 @@ Once form is filled with the maximum available VESTS balance, we can choose the #### 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. +We have two options on how to Power down: Steemlogin and client-side signing. By default we generate a Steemlogin 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. diff --git a/_tutorials-javascript/power_up_steem.md b/_tutorials-javascript/power_up_steem.md index e8ccff3d..925da85a 100644 --- a/_tutorials-javascript/power_up_steem.md +++ b/_tutorials-javascript/power_up_steem.md @@ -1,7 +1,7 @@ --- title: 'JS: Power Up Steem' position: 24 -description: "_Power up an account's Steem using either Steemconnect or a client-side signing._" +description: "_Power up an account's Steem using either Steemlogin or a client-side signing._" layout: full --- Full, runnable src of [Power Up Steem](https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/24_power_up_steem) can be downloaded as part of the [JS tutorials repository](https://github.com/steemit/devportal-tutorials-js). @@ -20,7 +20,7 @@ This tutorial will show few functions such as querying account by name and getti 1. [**App setup**](#app-setup) Setup `dsteem` to use the proper connection and network. 2. [**Search account**](#search-account) Get account details after input has account name 3. [**Fill form**](#fill-form) Fill form with account reward balances -4. [**Power up**](#power-up) Power up STEEM with Steemconnect or Client-side signing. +4. [**Power up**](#power-up) Power up STEEM with Steemlogin or Client-side signing. #### 1. App setup @@ -62,7 +62,7 @@ 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. +We have 2 options on how to Power up. Steemlogin and Client-side signing options. By default we generate Steemlogin 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. diff --git a/_tutorials-javascript/set_withdraw_route.md b/_tutorials-javascript/set_withdraw_route.md index b1e25bb1..debd18d1 100644 --- a/_tutorials-javascript/set_withdraw_route.md +++ b/_tutorials-javascript/set_withdraw_route.md @@ -9,7 +9,7 @@ layout: full -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.** +We will learn how to allocate a percentage for withdrawal to other accounts using Steemlogin 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 @@ -20,7 +20,7 @@ This tutorial will demonstrate a few functions such as querying account by name 1. [**App setup**](#app-setup) Setup `dsteem` to use the proper connection and network. 2. [**Get account routes**](#search-account) Get account's current routes 3. [**Fill form**](#fill-form) Fill form with appropriate data -4. [**Set withdraw route**](#withdraw-route) Set route with Steemconnect or client-side signing +4. [**Set withdraw route**](#withdraw-route) Set route with Steemlogin or client-side signing #### 1. App setup @@ -69,11 +69,11 @@ 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. +We also generate a Steemlogin signing link. ```javascript window.openSC = async () => { - const link = `https://steemconnect.com/sign/set-withdraw-vesting-route?from_account=${ + const link = `https://steemlogin.com/sign/set-withdraw-vesting-route?from_account=${ document.getElementById('username').value }&percent=${document.getElementById('steem').value * 100}&to_account=${ document.getElementById('account').value @@ -84,7 +84,7 @@ window.openSC = async () => { #### 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: +We have two options on how to Power down: Steemlogin 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: ```javascript window.submitTx = async () => { diff --git a/_tutorials-javascript/steemconnect.md b/_tutorials-javascript/steemlogin.md similarity index 53% rename from _tutorials-javascript/steemconnect.md rename to _tutorials-javascript/steemlogin.md index 613e869b..626d91a7 100644 --- a/_tutorials-javascript/steemconnect.md +++ b/_tutorials-javascript/steemlogin.md @@ -1,19 +1,19 @@ --- -title: 'JS: Steemconnect' +title: 'JS: Steemlogin' position: 2 -description: "_Understand the basics of using Steemconnect with your Steem application._" +description: "_Understand the basics of using Steemlogin with your Steem application._" layout: full --- -Full, runnable src of [Steemconnect](https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/02_steemconnect) can be downloaded as part of the [JS tutorials repository](https://github.com/steemit/devportal-tutorials-js). +Full, runnable src of [Steemlogin](https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/02_steemlogin) can be downloaded as part of the [JS tutorials repository](https://github.com/steemit/devportal-tutorials-js).
-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. +In this tutorial we will setup Steemlogin for demo application and step by step show the process of setting up dedicated account for your app to use Steemlogin Dashboard and setup backend of your application to use Steemlogin 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. +The application in this tutorial asks the user to grant an access to `demo-app` and get token from Steemlogin. 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: @@ -24,50 +24,50 @@ Some other calls that require an access token (or login) are: * Follow * Reblog -Learn more about [Steemconnect operations here](https://github.com/steemit/steemconnect-sdk) +Learn more about [Steemlogin operations here](https://github.com/futureshockco/steemlogin.js) ## Steps -1. [**Steemconnect Dashboard**](#sc-dashboard) Create account for application and set up dashboard -1. [**Initialize Steemconnect**](#init-sc) Initialize SDK in your application code +1. [**Steemlogin Dashboard**](#sc-dashboard) Create account for application and set up dashboard +1. [**Initialize Steemlogin**](#init-sc) Initialize SDK in your application code 1. [**Login URL**](#login-url) Form login url for user 1. [**Request token**](#request-token) Request token with login url 1. [**Set token**](#set-token) Set or save token for future requests 1. [**Get user data**](#get-user) Get user details with token 1. [**Logout**](#logout) Logout user and clear token -#### 1. Steemconnect Dashboard +#### 1. Steemlogin Dashboard -Steemconnect is unified authentification system built on top of Steem built in collaboration of Busy.org and Steemit Inc. +Steemlogin is unified authentification system built on top of Steem. 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. +Setting up Steemlogin 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](https://steemconnect.com/dashboard) and login with your Steem credentials +1a. Visit [Steemlogin Developers](https://steemlogin.com/developers) -![steemconnect_login](https://github.com/steemit/devportal-tutorials-js/blob/master/tutorials/02_steemconnect/images/steemconnect_login.png?raw=true) +![steemlogin_login](https://github.com/steemit/devportal-tutorials-js/blob/master/tutorials/02_steemconnect/images/steemconnect_login.png?raw=true) -1b. You will see Applications and Developers section, in Developers section click on `My Apps` +1b. In Developers section click on `My Apps` -![steemconnect_dashboard](https://github.com/steemit/devportal-tutorials-js/blob/master/tutorials/02_steemconnect/images/steemconnect_dashboard.png?raw=true) +![steemlogin_dashboard](https://github.com/steemit/devportal-tutorials-js/blob/master/tutorials/02_steemconnect/images/steemconnect_dashboard.png?raw=true) -![steemconnect_new_app](https://github.com/steemit/devportal-tutorials-js/blob/master/tutorials/02_steemconnect/images/steemconnect_new_app.png?raw=true) +![steemlogin_new_app](https://github.com/steemit/devportal-tutorials-js/blob/master/tutorials/02_steemconnect/images/steemconnect_new_app.png?raw=true) -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. +1c. Create New App using Steemlogin, which will help you create new Steem account for your application. Let's call it `demo-app` for this tutorial purpose. -![steemconnect_account_create](https://github.com/steemit/devportal-tutorials-js/blob/master/tutorials/02_steemconnect/images/steemconnect_account_create.png?raw=true) +![steemlogin_account_create](https://github.com/steemit/devportal-tutorials-js/blob/master/tutorials/02_steemconnect/images/steemconnect_account_create.png?raw=true) 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](https://github.com/steemit/devportal-tutorials-js/blob/master/tutorials/02_steemconnect/images/steemconnect_signin.png?raw=true) +![steemlogin_signin](https://github.com/steemit/devportal-tutorials-js/blob/master/tutorials/02_steemconnect/images/steemconnect_signin.png?raw=true) 1d. Give your app name, description, icon image link, website (if available) and Redirect URI(s) -![steemconnect_myapps](https://github.com/steemit/devportal-tutorials-js/blob/master/tutorials/02_steemconnect/images/steemconnect_myapps.png?raw=true) +![steemlogin_myapps](https://github.com/steemit/devportal-tutorials-js/blob/master/tutorials/02_steemconnect/images/steemconnect_myapps.png?raw=true) Application name and description should give users clear understanding what permissions it requires and what is the purpose of the app. @@ -75,20 +75,20 @@ App Icon field should be publicly accessible and available link to your logo or 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. +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 Steemlogin 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 +* Disclaimer: All images/screenshots of user interface may change as Steemlogin evolves -#### 2. Initialize Steemconnect +#### 2. Initialize Steemlogin -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 +Once you have setup account for new application, you can setup application with Steemlogin authentification and API processes. +To do that, you will need to install `steemlogin` nodejs package with `npm i steemlogin`. +Within application you can initialize Steemlogin > `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. +Now that `steemlogin` is initialized we can start authentication and perform simple operations with Steemlogin. #### 3. Login URL @@ -102,7 +102,7 @@ Now that `sc2-sdk` is initialized we can start authentication and perform simple > 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. +> After getting `access_token`, we can set token for future Steemlogin API requests. #### 6. Get user data @@ -111,14 +111,14 @@ Now that `sc2-sdk` is initialized we can start authentication and perform simple #### 7. Logout -> In order to logout, you can use `revokeToken` function from sc2-sdk. +> In order to logout, you can use `revokeToken` function from steemlogin. **That's all there is to it.** ### To Run the tutorial 1. clone this repo -1. `cd tutorials/02_steemconnect` +1. `cd tutorials/02_steemlogin` 1. `npm i` 1. `npm run dev-server` or `npm run start` 1. After a few moments, the server should be running at [http://localhost:3000/](http://localhost:3000/) diff --git a/_tutorials-javascript/transfer_steem_and_sbd.md b/_tutorials-javascript/transfer_steem_and_sbd.md index a7ec536b..6f1e23ae 100644 --- a/_tutorials-javascript/transfer_steem_and_sbd.md +++ b/_tutorials-javascript/transfer_steem_and_sbd.md @@ -11,7 +11,7 @@ layout: full 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](https://steemconnect.com/sign/). You create a link using the `to` account, the amount, and a `memo` (optional comments). This [link](https://steemconnect.com/sign/transfer?to=steemitblog&amount=1.000%20STEEM) 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. +There is also an alternative method to transfer from one account to another using a `hot signing` link that can be generated via [Steemlogin](https://steemlogin.com/sign/). You create a link using the `to` account, the amount, and a `memo` (optional comments). This [link](https://steemlogin.com/sign/transfer?to=steemitblog&amount=1.000%20STEEM) 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 diff --git a/_tutorials-javascript/witness_listing_and_voting.md b/_tutorials-javascript/witness_listing_and_voting.md index 4cba18ea..0fede335 100644 --- a/_tutorials-javascript/witness_listing_and_voting.md +++ b/_tutorials-javascript/witness_listing_and_voting.md @@ -11,7 +11,7 @@ layout: full 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](https://steemconnect.com/sign/). 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](https://v2.steemconnect.com/sign/account-witness-vote?witness=grg&approve=approve) 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. +There is also an alternative method to vote for a witness using a `hot signing` link that can be generated via [Steemlogin](https://steemlogin.com/sign/). 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](https://steemlogin.com/sign/account-witness-vote?witness=grg&approve=approve) 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 diff --git a/_tutorials-python/convert_sbd_to_steem.md b/_tutorials-python/convert_sbd_to_steem.md index 7f8b4fab..11116622 100644 --- a/_tutorials-python/convert_sbd_to_steem.md +++ b/_tutorials-python/convert_sbd_to_steem.md @@ -15,10 +15,10 @@ It should be noted that the converted STEEM will not be available instantly as i 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](https://steemit.com/steem/@epico/convert-sbd-to-steem-and-steem-power-guide-2017625t103821622z) 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](https://steemit.com/sbd/@timcliff/how-to-convert-sbd-into-steem-using-steemconnect) has more information on using steemconnect +Steemlogin 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://steemlogin.com/sign/convert?owner=username&requestid=1234567&amount=0.000%20SBD +This is similar to the steemlogin links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://steemlogin.com/sign +[This article](https://steemit.com/sbd/@timcliff/how-to-convert-sbd-into-steem-using-steemlogin) has more information on using steemlogin ## Intro diff --git a/_tutorials-python/transfer_steem_and_sbd_to_savings_balance.md b/_tutorials-python/transfer_steem_and_sbd_to_savings_balance.md index 5a3cb0e9..730dff3e 100644 --- a/_tutorials-python/transfer_steem_and_sbd_to_savings_balance.md +++ b/_tutorials-python/transfer_steem_and_sbd_to_savings_balance.md @@ -13,9 +13,9 @@ In this tutorial we show you how to check the STEEM and SBD balance of an accoun 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. +Steemlogin 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://steemlogin.com/sign/transfer-to-savings?from=username&to=username&amount=0.000%20STEEM&memo=text +This is similar to the steemlogin links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://steemlogin.com/sign. There is also a steemlogin link for withdrawing funds. ## Intro diff --git a/docs/CONTRIBUTING.html b/docs/CONTRIBUTING.html index f024ca63..27cf612f 100644 --- a/docs/CONTRIBUTING.html +++ b/docs/CONTRIBUTING.html @@ -1,427 +1,366 @@ + - - - - - - - - - - - - - - - -Contributors | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Contributors | Steem Developer + + + + + + + + + + + + + + -
-

- - Steem Developer logo -

- - -
- - -
- - - - - - - - - - - -
-
-
-

Steem Developer Portal

- - - -
-
-

- - Contributors - - -

- +
+

+ + Steem Developer logo +

+ + +
+ + +
+ + + - - +
  • Jsonrpc
  • + + + +
  • Market History Api
  • + + + +
  • Network Broadcast Api
  • + + + +
  • Rc Api
  • + + + +
  • Tags Api
  • + + + +
  • Witness Api
  • + + + +
  • Block Api
  • + + + +
  • Debug Node Api
  • + + + +
  • Broadcast Ops
  • + + + + + +
    + + + + + + + +
    + + + + + + + + + +
    +
    +

    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 + +
    + +
    + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/account-by-key-api.html b/docs/apidefinitions/account-by-key-api.html index 879ae9a8..9b820687 100644 --- a/docs/apidefinitions/account-by-key-api.html +++ b/docs/apidefinitions/account-by-key-api.html @@ -1,362 +1,379 @@ + - - - - - - - - - - - - - - - -Account By Key Api | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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
    -
    - -
    - - -
    - - +
    +

    + + 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
    +
    +
    + +
    + + +
    + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/account-history-api.html b/docs/apidefinitions/account-history-api.html index 7eae4dd9..52cb7d7f 100644 --- a/docs/apidefinitions/account-history-api.html +++ b/docs/apidefinitions/account-history-api.html @@ -1,410 +1,440 @@ + - - - - - - - - - - - - - - - -Account History Api | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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
    -
    {
    +    
    +

    + + Steem Developer logo +

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

    Steem Developer Portal

    + + + +
    + +

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

    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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": []}
    -
    +
    +
    +
    Expected Response JSON
    +
    +
    {"history": []}
    +
    +
    -
    Example curl
    +
    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":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
    -
    +
    +
    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
    +
    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":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
    -
    +
    +
    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",
    @@ -415,28 +445,31 @@ 
    Expected Res "block_num": 0, "transaction_num": 0 } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"account_history_api.get_transaction", "params":{"id":"6fde0190a97835ea6d9e651293e90c89911f933c"}, "id":1}' https://api.steemit.com
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"account_history_api.get_transaction", "params":{"id":"6fde0190a97835ea6d9e651293e90c89911f933c"}, "id":1}' https://api.steemit.com
    +
    +
    -
    +
    - - - + + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/block-api.html b/docs/apidefinitions/block-api.html index fcdcbc2d..0e173bf5 100644 --- a/docs/apidefinitions/block-api.html +++ b/docs/apidefinitions/block-api.html @@ -1,462 +1,493 @@ + - - - - - - - - - - - - - - - -Block Api | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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
    -
    +
    +

    + + Steem Developer logo +

    + + +
    + + +
    + + + - - +
  • Block Api
  • + + + +
  • Debug Node Api
  • + + + +
  • Broadcast Ops
  • + + + + + + + + + + + + + +
    + + + + + + + + + +
    +
    +

    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
    +
    +
    + +
    + + +
    + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/broadcast-ops-comment.html b/docs/apidefinitions/broadcast-ops-comment.html index d96fab2a..eac4c29c 100644 --- a/docs/apidefinitions/broadcast-ops-comment.html +++ b/docs/apidefinitions/broadcast-ops-comment.html @@ -1,366 +1,374 @@ + - - - - - - - - - - - - - - - -Broadcast Ops Comment | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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 = {
    +    
    +

    + + 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:

    +
      +
    • The “title” must not be longer than 256 bytes
    • +
    • The “title” must be UTF-8
    • +
    • The “body” must be larger than 0 bytes
    • +
    • The “body” much also be UTF-8
    • +
    + +

    Parameters:

    +
      +
    • parent_author - the author that comment is being submitted to, when posting a new blog this is an empty string
    • +
    • parent_permlink - specific post that comment is being submitted to, when posting a new blog this is an empty string
    • +
    • author - author of the post/comment being submitted (account name)
    • +
    • permlink - unique string identifier for the post, linked to the author of the post
    • +
    • title - human readable title of the post being submitted, this is often blank when commenting
    • +
    • body - body of the post/comment being submitted, or diff-match-patch when updating
    • +
    • json_metadata - JSON object string
    • +
    + +

    Additional Parameter Definitions:

    +
      +
    • permlink: Two authors may have the same permlink as it’s unique to the author only. For example, there could be two authors, alice and bob, and both could have a permlink of firstpost
    • +
    • json_metadata: There is no blockchain enforced validation on json_metadata, but the community has adopted a particular structure.
    • +
    • It should contain a JSON object with the following keys: +
        +
      • tags - An array of up to 5 strings. Although the blockchain will accept more than 5, the tags plugin only looks at the first five
      • +
      • app - A user agent style application identifier. Typically app_name.version, e.g. steemit/0.1
      • +
      • format - The format of the body, e.g. markdown
      • +
      • In addition to the above keys, application developers are free to add any other keys they want to help manage the content they broadcast.
      • +
      +
    • +
    + +

    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",
    @@ -369,66 +377,69 @@ 

    Steem Developer Portal

    permlink :"a-post-by-joe", json_metadata :"{\"tags\":[\"steemit\",\"example\",\"tags\"]}", }; -
    -

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

    +
    +
    +

    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

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

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

    -

    Create_vs_Update:

    +

    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.

    +

    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:

    +

    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”

    +

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

    -

    And we want to change it to:

    +

    And we want to change it to:

    -

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

    +

    “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:

    - +

    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.

    +

    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.

    +

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

    -

    Comment_Options: LINK

    +

    Comment_Options: LINK

    -

    Updating_Archived_Content:

    +

    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.

    +

    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.

    +

    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

    +

    For ‘custom_json’: LINK

    -

    Vote: 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

    +

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

    -
    - - + + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/broadcast-ops.html b/docs/apidefinitions/broadcast-ops.html index 73884039..a94b23b8 100644 --- a/docs/apidefinitions/broadcast-ops.html +++ b/docs/apidefinitions/broadcast-ops.html @@ -1,327 +1,334 @@ + - - - - - - - - - - - - - - - -Broadcast Ops | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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).

    - -
    {
    +    
    +

    + + 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":{
    @@ -346,53 +353,52 @@ 

    Steem Developer Portal

    }, "id":1 } -
    +
    +
    -

    Also see: Broadcast Transaction

    +

    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.

    +

    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.

    +

    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. -
    +

    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:

    - +

    Notes:

    + -
    Roles: posting active owner
    -
    Parameters: voter author permlink weight
    +
    Roles: posting active owner
    +
    Parameters: voter author permlink weight
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "vote",
       {
         "voter": "steemit",
    @@ -401,37 +407,39 @@ 
    Example Op:
    "weight": 10000 } ] -
    +
    +
    -
    +
    - +

    + comment + + +

    +

    Creates a post/comment.

    -

    Notes:

    - +

    Notes:

    + -
    Roles: posting active owner
    -
    Parameters: parent_author parent_permlink author permlink title body json_metadata
    +
    Roles: posting active owner
    +
    Parameters: parent_author parent_permlink author permlink title body json_metadata
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "comment",
       {
         "parent_author": "",
    @@ -443,38 +451,39 @@ 
    Example Op:
    "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:

    - +

    Notes:

    + -
    Roles: active owner
    -
    Parameters: from to amount memo
    +
    Roles: active owner
    +
    Parameters: from to amount memo
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "transfer",
       {
         "from": "steemit",
    @@ -487,38 +496,37 @@ 
    Example Op:
    "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:

    - +

    Notes:

    + -
    Roles: active owner
    -
    Parameters: from to amount
    +
    Roles: active owner
    +
    Parameters: from to amount
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "transfer_to_vesting",
       {
         "from": "alice",
    @@ -530,42 +538,40 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    - +

    + 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.

    +

    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.

    +

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

    -

    Notes:

    - +

    Notes:

    + -
    Roles: active owner
    -
    Parameters: account vesting_shares
    +
    Roles: active owner
    +
    Parameters: account vesting_shares
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "withdraw_vesting",
       {
         "account": "steemit",
    @@ -576,30 +582,31 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    - +

    + 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
    +
    Roles: active owner
    +
    Parameters: owner orderid amount_to_sell min_to_receive fill_or_kill expiration
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "limit_order_create",
       {
         "owner": "steemit",
    @@ -618,74 +625,76 @@ 
    Example Op:
    "expiration": "2035-10-29T06:32:22" } ] -
    +
    +
    -
    +
    - +

    + limit_order_cancel + + +

    +

    Cancels an order and returns the balance to owner.

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

    + price + + +

    -
    Roles: active owner
    -
    Parameters: base quote
    +
    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
    +
    Roles: active owner
    +
    Parameters: publisher exchange_rate
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "feed_publish",
       {
         "publisher": "alice",
    @@ -703,30 +712,31 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    - +

    + 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
    +
    Roles: active owner
    +
    Parameters: owner requestid amount
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "convert",
       {
         "owner": "steemit",
    @@ -738,28 +748,30 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    - +

    + account_create + + +

    -
    Roles: active owner
    -
    Parameters: fee creator new_account_name owner active posting memo_key json_metadata
    +
    Roles: active owner
    +
    Parameters: fee creator new_account_name owner active posting memo_key json_metadata
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "account_create",
       {
         "fee": {
    @@ -803,31 +815,33 @@ 
    Example Op:
    "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
    +
    Roles: active owner
    +
    Parameters: creator new_account_name owner active posting memo_key json_metadata
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "create_claimed_account",
       {
         "creator": "steemit",
    @@ -866,31 +880,33 @@ 
    Example Op:
    "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
    +
    Roles: active owner
    +
    Parameters: fee creator extensions
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "claim_account",
       {
         "fee": {
    @@ -902,31 +918,33 @@ 
    Example Op:
    "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
    +
    Roles: block_signing active owner
    +
    Parameters: owner props extensions
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "witness_set_properties",
       {
         "owner": "alice",
    @@ -946,28 +964,30 @@ 
    Example Op:
    "extensions": [] } ] -
    +
    +
    -
    +
    - +

    + account_update + + +

    -
    Roles: active owner
    -
    Parameters: account owner active posting memo_key json_metadata
    +
    Roles: active owner
    +
    Parameters: account owner active posting memo_key json_metadata
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "account_update",
       {
         "account": "steemit",
    @@ -989,81 +1009,69 @@ 
    Example Op:
    "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.

    +

    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.

    +

    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.

    +

    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
    +
    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 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.

    +

    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:

    - +

    Notes:

    + -
    Roles: active owner
    -
    Parameters: owner url block_signing_key props fee
    +
    Roles: active owner
    +
    Parameters: owner url block_signing_key props fee
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "witness_update",
       {
         "owner": "alice",
    @@ -1085,32 +1093,33 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    - +

    + 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.

    +

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

    -
    Roles: active owner
    -
    Parameters: account witness approve
    +
    Roles: active owner
    +
    Parameters: account witness approve
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "account_witness_vote",
       {
         "account": "alice",
    @@ -1118,56 +1127,60 @@ 
    Example Op:
    "approve": true } ] -
    +
    +
    -
    +
    - +

    + account_witness_proxy + + +

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

    + pow + + +

    +

    Disabled in HF14.

    -
    Roles: active owner
    -
    Parameters: worker input signature work
    +
    Roles: active owner
    +
    Parameters: worker input signature work
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "pow",
       {
         "worker_account": "admin",
    @@ -1190,33 +1203,34 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    - +

    + 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.

    +

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

    -
    Roles: active owner
    -
    Parameters: required_auths id data
    +
    Roles: active owner
    +
    Parameters: required_auths id data
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "custom",
       {
         "required_auths": ["bytemaster"],
    @@ -1224,79 +1238,77 @@ 
    Example Op:
    "data": "0a627974656d617374657207737465656d697402a3d13897d82114466ad87a74b73a53292d8331d1bd1d3082da6bfbcff19ed097029db013797711c88cccca3692407f9ff9b9ce7221aaa2d797f1692be2215d0a5f6d2a8cab6832050078bc5729201e3ea24ea9f7873e6dbdc65a6bd9899053b9acda876dc69f11a13df9ca8b26b6" } ] -
    +
    +
    -
    +
    - +

    + delete_comment + + +

    -
    Roles: posting active owner
    -
    Parameters: author permlink
    +
    Roles: posting active owner
    +
    Parameters: author permlink
    -
    Example Op:
    +
    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
    +
    follow
    -

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

    +

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

    -
    reblog
    +
    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.

    +

    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
    +
    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

    +

    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
    +
    Roles: posting active owner
    +
    Parameters: required_auths required_posting_auths id json
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "custom_json",
       {
         "required_auths": [],
    @@ -1305,9 +1317,11 @@ 
    Example Op:
    "json": "[\"follow\",{\"follower\":\"steemit\",\"following\":\"alice\",\"what\":[\"blog\"]}]" } ] -
    +
    +
    -
    [
    +        
    +
    [
       "custom_json",
       {
         "required_auths": [],
    @@ -1316,9 +1330,11 @@ 
    Example Op:
    "json": "[\"follow\",{\"follower\":\"alice\",\"following\":\"eve\",\"what\":[\"ignore\"]}]" } ] -
    +
    +
    -
    [
    +        
    +
    [
       "custom_json",
       {
         "required_auths": [],
    @@ -1327,9 +1343,11 @@ 
    Example Op:
    "json": "{\"account\":\"bob\",\"author\":\"alice\",\"permlink\":\"a-post-by-alice\"}" } ] -
    +
    +
    -
    [
    +        
    +
    [
       "custom_json",
       {
         "required_auths": ["alice"],
    @@ -1338,68 +1356,63 @@ 
    Example Op:
    "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:

    - -
      -
    • The max_accepted_payout may be decreased, but never increased.
    • -
    • The percent_steem_dollars may be decreased, but never increased.
    • -
    • Part of comment_option validation process, to be called when -allowed_vote_assets object has been added as comment option extension are: -
        -
      • When votable assets are greater than maximum votable assets: “Too much votable assets specified”
      • -
      • When the symbol is not allowed in the list for votable assets: “STEEM can not be explicitly specified as one of allowed_vote_assets”
      • -
      -
    • -
    • max_accepted_payout: SBD value of the maximum payout this post will receive
    • -
    • percent_steem_dollars: the percent of Steem Dollars to key, unkept amounts will be received as Steem Power
    • -
    • allow_votes: allows/disallows a post to receive votes;
    • -
    • allow_curation_rewards: allows/disllows voters to recieve curation rewards. Rewards return to reward fund.
    • -
    • beneficiaries -
        -
      • Must have at least one (empty beneficiaries not allowed).
      • -
      • Cannot have more than 127 (witness currently only allow up to 8).
      • -
      • Cannot allocate more than 100% of rewards to one account.
      • -
      • Cannot allocate more than 100% of rewards to a comment.
      • -
      • Must be specified in sorted order (account ascending; no duplicates).
      • -
      -
    • -
    - -
    Roles: posting active owner
    -
    Parameters: author permlink max_accepted_payout percent_steem_dollars allow_votes allow_curation_rewards extensions
    - -
    Example Op:
    - -
    [
    +
    +
    + +
    + +
      + + + + +
    +

    + 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:

    + +
      +
    • The max_accepted_payout may be decreased, but never increased.
    • +
    • The percent_steem_dollars may be decreased, but never increased.
    • +
    • Part of comment_option validation process, to be called when + allowed_vote_assets object has been added as comment option extension are: +
        +
      • When votable assets are greater than maximum votable assets: “Too much votable assets specified”
      • +
      • When the symbol is not allowed in the list for votable assets: “STEEM can not be explicitly specified as one of allowed_vote_assets”
      • +
      +
    • +
    • max_accepted_payout: SBD value of the maximum payout this post will receive
    • +
    • percent_steem_dollars: the percent of Steem Dollars to key, unkept amounts will be received as Steem Power
    • +
    • allow_votes: allows/disallows a post to receive votes;
    • +
    • allow_curation_rewards: allows/disllows voters to recieve curation rewards. Rewards return to reward fund.
    • +
    • beneficiaries +
        +
      • Must have at least one (empty beneficiaries not allowed).
      • +
      • Cannot have more than 127 (witness currently only allow up to 8).
      • +
      • Cannot allocate more than 100% of rewards to one account.
      • +
      • Cannot allocate more than 100% of rewards to a comment.
      • +
      • Must be specified in sorted order (account ascending; no duplicates).
      • +
      +
    • +
    + +
    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",
    @@ -1415,9 +1428,11 @@ 
    Example Op:
    "extensions": [] } ] -
    +
    +
    -
    [
    +        
    +
    [
       "comment_options",
       {
         "author": "bob",
    @@ -1440,9 +1455,11 @@ 
    Example Op:
    ] } ] -
    +
    +
    -
    [
    +        
    +
    [
       "comment_options",
       {
         "author": "charlie",
    @@ -1470,38 +1487,37 @@ 
    Example Op:
    ] } ] -
    +
    +
    -
    +
    - +

    + 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:

    - +

    Notes:

    + -
    Roles: active owner
    -
    Parameters: from_account to_account percent auto_vest
    +
    Roles: active owner
    +
    Parameters: from_account to_account percent auto_vest
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "set_withdraw_vesting_route",
       {
         "from_account": "alice",
    @@ -1510,30 +1526,31 @@ 
    Example Op:
    "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
    +
    Roles: active owner
    +
    Parameters: owner orderid amount_to_sell exchange_rate fill_or_kill expiration
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "limit_order_create2",
       {
         "owner": "alice",
    @@ -1559,106 +1576,92 @@ 
    Example Op:
    "expiration": "2017-05-12T23:11:13" } ] -
    +
    +
    -
    +
    - +

    + challenge_authority + + +

    +

    Disabled in HF14.

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

    + prove_authority + + +

    -
    Roles: active owner
    -
    Parameters: challenged require_owner
    +
    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.

    +

    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.

    +

    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.

    +

    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.

    +

    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:

    +

    Notes:

    - + -

    See: #169

    +

    See: #169

    -
    Roles: active owner
    -
    Parameters: recovery_account account_to_recover new_owner_authority extensions
    +
    Roles: active owner
    +
    Parameters: recovery_account account_to_recover new_owner_authority extensions
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "request_account_recovery",
       {
         "recovery_account": "steem",
    @@ -1676,30 +1679,32 @@ 
    Example Op:
    "extensions": [] } ] -
    +
    +
    -
    +
    - +

    + recover_account + + +

    -
    Roles: owner
    -
    Parameters: account_to_recover new_owner_authority recent_owner_authority extensions
    +
    Roles: owner
    +
    Parameters: account_to_recover new_owner_authority recent_owner_authority extensions
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "recover_account",
       {
         "account_to_recover": "alice",
    @@ -1726,48 +1731,40 @@ 
    Example Op:
    "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.

    +

    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

    +

    See: #169

    -
    Roles: owner
    -
    Parameters: account_to_recover new_recovery_account extensions
    +
    Roles: owner
    +
    Parameters: account_to_recover new_recovery_account extensions
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "change_recovery_account",
       {
         "account_to_recover": "alice",
    @@ -1775,51 +1772,46 @@ 
    Example Op:
    "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.

    +

    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.

    +

    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.

    +

    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.

    +

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

    -

    See: steem_operations.hpp:229

    +

    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
    +
    Roles: active owner
    +
    Parameters: from to agent escrow_id sbd_amount steem_amount fee ratification_deadline escrow_expiration json_meta
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "escrow_transfer",
       {
         "from": "alice",
    @@ -1846,35 +1838,35 @@ 
    Example Op:
    "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

    +

    See: steem_operations.hpp:229

    -
    Roles: active owner
    -
    Parameters: from to agent who escrow_id
    +
    Roles: active owner
    +
    Parameters: from to agent who escrow_id
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "escrow_dispute",
       {
         "from": "alice",
    @@ -1884,44 +1876,42 @@ 
    Example Op:
    "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:

    - +

    The permission scheme is as follows:

    + -

    See: steem_operations.hpp:229

    +

    See: steem_operations.hpp:229

    -
    Roles: active owner
    -
    Parameters: from to agent who receiver escrow_id sbd_amount steem_amount
    +
    Roles: active owner
    +
    Parameters: from to agent who receiver escrow_id sbd_amount steem_amount
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "escrow_release",
       {
         "from": "alice",
    @@ -1942,30 +1932,32 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    - +

    + pow2 + + +

    +

    Disabled in HF17.

    +
    Roles: active owner
    +
    Parameters: input pow_summary
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "pow2",
       {
         "work": [
    @@ -1990,36 +1982,35 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    - +

    + 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

    +

    See: steem_operations.hpp:229

    -
    Roles: active owner
    -
    Parameters: from to agent who escrow_id approve
    +
    Roles: active owner
    +
    Parameters: from to agent who escrow_id approve
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "escrow_approve",
       {
         "from": "alice",
    @@ -2030,39 +2021,36 @@ 
    Example Op:
    "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

    +

    See: steem_operations.hpp:868

    -
    Roles: active owner
    -
    Parameters: from to amount memo
    +
    Roles: active owner
    +
    Parameters: from to amount memo
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "transfer_to_savings",
       {
         "from": "alice",
    @@ -2075,30 +2063,32 @@ 
    Example Op:
    "memo": "" } ] -
    +
    +
    -
    +
    - +

    + transfer_from_savings + + +

    -
    Roles: active owner
    -
    Parameters: from request_id to amount memo
    +
    Roles: active owner
    +
    Parameters: from request_id to amount memo
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "transfer_from_savings",
       {
         "from": "alice",
    @@ -2112,165 +2102,163 @@ 
    Example Op:
    "memo": "" } ] -
    +
    +
    -
    +
    - +

    + cancel_transfer_from_savings + + +

    -
    Roles: active owner
    -
    Parameters: from request_id
    +
    Roles: active owner
    +
    Parameters: from request_id
    -
    Example Op:
    +
    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

    +

    See: steem_operations.hpp:491

    -
    Roles: posting active owner
    -
    Parameters: id data
    +
    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

    +

    See: steem_operations.hpp:897

    -
    Roles: owner
    -
    Parameters: account decline
    +
    Roles: owner
    +
    Parameters: account decline
    -
    Example Op:
    +
    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

    +

    See: #169

    -
    Roles: active owner
    -
    Parameters: reset_account account_to_reset new_owner_authority
    +
    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

    +

    See: #169

    -
    Roles: owner posting
    -
    Parameters: account current_reset_account reset_account
    +
    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
    +
    Roles: posting active owner
    +
    Parameters: account reward_steem reward_sbd reward_vests
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "claim_reward_balance",
       {
         "account": "alice",
    @@ -2291,43 +2279,41 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    - +

    + 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.

    +

    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:

    - +

    Also see:

    + -
    Roles: active owner
    -
    Parameters: delegator delegatee vesting_shares
    +
    Roles: active owner
    +
    Parameters: delegator delegatee vesting_shares
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "delegate_vesting_shares",
       {
         "delegator": "alice",
    @@ -2339,56 +2325,54 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    - +

    + 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).

    -
    +
    +

    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 +

    +

    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:

    - +

    Also see:

    + -
    Roles: active owner
    -
    Parameters: fee delegation creator new_account_name owner active posting memo_key json_metadata extensions
    +
    Roles: active owner
    +
    Parameters: fee delegation creator new_account_name owner active posting memo_key json_metadata extensions
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "account_create_with_delegation",
       {
         "fee": {
    @@ -2438,164 +2422,166 @@ 
    Example Op:
    "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
    +
    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
    +
    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
    +
    Roles: posting active owner
    +
    Parameters: curator reward comment_author comment_permlink
    -
    +
    - +

    + comment_reward + + +

    +

    See: #774

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

    + liquidity_reward + + +

    +

    Deprecated as of HF12, see: #178.

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

    + interest + + +

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

    + fill_vesting_withdraw + + +

    +

    See: #78

    -
    Roles: active owner
    -
    Parameters: from_account to_account withdrawn deposited
    +
    Roles: active owner
    +
    Parameters: from_account to_account withdrawn deposited
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "fill_vesting_withdraw",
       {
         "from_account": "alice",
    @@ -2604,30 +2590,32 @@ 
    Example Op:
    "deposited": "0.710 STEEM" } ] -
    +
    +
    -
    +
    - +

    + fill_order + + +

    -
    Roles: posting active owner
    -
    Parameters: current_owner current_orderid current_pays open_owner open_orderid open_pays
    +
    Roles: posting active owner
    +
    Parameters: current_owner current_orderid current_pays open_owner open_orderid open_pays
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "fill_order",
       {
         "current_owner": "alice",
    @@ -2638,191 +2626,193 @@ 
    Example Op:
    "open_pays": "500.000 STEEM" } ] -
    +
    +
    -
    +
    - +

    + shutdown_witness + + +

    +

    When a witness goes offline.

    -

    See: #278

    +

    See: #278

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

    + fill_transfer_from_savings + + +

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

    + hardfork + + +

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

    + comment_payout_update + + +

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

    + return_vesting_delegation + + +

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

    + comment_benefactor_reward + + +

    -
    Roles: posting active owner
    -
    Parameters: benefactor author permlink 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
    +
    Roles: posting active owner
    +
    Parameters: producer vesting_shares
    -
    Example Op:
    +
    Example Op:
    -
    [
    +        
    +
    [
       "producer_reward",
       {
         "producer": "alice",
         "vesting_shares": "14403.626449 VESTS"
       }
     ]
    -
    +
    +
    -
    +
    -
    - - + + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/condenser-api.html b/docs/apidefinitions/condenser-api.html index 1f22b06f..07dbb9fd 100644 --- a/docs/apidefinitions/condenser-api.html +++ b/docs/apidefinitions/condenser-api.html @@ -1,347 +1,366 @@ + - - - - - - - - - - - - - - - -Condenser Api | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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
    -
    [
    +    
    +

    + + 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.

    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    condenser_api.broadcast_block

    +

    Used to broadcast a block.

    +
    Query Parameters JSON
    +
    +
    [
       {
         "previous": "0000000000000000000000000000000000000000",
         "timestamp": "1970-01-01T00:00:00",
    @@ -352,36 +371,42 @@ 
    Query Parameters JSON "transactions": [] } ] -
    -
    Expected Response JSON
    -
    {}
    -
    +
    +
    +
    Expected Response JSON
    +
    +
    {}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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,
    @@ -391,39 +416,47 @@ 
    Query Parameters JSO "signatures": [] } ] -
    -
    Expected Response JSON
    -
    {}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {}
    +
    +
    -
    Example curl
    +
    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":[["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
    -
    +
    +
    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,
    @@ -433,76 +466,86 @@ 
    Query Pa "signatures": [] } ] -
    -
    Expected Response JSON
    -
    {
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": "0000000000000000000000000000000000000000",
       "block_num": 0,
       "trx_num": 0,
       "expired": false
     }
    -
    +
    + -
    Example curl
    +
    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":[["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
    -
    +
    +
    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

    +

    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”.
    + + + + + + + + + + + + + + + + + + + + +
    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

    +

    See: Forum/Market Bandwidth

    -
    Query Parameters JSON
    -
    ["steemit", "forum"]
    -
    -
    Expected Response JSON
    -
    {
    +        
    Query Parameters JSON
    +
    +
    ["steemit", "forum"]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 8,
       "account": "steemit",
       "type": "forum",
    @@ -510,206 +553,236 @@ 
    Expected Res "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
    -
    +
    +
    -
    +
    Example curl
    - +

    condenser_api.get_account_count

    +

    Returns the number of accounts.

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

    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

    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_history", "params":["steemit", 1000, 1000], "id":1}' https://api.steemit.com
    -
    + + + + + + + + + + + + + + + + + + + + + + + +
    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.
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_history", "params":["steemit", -1, 10000], "id":1}' https://api.steemit.com
    -
    +
    Query Parameters JSON
    +
    +
    ["", 0, 1000]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    +
    Example curl
    - +

    condenser_api.get_account_reputations

    +

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

    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_reputations", "params":["steemit", 1], "id":1}' https://api.steemit.com
    -
    + + + + + + + + + + + + + + + + + + + + +
    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.
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_reputations", "params":["a", 10], "id":1}' https://api.steemit.com
    -
    +
    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”.
    + + + + + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries for votes by “steemit”.
    "alice"Queries for votes by “alice”.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    [
    +        
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "authorperm": "",
         "weight": "",
    @@ -718,59 +791,67 @@ 
    Expected Respons "time": "2016-04-29T22:27:42" } ] -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + + + +
    account (string array) 
    ["steemit"]Queries for account named “steemit”.
    ["steemit", "alice"]Queries for accounts named “steemit” and “alice”.
    -
    Query Parameters JSON
    -
    [[""]]
    -
    -
    Expected Response JSON
    -
    [
    +        
    Query Parameters JSON
    +
    +
    [[""]]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "id": 0,
         "name": "",
    @@ -846,62 +927,70 @@ 
    Expected Response JSO "guest_bloggers": [] } ] -
    +
    +
    -
    Example curl
    +
    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"]], "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
    -
    +
    +
    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
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +        
    Query Parameters JSON
    +
    +
    ["", ""]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "voter": "",
         "weight": "",
    @@ -911,93 +1000,107 @@ 
    Expected Response "time": "1970-01-01T00:00:00" } ] -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_active_witnesses", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    {
    +        
    Query Parameters JSON
    +
    +
    [1]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "previous": "0000000000000000000000000000000000000000",
       "timestamp": "2016-03-24T16:05:00",
       "witness": "initminer",
    @@ -1009,134 +1112,154 @@ 
    Expected Response JSON < "signing_key": "STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX", "transaction_ids": [] } -
    +
    +
    -
    Example curl
    +
    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":[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":[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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    {
    +        
    Query Parameters JSON
    +
    +
    [1]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "previous": "0000000000000000000000000000000000000000",
       "timestamp": "2016-03-24T16:05:00",
       "witness": "initminer",
       "transaction_merkle_root": "0000000000000000000000000000000000000000",
       "extensions": []
     }
    -
    +
    +
    -
    Example curl
    +
    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":[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":[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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +        
    Query Parameters JSON
    +
    +
    ["steemit", 0, 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "comment": {
           "id": 0,
    @@ -1192,118 +1315,134 @@ 
    Expected Response JSON "entry_id": 0 } ] -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries for account named “steemit”.
    "alice"Queries for accounts named alice”.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    [{"author": "", "count": 0}]
    -
    +
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    [{"author": "", "count": 0}]
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +        
    Query Parameters JSON
    +
    +
    ["steemit", 0, 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "author": "steemit",
         "permlink": "firstpost",
    @@ -1312,73 +1451,85 @@ 
    Expected Response "entry_id": 0 } ] -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_chain_properties", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -1388,95 +1539,111 @@ 
    Query Pa "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_config", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    {
    +        
    Query Parameters JSON
    +
    +
    ["", ""]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 0,
       "author": "",
       "permlink": "",
    @@ -1523,62 +1690,70 @@ 
    Expected Response JSON "body_length": 0, "reblogged_by": [] } -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    {
    +        
    Query Parameters JSON
    +
    +
    ["", ""]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 0,
       "author": "",
       "permlink": "",
    @@ -1625,112 +1800,130 @@ 
    Expected Respo "body_length": 0, "reblogged_by": [] } -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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.
    + + + + + + + + + + + + + +
    id (int) 
    1234Queries a conversion request with the id of 1234.
    -
    Query Parameters JSON
    -
    [0]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    [0]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_conversion_requests", "params":[1234], "id":1}' https://api.steemit.com
    -
    +
    +
    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"}
    -
    +
    Query Parameters JSON
    +
    +
    []
    +
    +
    +
    Expected Response JSON
    +
    +
    {"base": "0.000 STEEM", "quote": "0.000 STEEM"}
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_current_median_history_price", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -1740,69 +1933,83 @@ 
    Query Parameters "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    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
    -
    +
    +
    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,
    @@ -1812,39 +2019,47 @@ 
    Query Parameters J "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -1854,39 +2069,47 @@ 
    Query Parameter "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -1896,78 +2119,94 @@ 
    Query Paramete "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -1977,41 +2216,49 @@ 
    Query Parameter "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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": "",
    @@ -2019,39 +2266,47 @@ 
    Query Parameters J "limit": 100 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -2061,41 +2316,49 @@ 
    Query Parameters JS "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -2105,39 +2368,47 @@ 
    Query Paramete "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -2147,39 +2418,47 @@ 
    - -
    []
    -
    +
    + + +
    +
    []
    +
    +
    - + -
    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":"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
    -
    +
    +
    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,
    @@ -2189,42 +2468,52 @@ 
    Query Parameters "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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",
    @@ -2251,93 +2540,105 @@ 
    Expe "last_irreversible_block_num": 0, "vote_power_reserve_rate": 40 } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_escrow", "params":["steemit", 1234], "id":1}' https://api.steemit.com
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +        
    Query Parameters JSON
    +
    +
    ["", "1970-01-01T00:00:00"]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "id": 0,
         "delegator": "",
    @@ -2345,496 +2646,563 @@ 
    E "expiration": "1970-01-01T00:00:00" } ] -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    ["", 0, 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    ["", 0, 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_feed_history", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries the account named steemit.
    "alice"Queries the account named alice.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    {
    +        
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "account": "",
       "follower_count": 0,
       "following_count": 0
     }
    -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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

    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_followers", "params":["alice",null,"ignore",100], "id":1}' https://api.steemit.com
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    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
    +
    +
    []
    +
    +
    - +

    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

    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_following", "params":["alice",null,"ignore",100], "id":1}' https://api.steemit.com
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    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
    +
    +
    []
    +
    +
    - +

    condenser_api.get_hardfork_version

    - +

    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
    -
    [
    +
    +
    +
    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",
    @@ -2855,167 +3223,201 @@ 
    Expected Respon } } ] -
    +
    + -
    Example curl
    +
    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":[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":[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":[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":[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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history_buckets", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_next_scheduled_hardfork", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    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":["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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +        
    Query Parameters JSON
    +
    +
    [0, false]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "trx_id": "0000000000000000000000000000000000000000",
         "block": 0,
    @@ -3032,137 +3434,157 @@ 
    Expected Response ] } ] -
    +
    +
    -
    Example curl
    +
    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":[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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + +
    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": []}
    -
    +
    Query Parameters JSON
    +
    +
    [0]
    +
    +
    +
    Expected Response JSON
    +
    +
    {"bids": [], "asks": []}
    +
    +
    -
    Example curl
    +
    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":[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
    -
    +
    +
    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”.
    + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries the owner history for account named “steemit”.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_owner_history", "params":["steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -3172,39 +3594,47 @@ 
    Query Param "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -3214,232 +3644,267 @@ 
    Query Parameters "signatures": [] } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    ["", ""]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + +
    limit (int) 
    10Queries up to 10 latest trades.
    500Queries up to 500 latest trades.
    -
    Query Parameters JSON
    -
    [1]
    -
    -
    Expected Response JSON
    -
    [
    +        
    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
    +
    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":[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
    -
    +
    +
    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”.
    + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries the recovery requests for account named “steemit”.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    null
    -
    +
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    null
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_recovery_request", "params":["steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    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
    -
    +
    +
    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
    -
    [
    +        
    Query Parameters JSON
    +
    +
    [
       {
         "ref_block_num": 0,
         "ref_block_prefix": 0,
    @@ -3450,41 +3915,49 @@ 
    Query Parameters J }, [] ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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",
    @@ -3496,135 +3969,153 @@ 
    Expected Response "author_reward_curve": "quadratic", "curation_reward_curve": "34723648" } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_reward_fund", "params":["post"], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries the savings withdraw for account named “steemit”.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_savings_withdraw_from", "params":["steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries the savings withdraw for account named “steemit”.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_savings_withdraw_to", "params":["steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    -
    {
    +        
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "current_route": "",
       "props": {
         "head_block_number": 0,
    @@ -3686,82 +4177,94 @@ 
    Expected Response JSON < "feed_price": {"base": "0.000 STEEM", "quote": "0.000 STEEM"}, "error": "" } -
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_state", "params":["/@steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries the tags used by the account named “steemit”.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_tags_used_by_author", "params":["steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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",
    @@ -3769,112 +4272,124 @@ 
    Expected Response JSON "steem_volume": "0.000 STEEM", "sbd_volume": "0.000 STEEM" } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_ticker", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +        
    Query Parameters JSON
    +
    +
    [
       "1970-01-01T00:00:00",
       "1970-01-01T00:00:00",
       1000
     ]
    -
    -
    Expected Response JSON
    -
    [
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "date": "1970-01-01T00:00:00",
         "current_pays": "0.000 SBD",
         "open_pays": "0.000 STEEM"
       }
     ]
    -
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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.
    + + + + + + + + + + + + + +
    trx_id (string) 
    "6fde0190a97835ea6d9e651293e90c89911f933c"Queries for this exact transaction id.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    {
    +        
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "ref_block_num": 0,
       "ref_block_prefix": 0,
       "expiration": "1970-01-01T00:00:00",
    @@ -3885,33 +4400,37 @@ 
    Expected Response "block_num": 0, "transaction_num": 0 } -
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_transaction", "params":["6fde0190a97835ea6d9e651293e90c89911f933c"], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -3921,62 +4440,70 @@ 
    Query Parameters JSON "signatures": [] } ] -
    -
    Expected Response JSON
    -
    ""
    -
    +
    + +
    Expected Response JSON
    +
    +
    ""
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + +
    tag (string)limit (int) 
    null100Queries the top 100 trending tags.
    "steem"10Queries the tags after “steem”, up to 10 tags.
    - -
    ["", 1]
    -
    - -
    [
    +        
    +        
    +
    ["", 1]
    +
    +
    + +
    +
    [
       {
         "name": "",
         "total_payouts": "0.000 SBD",
    @@ -3986,95 +4513,109 @@ 
    +
    +
    - + -
    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":[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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_version", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + + + +
    delegator_account (string)start_account (string)limit (int) 
    "steemit"null10Queries up to 10 vesting delegations by “steemit”.
    -
    Query Parameters JSON
    -
    ["", "", 1]
    -
    -
    Expected Response JSON
    -
    [
    +        
    Query Parameters JSON
    +
    +
    ["", "", 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "id": 0,
         "delegator": "",
    @@ -4083,97 +4624,109 @@ 
    Expected R "min_delegation_time": "1970-01-01T00:00:00" } ] -
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_vesting_delegations", "params":["steemit",null,10], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_volume", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +        
    Query Parameters JSON
    +
    +
    ["", ""]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "id": 0,
         "from_account": "",
    @@ -4182,58 +4735,68 @@ 
    Expected Respo "auto_vest": false } ] -
    +
    +
    -
    Example curl
    +
    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","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","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
    -
    +
    +
    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).
    + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries witness account of “steemit” (of null if none exists).
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    {
    +        
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 0,
       "owner": "",
       "created": "1970-01-01T00:00:00",
    @@ -4259,66 +4822,78 @@ 
    Expected Re "hardfork_version_vote": "", "hardfork_time_vote": "1970-01-01T00:00:00" } -
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witness_by_account", "params":["steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    -
    +
    Query Parameters JSON
    +
    +
    []
    +
    +
    +
    Expected Response JSON
    +
    +
    0
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witness_count", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -4339,122 +4914,142 @@ 
    Expected Resp "max_runner_witnesses": 1, "hardfork_required_witnesses": 17 } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witness_schedule", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witnesses", "params":[[28]], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    ["", 1000]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":[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
    -
    +
    +
    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",
    @@ -4555,162 +5150,184 @@ 
    Expected Resp "last_root_post": "2016-03-30T18:30:18" } ] -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.lookup_account_names", "params":[["steemit"]], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + +
    lower_bound_name (string)limit (int) 
    "a"10Queries up to 10 accounts that start with “a”.
    -
    Query Parameters JSON
    -
    ["", 1]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    ["", 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.lookup_accounts", "params":["a",10], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + +
    lower_bound_name (string)limit (int) 
    "a"10Queries up to 10 witnesses that start with “a”.
    -
    Query Parameters JSON
    -
    ["", 1]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    ["", 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.lookup_witness_accounts", "params":["a",10], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    -
    +
    Query Parameters JSON
    +
    +
    ["", [""]]
    +
    +
    +
    Expected Response JSON
    +
    +
    false
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.verify_account_authority", "params":["steemit",["STM7Q2rLBqzPzFeteQZewv9Lu3NLE69fZoLeL6YK59t7UmssCBNTU"]], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -4720,56 +5337,65 @@ 
    Query Parameters JSON "signatures": [] } ] -
    -
    Expected Response JSON
    -
    false
    -
    +
    + +
    Expected Response JSON
    +
    +
    false
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    []
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    +
    - - - + + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/database-api.html b/docs/apidefinitions/database-api.html index 8cbefd1a..225633a9 100644 --- a/docs/apidefinitions/database-api.html +++ b/docs/apidefinitions/database-api.html @@ -1,787 +1,873 @@ + - - - - - - - - - - - - - - - -Database Api | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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.

    +
    +

    + + 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.

    +
      -
    • Working on mainnet
    • +
    • Since: HF11
    • -
    • Working on testnet
    • -
    -

    database_api.find_owner_histories

    -

    Returns owner authority history.

    -
    Query Parameters JSON
    -
    {"owner": ""}
    -
    -
    Expected Response JSON
    -
    {"owner_auths": []}
    -
    +
  • Working on mainnet
  • -
    -
      -
    • Since: HF14
    • +
    • Working on testnet
    • +
    +

    database_api.find_account_recovery_requests

    +

    Returns a list of account recovery requests.

    +
    Query Parameters JSON
    +
    +
    {"accounts": []}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"requests": []}
    +
    +
    +
    +
      -
    • Working on mainnet
    • -
    • Working on testnet
    • +
    • Working on mainnet
    • -
    -

    database_api.find_savings_withdrawals

    -

    Returns the list of savings withdrawls for an account.

    -
    Query Parameters JSON
    -
    {"account": ""}
    -
    -
    Expected Response JSON
    -
    {"withdrawals": []}
    -
    -
    -
      +
    • Working on testnet
    • +
    +

    database_api.find_accounts

    +

    Search for accounts.

    +
    Query Parameters JSON
    +
    +
    {"accounts": []}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"accounts": []}
    +
    +
    +
    +
      -
    • Working on mainnet
    • +
    • Since: HF11
    • -
    • Working on testnet
    • -
    -

    database_api.find_sbd_conversion_requests

    -

    Returns the list of SBD conversion requests for an account.

    -
    Query Parameters JSON
    -
    {"account": ""}
    -
    -
    Expected Response JSON
    -
    {"requests": []}
    -
    +
  • Working on mainnet
  • -
    -
      -
    • Since: HF17
    • +
    • Working on testnet
    • +
    +

    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": []}
    +
    +
    +
    +
      -
    • Working on mainnet
    • -
    • Working on testnet
    • +
    • Working on mainnet
    • -
    -

    database_api.find_vesting_delegation_expirations

    -

    Returns the expirations for vesting delegations.

    -
    Query Parameters JSON
    -
    {"account": ""}
    -
    -
    Expected Response JSON
    -
    {"delegations": []}
    -
    -
    -
      +
    • Working on testnet
    • -
    • Since: HF17
    • +
    +

    database_api.find_comments

    +

    Search for comments.

    +
    Query Parameters JSON
    +
    +
    {"comments": []}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"comments": []}
    +
    +
    +
    +
      +
    • Since: HF14
    • -
    • Working on mainnet
    • -
    • Working on testnet
    • +
    • Working on mainnet
    • -
    -

    database_api.find_vesting_delegations

    -

    Returns the list of vesting delegations for an account.

    -
    Query Parameters JSON
    -
    {"account": ""}
    -
    -
    Expected Response JSON
    -
    {"delegations": []}
    -
    -
    -
      +
    • Working on testnet
    • +
    +

    database_api.find_decline_voting_rights_requests

    +

    Returns a list of requests to decline voting rights.

    +
    Query Parameters JSON
    +
    +
    {"accounts": []}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"requests": []}
    +
    +
    +
    +
      -
    • Working on mainnet
    • +
    • Since: HF14
    • -
    • Working on testnet
    • -
    -

    database_api.find_votes

    -

    Returns the votes for an author and permlink.

    -
    Query Parameters JSON
    -
    {"author": "", "permlink": ""}
    -
    -
    Expected Response JSON
    -
    {"votes": []}
    -
    +
  • Working on mainnet
  • -
    -
      +
    • Working on testnet
    • +
    +

    database_api.find_escrows

    +

    Returns a list of escrows.

    +
    Query Parameters JSON
    +
    +
    {"from": ""}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"escrows": []}
    +
    +
    +
    -
  • Working on mainnet
  • +
      -
    • Working on testnet
    • -
    -

    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": []}
    -
    +
  • Working on mainnet
  • -
    -
      +
    • Working on testnet
    • +
    +

    database_api.find_limit_orders

    +

    Returns a list of limit orders.

    +
    Query Parameters JSON
    +
    +
    {"account": ""}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"orders": []}
    +
    +
    +
    -
  • Working on mainnet
  • +
      -
    • Working on testnet
    • -
    -

    database_api.find_witnesses

    -

    Search for witnesses.

    -
    Query Parameters JSON
    -
    {"owners": []}
    -
    -
    Expected Response JSON
    -
    {"witnesses": []}
    -
    +
  • Working on mainnet
  • -
    -
      +
    • Working on testnet
    • +
    +

    database_api.find_owner_histories

    +

    Returns owner authority history.

    +
    Query Parameters JSON
    +
    +
    {"owner": ""}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"owner_auths": []}
    +
    +
    +
    -
  • Working on mainnet
  • +
      +
    • Since: HF14
    • -
    • Working on testnet
    • -
    -

    database_api.get_active_witnesses

    -

    Returns the list of active witnesses.

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

    database_api.find_savings_withdrawals

    +

    Returns the list of savings withdrawls for an account.

    +
    Query Parameters JSON
    +
    +
    {"account": ""}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"withdrawals": []}
    +
    +
    +
    +
      -
    • Working on mainnet
    • -
    • Working on testnet
    • +
    • Working on mainnet
    • -
    -

    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
    -
    +
  • Working on testnet
  • -
    -
      +
    +

    database_api.find_sbd_conversion_requests

    +

    Returns the list of SBD conversion requests for an account.

    +
    Query Parameters JSON
    +
    +
    {"account": ""}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"requests": []}
    +
    +
    +
    +
      +
    • Since: HF17
    • -
    • Working on mainnet
    • -
    • Working on testnet
    • +
    • Working on mainnet
    • -
    -

    database_api.get_current_price_feed

    -

    Returns the current price feed.

    -
    Query Parameters JSON
    -
    {}
    -
    -
    Expected Response JSON
    -
    {
    +
    +            
  • Working on testnet
  • + + + +

    database_api.find_vesting_delegation_expirations

    +

    Returns the expirations for vesting delegations.

    +
    Query Parameters JSON
    +
    +
    {"account": ""}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"delegations": []}
    +
    +
    + +
    + +
      + +
    • Since: HF17
    • + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    database_api.find_vesting_delegations

    +

    Returns the list of vesting delegations for an account.

    +
    Query Parameters JSON
    +
    +
    {"account": ""}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"delegations": []}
    +
    +
    + +
    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    database_api.find_votes

    +

    Returns the votes for an author and permlink.

    +
    Query Parameters JSON
    +
    +
    {"author": "", "permlink": ""}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"votes": []}
    +
    +
    + +
    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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": []}
    +
    +
    + +
    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    database_api.find_witnesses

    +

    Search for witnesses.

    +
    Query Parameters JSON
    +
    +
    {"owners": []}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"witnesses": []}
    +
    +
    + +
    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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
    +
    +
    + +
    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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
    +
    +
    + +
    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    database_api.get_current_price_feed

    +

    Returns the current price feed.

    +
    Query Parameters JSON
    +
    +
    {}
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "base": {
         "amount": "0",
         "precision": 3,
    @@ -793,31 +879,35 @@ 
    Expected Res "nai": "@@000000021" } } -
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      database_api.get_dynamic_global_properties

      -

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

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

    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",
    @@ -890,36 +980,42 @@ 
    Expec "sbd_stop_percent": 0, "sbd_start_percent": 0 } -
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_dynamic_global_properties", "id":1}' https://api.steemit.com
    -
    +
    +
    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": {
    @@ -935,36 +1031,42 @@ 
    Expected Response }, "price_history": [] } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_feed_history", "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -972,66 +1074,78 @@ 
    Expected Re "next_hardfork": "0.0.0", "next_hardfork_time": "1970-01-01T00:00:00" } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_hardfork_properties", "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    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":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
    -
    +
    +
    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,
    @@ -1041,36 +1155,42 @@ 
    Query Parameters J "signatures": [] } } -
    -
    Expected Response JSON
    -
    {"keys": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"keys": []}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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,
    @@ -1081,68 +1201,80 @@ 
    Query Parameters JS }, "available_keys": [] } -
    -
    Expected Response JSON
    -
    {"keys": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"keys": []}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_reward_funds", "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -1152,76 +1284,90 @@ 
    Query Parameters JSON < "signatures": [] } } -
    -
    Expected Response JSON
    -
    {"hex": ""}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"hex": ""}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_version", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -1271,480 +1417,554 @@ 
    Expected Respo }, "min_witness_account_subsidy_decay": 0 } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_witness_schedule", "id":1}' https://api.steemit.com
    -
    +
    +
    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}
    -
    +
    Query Parameters JSON
    +
    +
    {"account": "", "signers": []}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"valid": false}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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,
    @@ -1754,36 +1974,42 @@ 
    Query Parameters JSON "signatures": [] } } -
    -
    Expected Response JSON
    -
    {"valid": false}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"valid": false}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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": [],
    @@ -1791,26 +2017,29 @@ 
    Query Parameters JSON "required_posting": [], "required_other": [] } -
    -
    Expected Response JSON
    -
    {"valid": false}
    -
    - -
    - - - - - +
    + +
    Expected Response JSON
    +
    +
    {"valid": false}
    +
    +
    + +
    + + + + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/debug-node-api.html b/docs/apidefinitions/debug-node-api.html index 5e240927..90ad96a8 100644 --- a/docs/apidefinitions/debug-node-api.html +++ b/docs/apidefinitions/debug-node-api.html @@ -1,400 +1,422 @@ + - - - - - - - - - - - - - - - -Debug Node Api | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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
    -
    {
    +    
    +

    + + Steem Developer logo +

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

    Steem Developer Portal

    + + + +
    + +

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

    + +

    See: debug_node_plugin.md

    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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}
    -
    +
    +
    +
    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}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"blocks": 0}
    +
    +
    -
    +
    - +

    debug_node_api.debug_get_hardfork_property_object

    -
    Query Parameters JSON
    -
    {}
    -
    -
    Expected Response JSON
    -
    {
    +        
    Query Parameters JSON
    +
    +
    {}
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 0,
       "processed_hardforks": [],
       "last_hardfork": 0,
    @@ -402,56 +424,64 @@ 
    "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": ""}
    -
    +
    Query Parameters JSON
    +
    +
    {}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"schema": ""}
    +
    +
    -
    +
    - +

    debug_node_api.debug_get_witness_schedule

    -
    Query Parameters JSON
    -
    {}
    -
    -
    Expected Response JSON
    -
    {
    +        
    Query Parameters JSON
    +
    +
    {}
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 0,
       "current_virtual_time": "0",
       "next_shuffle_block_num": 21573344,
    @@ -501,127 +531,144 @@ 
    Expect }, "min_witness_account_subsidy_decay": 0 } -
    +
    +
    -
    +
    - +

    debug_node_api.debug_has_hardfork

    -
    Query Parameters JSON
    -
    {"hardfork_id": 0}
    -
    -
    Expected Response JSON
    -
    {"has_hardfork": false}
    -
    +
    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}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"blocks": 0}
    +
    +
    -
    +
    - +

    debug_node_api.debug_set_hardfork

    -
    Query Parameters JSON
    -
    {"hardfork_id": 0}
    -
    -
    Expected Response JSON
    -
    {}
    -
    +
    Query Parameters JSON
    +
    +
    {"hardfork_id": 0}
    +
    +
    +
    Expected Response JSON
    +
    +
    {}
    +
    +
    -
    +
    - - - + + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/follow-api.html b/docs/apidefinitions/follow-api.html index 28bfb684..df5bde16 100644 --- a/docs/apidefinitions/follow-api.html +++ b/docs/apidefinitions/follow-api.html @@ -1,688 +1,779 @@ + - - - - - - - - - - - - - - - -Follow Api | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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_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
    + + + + + + + +
    +
    +

    Steem Developer Portal

    -
    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
    -
    +
    -
    +

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

    -
      +
        -
      • Since: HF9
      • +
      • Since: HF13
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      follow_api.get_follow_count

      -

      Returns the count of followers for an account.

      -
      Query Parameters JSON
      -
      {"account": ""}
      -
      -
      Expected Response JSON
      -
      {
      +        
    +

    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
    +
    +
    + +
    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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
    +
    +
    + +
    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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
    +
    +
    + +
    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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
    +
    +
    + +
    + +
      + +
    • Since: HF14
    • + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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
    +
    +
    + +
    + +
      + +
    • Since: HF14
    • + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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
    +
    +
    + +
    + +
      + +
    • Since: HF9
    • + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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
    +
    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":"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
    -
    +
    +
    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": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"followers": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"following": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    - - - + + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/index.html b/docs/apidefinitions/index.html index 9b152eda..a7e603d0 100644 --- a/docs/apidefinitions/index.html +++ b/docs/apidefinitions/index.html @@ -1,368 +1,385 @@ + - - - - - - - - - - - - - - - -API Docs - API Definitions | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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. -
    -
    -
    - - - - - -
    -

    - +
    +

    + + 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.

    +

    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.

    +

    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:

    +

    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":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}
    +
    +
    -
    {"jsonrpc":"2.0", "method":"database_api.get_dynamic_global_properties", "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.

    +

    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.

    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      condenser_api.broadcast_block

      -

      Used to broadcast a block.

      -
      Query Parameters JSON
      -
      [
      +            
    +

    condenser_api.broadcast_block

    +

    Used to broadcast a block.

    +
    Query Parameters JSON
    +
    +
    [
       {
         "previous": "0000000000000000000000000000000000000000",
         "timestamp": "1970-01-01T00:00:00",
    @@ -373,36 +390,42 @@ 
    Query Parameters JSON "transactions": [] } ] -
    -
    Expected Response JSON
    -
    {}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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,
    @@ -412,39 +435,47 @@ 
    Query Parameters JSO "signatures": [] } ] -
    -
    Expected Response JSON
    -
    {}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {}
    +
    +
    -
    Example curl
    +
    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":[["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
    -
    +
    +
    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,
    @@ -454,76 +485,86 @@ 
    Query Pa "signatures": [] } ] -
    -
    Expected Response JSON
    -
    {
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": "0000000000000000000000000000000000000000",
       "block_num": 0,
       "trx_num": 0,
       "expired": false
     }
    -
    +
    + -
    Example curl
    +
    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":[["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
    -
    +
    +
    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

    +

    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”.
    + + + + + + + + + + + + + + + + + + + + +
    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

    +

    See: Forum/Market Bandwidth

    -
    Query Parameters JSON
    -
    ["steemit", "forum"]
    -
    -
    Expected Response JSON
    -
    {
    +            
    Query Parameters JSON
    +
    +
    ["steemit", "forum"]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 8,
       "account": "steemit",
       "type": "forum",
    @@ -531,206 +572,236 @@ 
    Expected Res "lifetime_bandwidth": "48395000000", "last_bandwidth_update": "2018-02-16T03:11:00" } -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_count", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    ["", 0, 1000]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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", 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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    []
    -
    +
    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
    +
    +
    -
    Example curl
    +
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_account_reputations", "params":["steemit", 1], "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
    -
    [
    +            
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "authorperm": "",
         "weight": "",
    @@ -739,59 +810,67 @@ 
    Expected Respons "time": "2016-04-29T22:27:42" } ] -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + + + +
    account (string array) 
    ["steemit"]Queries for account named “steemit”.
    ["steemit", "alice"]Queries for accounts named “steemit” and “alice”.
    -
    Query Parameters JSON
    -
    [[""]]
    -
    -
    Expected Response JSON
    -
    [
    +            
    Query Parameters JSON
    +
    +
    [[""]]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "id": 0,
         "name": "",
    @@ -867,62 +946,70 @@ 
    Expected Response JSO "guest_bloggers": [] } ] -
    +
    +
    -
    Example curl
    +
    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"]], "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
    -
    +
    +
    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
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +            
    Query Parameters JSON
    +
    +
    ["", ""]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "voter": "",
         "weight": "",
    @@ -932,93 +1019,107 @@ 
    Expected Response "time": "1970-01-01T00:00:00" } ] -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_active_witnesses", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    {
    +            
    Query Parameters JSON
    +
    +
    [1]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "previous": "0000000000000000000000000000000000000000",
       "timestamp": "2016-03-24T16:05:00",
       "witness": "initminer",
    @@ -1030,134 +1131,154 @@ 
    Expected Response JSON < "signing_key": "STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX", "transaction_ids": [] } -
    +
    +
    -
    Example curl
    +
    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":[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":[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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    {
    +            
    Query Parameters JSON
    +
    +
    [1]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "previous": "0000000000000000000000000000000000000000",
       "timestamp": "2016-03-24T16:05:00",
       "witness": "initminer",
       "transaction_merkle_root": "0000000000000000000000000000000000000000",
       "extensions": []
     }
    -
    +
    +
    -
    Example curl
    +
    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":[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":[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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +            
    Query Parameters JSON
    +
    +
    ["steemit", 0, 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "comment": {
           "id": 0,
    @@ -1213,118 +1334,134 @@ 
    Expected Response JSON "entry_id": 0 } ] -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries for account named “steemit”.
    "alice"Queries for accounts named alice”.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    [{"author": "", "count": 0}]
    -
    +
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    [{"author": "", "count": 0}]
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +            
    Query Parameters JSON
    +
    +
    ["steemit", 0, 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "author": "steemit",
         "permlink": "firstpost",
    @@ -1333,73 +1470,85 @@ 
    Expected Response "entry_id": 0 } ] -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_chain_properties", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -1409,95 +1558,111 @@ 
    Query Pa "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_config", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    {
    +            
    Query Parameters JSON
    +
    +
    ["", ""]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 0,
       "author": "",
       "permlink": "",
    @@ -1544,62 +1709,70 @@ 
    Expected Response JSON "body_length": 0, "reblogged_by": [] } -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    {
    +            
    Query Parameters JSON
    +
    +
    ["", ""]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 0,
       "author": "",
       "permlink": "",
    @@ -1646,112 +1819,130 @@ 
    Expected Respo "body_length": 0, "reblogged_by": [] } -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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.
    + + + + + + + + + + + + + +
    id (int) 
    1234Queries a conversion request with the id of 1234.
    -
    Query Parameters JSON
    -
    [0]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    [0]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_conversion_requests", "params":[1234], "id":1}' https://api.steemit.com
    -
    +
    +
    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"}
    -
    +
    Query Parameters JSON
    +
    +
    []
    +
    +
    +
    Expected Response JSON
    +
    +
    {"base": "0.000 STEEM", "quote": "0.000 STEEM"}
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_current_median_history_price", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -1761,69 +1952,83 @@ 
    Query Parameters "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    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
    -
    +
    +
    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,
    @@ -1833,39 +2038,47 @@ 
    Query Parameters J "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -1875,39 +2088,47 @@ 
    Query Parameter "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -1917,78 +2138,94 @@ 
    Query Paramete "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -1998,41 +2235,49 @@ 
    Query Parameter "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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": "",
    @@ -2040,39 +2285,47 @@ 
    Query Parameters J "limit": 100 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -2082,41 +2335,49 @@ 
    Query Parameters JS "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -2126,39 +2387,47 @@ 
    Query Paramete "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -2168,39 +2437,47 @@ 
    - -
    []
    -
    +
    + + +
    +
    []
    +
    +
    - + -
    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":"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
    -
    +
    +
    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,
    @@ -2210,42 +2487,52 @@ 
    Query Parameters "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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",
    @@ -2272,93 +2559,105 @@ 
    Expe "last_irreversible_block_num": 0, "vote_power_reserve_rate": 40 } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_escrow", "params":["steemit", 1234], "id":1}' https://api.steemit.com
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +            
    Query Parameters JSON
    +
    +
    ["", "1970-01-01T00:00:00"]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "id": 0,
         "delegator": "",
    @@ -2366,496 +2665,562 @@ 
    E "expiration": "1970-01-01T00:00:00" } ] -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    ["", 0, 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    ["", 0, 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_feed_history", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries the account named steemit.
    "alice"Queries the account named alice.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    {
    +            
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "account": "",
       "follower_count": 0,
       "following_count": 0
     }
    -
    +
    +
    + +
    Example curl
    -
    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":["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
    +
    +
    -
    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

    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_followers", "params":["steemit",null,"blog",10], "id":1}' https://api.steemit.com
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    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.
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_followers", "params":["alice",null,"ignore",100], "id":1}' https://api.steemit.com
    -
    +
    Query Parameters JSON
    +
    +
    ["", "", "", 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    +
    Example curl
    - +

    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

    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_following", "params":["steemit",null,"blog",10], "id":1}' https://api.steemit.com
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    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.
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_following", "params":["alice",null,"ignore",100], "id":1}' https://api.steemit.com
    -
    +
    Query Parameters JSON
    +
    +
    ["", "", "", 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    +
    Example curl
    - +

    condenser_api.get_hardfork_version

    -
    +
    Query Parameters JSON
    +
    +
    []
    +
    +
    +
    Expected Response JSON
    +
    +
    "0.0.0"
    +
    +
    - +

    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
    -
    [
    +
    +
    +
    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",
    @@ -2876,167 +3241,201 @@ 
    Expected Respon } } ] -
    +
    + -
    Example curl
    +
    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":[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":[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":[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":[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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_market_history_buckets", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_next_scheduled_hardfork", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    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":["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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +            
    Query Parameters JSON
    +
    +
    [0, false]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "trx_id": "0000000000000000000000000000000000000000",
         "block": 0,
    @@ -3053,137 +3452,157 @@ 
    Expected Response ] } ] -
    +
    +
    -
    Example curl
    +
    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":[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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + +
    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": []}
    -
    +
    Query Parameters JSON
    +
    +
    [0]
    +
    +
    +
    Expected Response JSON
    +
    +
    {"bids": [], "asks": []}
    +
    +
    -
    Example curl
    +
    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":[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
    -
    +
    +
    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”.
    + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries the owner history for account named “steemit”.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_owner_history", "params":["steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -3193,39 +3612,47 @@ 
    Query Param "truncate_body": 0 } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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,
    @@ -3235,232 +3662,267 @@ 
    Query Parameters "signatures": [] } ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    + +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    ["", ""]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + +
    limit (int) 
    10Queries up to 10 latest trades.
    500Queries up to 500 latest trades.
    -
    Query Parameters JSON
    -
    [1]
    -
    -
    Expected Response JSON
    -
    [
    +            
    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
    +
    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":[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
    -
    +
    +
    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”.
    + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries the recovery requests for account named “steemit”.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    null
    -
    +
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    null
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_recovery_request", "params":["steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    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
    -
    +
    +
    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
    -
    [
    +            
    Query Parameters JSON
    +
    +
    [
       {
         "ref_block_num": 0,
         "ref_block_prefix": 0,
    @@ -3471,41 +3933,49 @@ 
    Query Parameters J }, [] ] -
    -
    Expected Response JSON
    -
    []
    -
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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",
    @@ -3517,135 +3987,153 @@ 
    Expected Response "author_reward_curve": "quadratic", "curation_reward_curve": "34723648" } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_reward_fund", "params":["post"], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries the savings withdraw for account named “steemit”.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_savings_withdraw_from", "params":["steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries the savings withdraw for account named “steemit”.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_savings_withdraw_to", "params":["steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    -
    {
    +            
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "current_route": "",
       "props": {
         "head_block_number": 0,
    @@ -3707,82 +4195,94 @@ 
    Expected Response JSON < "feed_price": {"base": "0.000 STEEM", "quote": "0.000 STEEM"}, "error": "" } -
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_state", "params":["/@steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries the tags used by the account named “steemit”.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_tags_used_by_author", "params":["steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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",
    @@ -3790,112 +4290,124 @@ 
    Expected Response JSON "steem_volume": "0.000 STEEM", "sbd_volume": "0.000 STEEM" } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_ticker", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +            
    Query Parameters JSON
    +
    +
    [
       "1970-01-01T00:00:00",
       "1970-01-01T00:00:00",
       1000
     ]
    -
    -
    Expected Response JSON
    -
    [
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "date": "1970-01-01T00:00:00",
         "current_pays": "0.000 SBD",
         "open_pays": "0.000 STEEM"
       }
     ]
    -
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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.
    + + + + + + + + + + + + + +
    trx_id (string) 
    "6fde0190a97835ea6d9e651293e90c89911f933c"Queries for this exact transaction id.
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    {
    +            
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "ref_block_num": 0,
       "ref_block_prefix": 0,
       "expiration": "1970-01-01T00:00:00",
    @@ -3906,33 +4418,37 @@ 
    Expected Response "block_num": 0, "transaction_num": 0 } -
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_transaction", "params":["6fde0190a97835ea6d9e651293e90c89911f933c"], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -3942,62 +4458,70 @@ 
    Query Parameters JSON "signatures": [] } ] -
    -
    Expected Response JSON
    -
    ""
    -
    +
    + +
    Expected Response JSON
    +
    +
    ""
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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.
    + + + + + + + + + + + + + + + + + + + + +
    tag (string)limit (int) 
    null100Queries the top 100 trending tags.
    "steem"10Queries the tags after “steem”, up to 10 tags.
    - -
    ["", 1]
    -
    - -
    [
    +            
    +            
    +
    ["", 1]
    +
    +
    + +
    +
    [
       {
         "name": "",
         "total_payouts": "0.000 SBD",
    @@ -4007,95 +4531,111 @@ 
    +
    +
    - + -
    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":[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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_version", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + + + +
    delegator_account (string)start_account (string)limit (int) 
    "steemit"null10Queries up to 10 vesting delegations by “steemit”.
    -
    Query Parameters JSON
    -
    ["", "", 1]
    -
    -
    Expected Response JSON
    -
    [
    +            
    Query Parameters JSON
    +
    +
    ["", "", 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "id": 0,
         "delegator": "",
    @@ -4104,97 +4644,109 @@ 
    Expected R "min_delegation_time": "1970-01-01T00:00:00" } ] -
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_vesting_delegations", "params":["steemit",null,10], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_volume", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    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
    -
    [
    +            
    Query Parameters JSON
    +
    +
    ["", ""]
    +
    +
    +
    Expected Response JSON
    +
    +
    [
       {
         "id": 0,
         "from_account": "",
    @@ -4203,58 +4755,68 @@ 
    Expected Respo "auto_vest": false } ] -
    +
    +
    -
    Example curl
    +
    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","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","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
    -
    +
    +
    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).
    + + + + + + + + + + + + + +
    account (string) 
    "steemit"Queries witness account of “steemit” (of null if none exists).
    -
    Query Parameters JSON
    -
    [""]
    -
    -
    Expected Response JSON
    -
    {
    +            
    Query Parameters JSON
    +
    +
    [""]
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 0,
       "owner": "",
       "created": "1970-01-01T00:00:00",
    @@ -4280,66 +4842,78 @@ 
    Expected Re "hardfork_version_vote": "", "hardfork_time_vote": "1970-01-01T00:00:00" } -
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witness_by_account", "params":["steemit"], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    -
    +
    Query Parameters JSON
    +
    +
    []
    +
    +
    +
    Expected Response JSON
    +
    +
    0
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witness_count", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -4360,122 +4934,142 @@ 
    Expected Resp "max_runner_witnesses": 1, "hardfork_required_witnesses": 17 } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witness_schedule", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_witnesses", "params":[[28]], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + + + + + + +
    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
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    ["", 1000]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    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":[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
    -
    +
    +
    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",
    @@ -4576,162 +5170,184 @@ 
    Expected Resp "last_root_post": "2016-03-30T18:30:18" } ] -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.lookup_account_names", "params":[["steemit"]], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + +
    lower_bound_name (string)limit (int) 
    "a"10Queries up to 10 accounts that start with “a”.
    -
    Query Parameters JSON
    -
    ["", 1]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    ["", 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.lookup_accounts", "params":["a",10], "id":1}' https://api.steemit.com
    -
    +
    +
    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”.
    + + + + + + + + + + + + + + + +
    lower_bound_name (string)limit (int) 
    "a"10Queries up to 10 witnesses that start with “a”.
    -
    Query Parameters JSON
    -
    ["", 1]
    -
    -
    Expected Response JSON
    -
    []
    -
    +
    Query Parameters JSON
    +
    +
    ["", 1]
    +
    +
    +
    Expected Response JSON
    +
    +
    []
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.lookup_witness_accounts", "params":["a",10], "id":1}' https://api.steemit.com
    -
    +
    +
    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
    -
    +
    Query Parameters JSON
    +
    +
    ["", [""]]
    +
    +
    +
    Expected Response JSON
    +
    +
    false
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.verify_account_authority", "params":["steemit",["STM7Q2rLBqzPzFeteQZewv9Lu3NLE69fZoLeL6YK59t7UmssCBNTU"]], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -4741,107 +5357,113 @@ 
    Query Parameters JSON "signatures": [] } ] -
    -
    Expected Response JSON
    -
    false
    -
    +
    + +
    Expected Response JSON
    +
    +
    false
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    -
    []
    -
    +
    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 = {
    +            
    +
    +
    +
    +            

    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:

    +
      +
    • The “title” must not be longer than 256 bytes
    • +
    • The “title” must be UTF-8
    • +
    • The “body” must be larger than 0 bytes
    • +
    • The “body” much also be UTF-8
    • +
    + +

    Parameters:

    +
      +
    • parent_author - the author that comment is being submitted to, when posting a new blog this is an empty string
    • +
    • parent_permlink - specific post that comment is being submitted to, when posting a new blog this is an empty string
    • +
    • author - author of the post/comment being submitted (account name)
    • +
    • permlink - unique string identifier for the post, linked to the author of the post
    • +
    • title - human readable title of the post being submitted, this is often blank when commenting
    • +
    • body - body of the post/comment being submitted, or diff-match-patch when updating
    • +
    • json_metadata - JSON object string
    • +
    + +

    Additional Parameter Definitions:

    +
      +
    • permlink: Two authors may have the same permlink as it’s unique to the author only. For example, there could be two authors, alice and bob, and both could have a permlink of firstpost
    • +
    • json_metadata: There is no blockchain enforced validation on json_metadata, but the community has adopted a particular structure.
    • +
    • It should contain a JSON object with the following keys: +
        +
      • tags - An array of up to 5 strings. Although the blockchain will accept more than 5, the tags plugin only looks at the first five
      • +
      • app - A user agent style application identifier. Typically app_name.version, e.g. steemit/0.1
      • +
      • format - The format of the body, e.g. markdown
      • +
      • In addition to the above keys, application developers are free to add any other keys they want to help manage the content they broadcast.
      • +
      +
    • +
    + +

    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",
    @@ -4850,208 +5472,236 @@ 

    permlink :"a-post-by-joe", json_metadata :"{\"tags\":[\"steemit\",\"example\",\"tags\"]}", }; -

    -

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

    +
    +
    +

    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

    -
      broadcast.comment(post, privatePostingKey)
    -
    -

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

    +

    Create_vs_Update:

    -

    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.

    -

    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:

    -

    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”

    -

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

    +

    And we want to change it to:

    -

    And we want to change it to:

    +

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

    -

    “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:

    + -

    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.

    -

    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.

    -

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

    +

    Comment_Options: LINK

    -

    Comment_Options: LINK

    +

    Updating_Archived_Content:

    -

    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.

    -

    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.

    -

    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

    -

    For ‘custom_json’: LINK

    +

    Vote: 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

    -

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

    +
    - - -
    -

    - +

    - -

    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": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"history": []}
    +
    +
    -
    Example curl
    +
    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":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
    -
    +
    +
    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
    +
    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":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
    -
    +
    +
    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",
    @@ -5062,500 +5712,578 @@ 
    Expected Res "block_num": 0, "transaction_num": 0 } -
    +
    + + +
    Example curl
    -
    Example curl
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"account_history_api.get_transaction", "params":{"id":"6fde0190a97835ea6d9e651293e90c89911f933c"}, "id":1}' https://api.steemit.com
    +
    +
    -
    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": []}
    +
    +
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_active_witnesses", "id":1}' https://api.steemit.com
    -
    +
    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
    +
    +
    {}
    +
    +
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_config", "id":1}' https://api.steemit.com
    -
    +
    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,
    @@ -5567,31 +6295,35 @@ 
    Expected Res "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",
    @@ -5664,36 +6396,42 @@ 
    Expec "sbd_stop_percent": 0, "sbd_start_percent": 0 } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_dynamic_global_properties", "id":1}' https://api.steemit.com
    -
    +
    +
    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": {
    @@ -5709,36 +6447,42 @@ 
    Expected Response }, "price_history": [] } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_feed_history", "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -5746,66 +6490,78 @@ 
    Expected Re "next_hardfork": "0.0.0", "next_hardfork_time": "1970-01-01T00:00:00" } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_hardfork_properties", "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    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":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
    -
    +
    +
    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,
    @@ -5815,36 +6571,42 @@ 
    Query Parameters J "signatures": [] } } -
    -
    Expected Response JSON
    -
    {"keys": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"keys": []}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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,
    @@ -5855,68 +6617,80 @@ 
    Query Parameters JS }, "available_keys": [] } -
    -
    Expected Response JSON
    -
    {"keys": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"keys": []}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_reward_funds", "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -5926,76 +6700,90 @@ 
    Query Parameters JSON < "signatures": [] } } -
    -
    Expected Response JSON
    -
    {"hex": ""}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"hex": ""}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_version", "params":[], "id":1}' https://api.steemit.com
    -
    +
    +
    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,
    @@ -6045,480 +6833,554 @@ 
    Expected Respo }, "min_witness_account_subsidy_decay": 0 } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"database_api.get_witness_schedule", "id":1}' https://api.steemit.com
    -
    +
    +
    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}
    -
    +
    Query Parameters JSON
    +
    +
    {"account": "", "signers": []}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"valid": false}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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,
    @@ -6528,36 +7390,42 @@ 
    Query Parameters JSON "signatures": [] } } -
    -
    Expected Response JSON
    -
    {"valid": false}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"valid": false}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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": [],
    @@ -6565,648 +7433,788 @@ 
    Query Parameters JSON "required_posting": [], "required_other": [] } -
    -
    Expected Response JSON
    -
    {"valid": false}
    -
    +
    + +
    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": []}
    +
    +
    -
    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
    -
    +
    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
    +
    +
    - +

    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": []}
    +
    +
    -
    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
    -
    +
    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
    +
    +
    - +

    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": []}
    +
    +
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog_authors", "params":{"blog_account":"alice"}, "id":1}' https://api.steemit.com
    -
    +
    Example curl
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"follow_api.get_blog_authors", "params":{"blog_account":"steemit"}, "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": []}
    +
    +
    -
    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
    -
    +
    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
    +
    +
    - +

    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": []}
    +
    +
    -
    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
    -
    +
    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
    +
    +
    - +

    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": []}
    +
    +
    -
    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
    -
    +
    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
    +
    +
    - +

    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
    +
    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":"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
    -
    +
    +
    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": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"followers": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"following": []}
    +
    +
    + +
    Example curl
    -
    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":"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
    +
    +
    -
    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
    -
    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":"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
    +
    +
    -
    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.

    +

    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"jsonrpc.get_methods", "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    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_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":"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":"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
    -
    +
    +
    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.

    +

    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": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"buckets": []}
    +
    +
    -
    Example curl
    +
    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":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":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":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":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
    -
    +
    +
    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history_buckets", "id":1}' https://api.steemit.com
    -
    +
    +
    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
    +
    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":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
    -
    +
    +
    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
    +
    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":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
    -
    +
    +
    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",
    @@ -7222,70 +8230,82 @@ 
    Expected Response "nai": "@@000000013" } } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_ticker", "id":1}' https://api.steemit.com
    -
    +
    +
    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": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"trades": []}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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,
    @@ -7297,51 +8317,55 @@ 
    Expected Response "nai": "@@000000013" } } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_volume", "id":1}' https://api.steemit.com
    -
    +
    +
    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 + +

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

    -

    Also see: Blockchain Ops

    +

    Also see: Blockchain Ops

    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      network_broadcast_api.broadcast_block

      -

      Used to broadcast a block.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    network_broadcast_api.broadcast_block

    +

    Used to broadcast a block.

    +
    Query Parameters JSON
    +
    +
    {
       "block": {
         "previous": "0000000000000000000000000000000000000000",
         "timestamp": "1970-01-01T00:00:00",
    @@ -7352,36 +8376,42 @@ 
    Query Parameters J "transactions": [] } } -
    -
    Expected Response JSON
    -
    {}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      network_broadcast_api.broadcast_transaction

      -

      Used to broadcast a transaction.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    network_broadcast_api.broadcast_transaction

    +

    Used to broadcast a transaction.

    +
    Query Parameters JSON
    +
    +
    {
       "trx": {
         "ref_block_num": 0,
         "ref_block_prefix": 0,
    @@ -7392,79 +8422,90 @@ 
    Query Parame }, "max_block_age": -1 } -
    -
    Expected Response JSON
    -
    {}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {}
    +
    +
    + +
    Example curl
    -
    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":"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
    +
    +
    -
    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

    +

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

    -
      +
        -
      • Since: HF20
      • +
      • Since: HF20
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      rc_api.find_rc_accounts

      -

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

      +
    +

    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”.
    + + + + + + + + + + + + + + + + + +
    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
    -
    {
    +            
    Query Parameters JSON
    +
    +
    {"accounts": []}
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "rc_accounts": [
         {
           "account": "",
    @@ -7478,42 +8519,50 @@ 
    Expected Response JSON < } ] } -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.find_rc_accounts", "params":{"accounts":["alice","bob"]}, "id":1}' https://api.steemit.com
    +
    +
    -
    +
    -
      +
        -
      • Since: HF20
      • +
      • Since: HF20
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      rc_api.get_resource_params

      -

      Work in progress. See: #2980

      +
    +

    rc_api.get_resource_params

    +

    Work in progress. See: #2980

    -
    Query Parameters JSON
    -
    {}
    -
    -
    Expected Response JSON
    -
    {
    +            
    Query Parameters JSON
    +
    +
    {}
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "resource_names": [
         "resource_history_bytes",
         "resource_new_accounts",
    @@ -7682,39 +8731,45 @@ 
    Expected Response JSO } } } -
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.get_resource_params", "id":1}' https://api.steemit.com
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.get_resource_params", "id":1}' https://api.steemit.com
    +
    +
    -
    +
    -
      +
        -
      • Since: HF20
      • +
      • Since: HF20
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      rc_api.get_resource_pool

      -

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

      +
    +

    rc_api.get_resource_pool

    +

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

    -
    Query Parameters JSON
    -
    {}
    -
    -
    Expected Response JSON
    -
    {
    +            
    Query Parameters JSON
    +
    +
    {}
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "resource_pool": {
         "resource_history_bytes": {"pool": "200825644923"},
         "resource_new_accounts": {"pool": 37393465},
    @@ -7723,83 +8778,95 @@ 
    Expected Response JSON "resource_execution_time": {"pool": "47739958648192"} } } -
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.get_resource_pool", "id":1}' https://api.steemit.com
    -
    +
    +
    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.

    +

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

    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_active_votes

      -

      Returns all votes for the given post.

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

    tags_api.get_active_votes

    +

    Returns all votes for the given post.

    +
    Query Parameters JSON
    +
    +
    {"author": "", "permlink": ""}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"votes": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Since: HF17
      • +
      • Since: HF17
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_comment_discussions_by_payout

      -

      Returns a list of discussions based on payout.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    tags_api.get_comment_discussions_by_payout

    +

    Returns a list of discussions based on payout.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -7807,75 +8874,93 @@ 
    Query Paramet "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_content_replies

      -

      Returns a list of replies.

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

    tags_api.get_content_replies

    +

    Returns a list of replies.

    +
    Query Parameters JSON
    +
    +
    {"author": "", "permlink": ""}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussion

      -

      Returns the discussion given an author and permlink.

      -
      Query Parameters JSON
      -
      {"author": "", "permlink": ""}
      -
      -
      Expected Response JSON
      -
      {
      +            
    +

    tags_api.get_discussion

    +

    Returns the discussion given an author and permlink.

    +
    Query Parameters JSON
    +
    +
    {"author": "", "permlink": ""}
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 0,
       "author": "",
       "permlink": "",
    @@ -7946,36 +9031,42 @@ 
    Expected Response JSON < "body_length": 0, "reblogged_by": [] } -
    +
    + -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_active

      -

      Returns a list of discussions based on active.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    tags_api.get_discussions_by_active

    +

    Returns a list of discussions based on active.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -7983,74 +9074,88 @@ 
    Query Parameters JSON "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_author_before_date

      -

      Returns a list of discussions based on author before date.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    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": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_blog

      -

      Returns a list of discussions by blog.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    tags_api.get_discussions_by_blog

    +

    Returns a list of discussions by blog.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -8058,39 +9163,47 @@ 
    Query Parameters JSON < "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_blog", "params":{"tag":"alice","limit":10}, "id":1}' https://api.steemit.com
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_cashout

      -

      Returns a list of discussions by cashout.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    tags_api.get_discussions_by_cashout

    +

    Returns a list of discussions by cashout.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -8098,39 +9211,47 @@ 
    Query Parameters JSO "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_children

      -

      Returns a list of discussions by children.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    tags_api.get_discussions_by_children

    +

    Returns a list of discussions by children.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -8138,39 +9259,47 @@ 
    Query Parameters JS "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_comments

      -

      Returns a list of discussions by comments.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    tags_api.get_discussions_by_comments

    +

    Returns a list of discussions by comments.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -8178,39 +9307,47 @@ 
    Query Parameters JS "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_created

      -

      Returns a list of discussions by created.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    tags_api.get_discussions_by_created

    +

    Returns a list of discussions by created.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -8218,41 +9355,49 @@ 
    Query Parameters JSO "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Since: HF14
      • +
      • Since: HF14
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_feed

      -

      Returns a list of discussions by feed.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    tags_api.get_discussions_by_feed

    +

    Returns a list of discussions by feed.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -8260,39 +9405,47 @@ 
    Query Parameters JSON < "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_hot

      -

      Returns a list of discussions by hot.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    tags_api.get_discussions_by_hot

    +

    Returns a list of discussions by hot.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -8300,41 +9453,49 @@ 
    Query Parameters JSON "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Since: HF13
      • +
      • Since: HF13
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_promoted

      -

      Returns a list of discussions by promoted.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    tags_api.get_discussions_by_promoted

    +

    Returns a list of discussions by promoted.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -8342,39 +9503,47 @@ 
    Query Parameters JS "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      - -

      Returns a list of discussions by trending.

      - -
      {
      +            
    + +

    Returns a list of discussions by trending.

    + +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -8382,39 +9551,47 @@ 
    - -
    {"discussions": []}
    -
    +
    + + +
    +
    {"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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_votes

      -

      Returns a list of discussions by votes.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    tags_api.get_discussions_by_votes

    +

    Returns a list of discussions by votes.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -8422,41 +9599,49 @@ 
    Query Parameters JSON "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Since: HF17
      • +
      • Since: HF17
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_post_discussions_by_payout

      -

      Returns a list of post discussions by payout.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    tags_api.get_post_discussions_by_payout

    +

    Returns a list of post discussions by payout.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -8464,451 +9649,521 @@ 
    Query Parameters "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_replies_by_last_update

      -

      Returns a list of replies by last update.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    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": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_tags_used_by_author

      -

      Returns a list of tags used by an author.

      -
      Query Parameters JSON
      -
      {"author": ""}
      -
      -
      Expected Response JSON
      -
      {"tags": []}
      -
      +
    +

    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
    +
    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
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_tags_used_by_author", "params":{"author":"steemit"}, "id":1}' https://api.steemit.com
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      - -

      Returns the list of trending tags.

      - -
      {"start_tag": "", "limit": 100}
      -
      - -
      {"tags": []}
      -
      +
    + +

    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":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
    -
    +
    +
    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

    -
      +

      API removed in 0.20.6, see: #3029

      +
        -
      • Disabled
      • +
      • Disabled
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      witness_api.get_account_bandwidth

      -

      Disabled since 0.20.6, see: #3029

      -

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

      +
    +

    witness_api.get_account_bandwidth

    +

    Disabled since 0.20.6, see: #3029

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

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

    -
    +
    Query Parameters JSON
    +
    +
    {"account": "", "type": "post"}
    +
    +
    +
    Expected Response JSON
    +
    +
    {}
    +
    +
    -
      +
      +
        -
      • Disabled
      • +
      • Disabled
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      witness_api.get_reserve_ratio

      -

      Disabled since 0.20.6, see: #3029

      -

      Returns the current reserve ratio.

      +
    +

    witness_api.get_reserve_ratio

    +

    Disabled since 0.20.6, see: #3029

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

    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
    -
    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":"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
    +
    +
    -
    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.

    -
      +

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

      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • -
      -

      block_api.get_block

      -

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

      +
    • Working on testnet
    • -

      Parameters:

      -
        -
      • block_num:int
      • -
      +
    +

    block_api.get_block

    +

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

    - - - - - - - - - - - - - - - - - - - - - -
    block_num (int) 
    1Queries the very first block.
    8675309Queries block number 8,675,309.
    62396745Queries block number 62,396,745.
    +

    Parameters:

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

      block_api.get_block_header

      -

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

      +
    • Working on testnet
    • -

      Parameters:

      -
        -
      • block_num:int - Height of the block whose header should be returned
      • -
      +
    +

    block_api.get_block_header

    +

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

    - - - - - - - - - - - - - - - - - - - - - -
    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.
    +

    Parameters:

    -
    Query Parameters JSON
    -
    {"block_num": 0}
    -
    -
    Expected Response JSON
    -
    {}
    -
    +
      +
    • block_num:int - Height of the block whose header should be returned
    • +
    -
    Example curl
    + + + + + + + + + + + + + + + + + + + + + +
    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":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":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
    +
    +
    -
    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.

    +

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

    -

    See: debug_node_plugin.md

    +

    See: debug_node_plugin.md

    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      debug_node_api.debug_generate_blocks

      -

      Generate blocks locally.

      -
      Query Parameters JSON
      -
      {
      +            
    +

    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}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"blocks": 0}
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      debug_node_api.debug_generate_blocks_until

      -

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

      -
      Query Parameters JSON
      -
      {
      +            
    +

    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}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"blocks": 0}
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      debug_node_api.debug_get_hardfork_property_object

      +
    +

    debug_node_api.debug_get_hardfork_property_object

    -
    Query Parameters JSON
    -
    {}
    -
    -
    Expected Response JSON
    -
    {
    +            
    Query Parameters JSON
    +
    +
    {}
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 0,
       "processed_hardforks": [],
       "last_hardfork": 0,
    @@ -8916,56 +10171,64 @@ 
    "next_hardfork": "0.0.0", "next_hardfork_time": "1970-01-01T00:00:00" } -
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      debug_node_api.debug_get_json_schema

      +
    +

    debug_node_api.debug_get_json_schema

    -
    Query Parameters JSON
    -
    {}
    -
    -
    Expected Response JSON
    -
    {"schema": ""}
    -
    +
    Query Parameters JSON
    +
    +
    {}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"schema": ""}
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      debug_node_api.debug_get_witness_schedule

      +
    +

    debug_node_api.debug_get_witness_schedule

    -
    Query Parameters JSON
    -
    {}
    -
    -
    Expected Response JSON
    -
    {
    +            
    Query Parameters JSON
    +
    +
    {}
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 0,
       "current_virtual_time": "0",
       "next_shuffle_block_num": 21573344,
    @@ -9015,139 +10278,152 @@ 
    Expect }, "min_witness_account_subsidy_decay": 0 } -
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      debug_node_api.debug_has_hardfork

      +
    +

    debug_node_api.debug_has_hardfork

    -
    Query Parameters JSON
    -
    {"hardfork_id": 0}
    -
    -
    Expected Response JSON
    -
    {"has_hardfork": false}
    -
    +
    Query Parameters JSON
    +
    +
    {"hardfork_id": 0}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"has_hardfork": false}
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      debug_node_api.debug_pop_block

      -

      Pop a block from the blockchain, returning it.

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

    debug_node_api.debug_pop_block

    +

    Pop a block from the blockchain, returning it.

    +
    Query Parameters JSON
    +
    +
    {}
    +
    +
    +
    Expected Response JSON
    +
    +
    {}
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      debug_node_api.debug_push_blocks

      -

      Push blocks from existing database.

      -
      Query Parameters 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}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"blocks": 0}
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      debug_node_api.debug_set_hardfork

      +
    +

    debug_node_api.debug_set_hardfork

    -
    Query Parameters JSON
    -
    {"hardfork_id": 0}
    -
    -
    Expected Response JSON
    -
    {}
    -
    +
    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).

    - -
    {
    +            
    +
    +
    +
    +            

    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":{
    @@ -9172,53 +10448,51 @@ 

    }, "id":1 } -

    +
    +
    -

    Also see: Broadcast Transaction

    +

    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.

      +
    +

    + 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.

    +

    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.

    +

    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. -
    +

    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:

    -
      -
    • voter: must be a valid account name
    • -
    • author: must be a valid account name
    • -
    • permlink: must be content created by author
    • -
    • weight: absolute value must not be more than 10000 (100.00 %).
    • -
    +

    Notes:

    +
      +
    • voter: must be a valid account name
    • +
    • author: must be a valid account name
    • +
    • permlink: must be content created by author
    • +
    • weight: absolute value must not be more than 10000 (100.00 %).
    • +
    -
    Roles: posting active owner
    -
    Parameters: voter author permlink weight
    +
    Roles: posting active owner
    +
    Parameters: voter author permlink weight
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "vote",
       {
         "voter": "steemit",
    @@ -9227,37 +10501,39 @@ 
    Example Op:
    "weight": 10000 } ] -
    +
    +
    -
    +
    -
      +
        -
      -

      -comment - - -

      -

      Creates a post/comment.

      +
    +

    + comment + + +

    +

    Creates a post/comment.

    -

    Notes:

    -
      -
    • title: must not be larger than 256 bytes
    • -
    • title: must be UTF-8
    • -
    • body: must be larger than 0 bytes
    • -
    • body: must be UTF-8
    • -
    +

    Notes:

    +
      +
    • title: must not be larger than 256 bytes
    • +
    • title: must be UTF-8
    • +
    • body: must be larger than 0 bytes
    • +
    • body: must be UTF-8
    • +
    -
    Roles: posting active owner
    -
    Parameters: parent_author parent_permlink author permlink title body json_metadata
    +
    Roles: posting active owner
    +
    Parameters: parent_author parent_permlink author permlink title body json_metadata
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "comment",
       {
         "parent_author": "",
    @@ -9269,38 +10545,39 @@ 
    Example Op:
    "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.

      +
    +

    + 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:

    -
      -
    • Transferring of Steem Power (VESTS) is not allowed.
    • -
    • Cannot transfer a negative amount (aka: stealing).
    • -
    • Memo must be less than 2048 bytes.
    • -
    • Memo must be UTF-8.
    • -
    +

    Notes:

    +
      +
    • Transferring of Steem Power (VESTS) is not allowed.
    • +
    • Cannot transfer a negative amount (aka: stealing).
    • +
    • Memo must be less than 2048 bytes.
    • +
    • Memo must be UTF-8.
    • +
    -
    Roles: active owner
    -
    Parameters: from to amount memo
    +
    Roles: active owner
    +
    Parameters: from to amount memo
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "transfer",
       {
         "from": "steemit",
    @@ -9313,38 +10590,37 @@ 
    Example Op:
    "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.

      +
    +

    + 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:

    -
      -
    • Amount must be in STEEM.
    • -
    • Must transfer a nonzero amount.
    • -
    +

    Notes:

    +
      +
    • Amount must be in STEEM.
    • +
    • Must transfer a nonzero amount.
    • +
    -
    Roles: active owner
    -
    Parameters: from to amount
    +
    Roles: active owner
    +
    Parameters: from to amount
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "transfer_to_vesting",
       {
         "from": "alice",
    @@ -9356,42 +10632,40 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    -
      +
        -
      -

      -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.

      +
    +

    + 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.

    +

    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.

    +

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

    -

    Notes:

    -
      -
    • Amount must be VESTS.
    • -
    +

    Notes:

    +
      +
    • Amount must be VESTS.
    • +
    -
    Roles: active owner
    -
    Parameters: account vesting_shares
    +
    Roles: active owner
    +
    Parameters: account vesting_shares
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "withdraw_vesting",
       {
         "account": "steemit",
    @@ -9402,30 +10676,31 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    -
      +
        -
      -

      -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().

      +
    +

    + 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
    +
    Roles: active owner
    +
    Parameters: owner orderid amount_to_sell min_to_receive fill_or_kill expiration
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "limit_order_create",
       {
         "owner": "steemit",
    @@ -9444,74 +10719,76 @@ 
    Example Op:
    "expiration": "2035-10-29T06:32:22" } ] -
    +
    +
    -
    +
    -
      +
        -
      -

      -limit_order_cancel - - -

      -

      Cancels an order and returns the balance to owner.

      +
    +

    + limit_order_cancel + + +

    +

    Cancels an order and returns the balance to owner.

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

      -price - - -

      +
    +

    + price + + +

    -
    Roles: active owner
    -
    Parameters: base quote
    +
    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.

      +
    +

    + 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
    +
    Roles: active owner
    +
    Parameters: publisher exchange_rate
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "feed_publish",
       {
         "publisher": "alice",
    @@ -9529,30 +10806,31 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    -
      +
        -
      -

      -convert - - -

      -

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

      +
    +

    + 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
    +
    Roles: active owner
    +
    Parameters: owner requestid amount
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "convert",
       {
         "owner": "steemit",
    @@ -9564,28 +10842,30 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    -
      +
        -
      -

      -account_create - - -

      +
    +

    + account_create + + +

    -
    Roles: active owner
    -
    Parameters: fee creator new_account_name owner active posting memo_key json_metadata
    +
    Roles: active owner
    +
    Parameters: fee creator new_account_name owner active posting memo_key json_metadata
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "account_create",
       {
         "fee": {
    @@ -9629,31 +10909,33 @@ 
    Example Op:
    "json_metadata": "{}" } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF20
      • +
      • Since: HF20
      • -
      -

      -create_claimed_account - - -

      -

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

      +
    +

    + 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
    +
    Roles: active owner
    +
    Parameters: creator new_account_name owner active posting memo_key json_metadata
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "create_claimed_account",
       {
         "creator": "steemit",
    @@ -9692,31 +10974,33 @@ 
    Example Op:
    "json_metadata": "{}" } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF20
      • +
      • Since: HF20
      • -
      -

      -claim_account - - -

      -

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

      +
    +

    + 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
    +
    Roles: active owner
    +
    Parameters: fee creator extensions
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "claim_account",
       {
         "fee": {
    @@ -9728,31 +11012,33 @@ 
    Example Op:
    "extensions": [] } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF20
      • +
      • Since: HF20
      • -
      -

      -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

      +
    +

    + 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
    +
    Roles: block_signing active owner
    +
    Parameters: owner props extensions
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "witness_set_properties",
       {
         "owner": "alice",
    @@ -9772,28 +11058,30 @@ 
    Example Op:
    "extensions": [] } ] -
    +
    +
    -
    +
    -
      +
        -
      -

      -account_update - - -

      +
    +

    + account_update + + +

    -
    Roles: active owner
    -
    Parameters: account owner active posting memo_key json_metadata
    +
    Roles: active owner
    +
    Parameters: account owner active posting memo_key json_metadata
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "account_update",
       {
         "account": "steemit",
    @@ -9815,81 +11103,69 @@ 
    Example Op:
    "json_metadata": "" } ] -
    +
    +
    -
    +
    -
      +
        -
      • Disabled
      • +
      • Disabled
      • -
      -

      -report_over_production - - -

      -

      Disabled in HF4

      +
    +

    + 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.

    +

    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.

    +

    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.

    +

    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
    +
    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.

      +
    +

    + 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 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.

    +

    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:

    -
      -
    • The fee paid to register a new witness, should be 10x current -block production pay.
    • -
    • url cannot be more than 2048 bytes.
    • -
    • url must be UTF-8.
    • -
    • fee cannot be negative.
    • -
    +

    Notes:

    +
      +
    • The fee paid to register a new witness, should be 10x current block production pay.
    • +
    • url cannot be more than 2048 bytes.
    • +
    • url must be UTF-8.
    • +
    • fee cannot be negative.
    • +
    -
    Roles: active owner
    -
    Parameters: owner url block_signing_key props fee
    +
    Roles: active owner
    +
    Parameters: owner url block_signing_key props fee
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "witness_update",
       {
         "owner": "alice",
    @@ -9911,32 +11187,33 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    - +

    + 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.

    +

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

    -
    Roles: active owner
    -
    Parameters: account witness approve
    +
    Roles: active owner
    +
    Parameters: account witness approve
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "account_witness_vote",
       {
         "account": "alice",
    @@ -9944,56 +11221,60 @@ 
    Example Op:
    "approve": true } ] -
    +
    +
    -
    +
    -
      +
        -
      -

      -account_witness_proxy - - -

      +
    +

    + account_witness_proxy + + +

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

      -pow - - -

      -

      Disabled in HF14.

      +
    +

    + pow + + +

    +

    Disabled in HF14.

    -
    Roles: active owner
    -
    Parameters: worker input signature work
    +
    Roles: active owner
    +
    Parameters: worker input signature work
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "pow",
       {
         "worker_account": "admin",
    @@ -10016,33 +11297,34 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    -
      +
        -
      -

      -custom - - -

      -

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

      +
    +

    + 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.

    +

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

    -
    Roles: active owner
    -
    Parameters: required_auths id data
    +
    Roles: active owner
    +
    Parameters: required_auths id data
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "custom",
       {
         "required_auths": ["bytemaster"],
    @@ -10050,79 +11332,77 @@ 
    Example Op:
    "data": "0a627974656d617374657207737465656d697402a3d13897d82114466ad87a74b73a53292d8331d1bd1d3082da6bfbcff19ed097029db013797711c88cccca3692407f9ff9b9ce7221aaa2d797f1692be2215d0a5f6d2a8cab6832050078bc5729201e3ea24ea9f7873e6dbdc65a6bd9899053b9acda876dc69f11a13df9ca8b26b6" } ] -
    +
    +
    -
    +
    -
      +
        -
      -

      -delete_comment - - -

      +
    +

    + delete_comment + + +

    -
    Roles: posting active owner
    -
    Parameters: author permlink
    +
    Roles: posting active owner
    +
    Parameters: author permlink
    -
    Example Op:
    +
    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.

      +
    +

    + 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
    +
    follow
    -

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

    +

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

    -
    reblog
    +
    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.

    +

    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
    +
    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

    +

    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
    +
    Roles: posting active owner
    +
    Parameters: required_auths required_posting_auths id json
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "custom_json",
       {
         "required_auths": [],
    @@ -10131,9 +11411,11 @@ 
    Example Op:
    "json": "[\"follow\",{\"follower\":\"steemit\",\"following\":\"alice\",\"what\":[\"blog\"]}]" } ] -
    +
    +
    -
    [
    +            
    +
    [
       "custom_json",
       {
         "required_auths": [],
    @@ -10142,9 +11424,11 @@ 
    Example Op:
    "json": "[\"follow\",{\"follower\":\"alice\",\"following\":\"eve\",\"what\":[\"ignore\"]}]" } ] -
    +
    +
    -
    [
    +            
    +
    [
       "custom_json",
       {
         "required_auths": [],
    @@ -10153,9 +11437,11 @@ 
    Example Op:
    "json": "{\"account\":\"bob\",\"author\":\"alice\",\"permlink\":\"a-post-by-alice\"}" } ] -
    +
    +
    -
    [
    +            
    +
    [
       "custom_json",
       {
         "required_auths": ["alice"],
    @@ -10164,68 +11450,63 @@ 
    Example Op:
    "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:

    - -
      -
    • The max_accepted_payout may be decreased, but never increased.
    • -
    • The percent_steem_dollars may be decreased, but never increased.
    • -
    • Part of comment_option validation process, to be called when -allowed_vote_assets object has been added as comment option extension are: -
        -
      • When votable assets are greater than maximum votable assets: “Too much votable assets specified”
      • -
      • When the symbol is not allowed in the list for votable assets: “STEEM can not be explicitly specified as one of allowed_vote_assets”
      • -
      -
    • -
    • max_accepted_payout: SBD value of the maximum payout this post will receive
    • -
    • percent_steem_dollars: the percent of Steem Dollars to key, unkept amounts will be received as Steem Power
    • -
    • allow_votes: allows/disallows a post to receive votes;
    • -
    • allow_curation_rewards: allows/disllows voters to recieve curation rewards. Rewards return to reward fund.
    • -
    • beneficiaries -
        -
      • Must have at least one (empty beneficiaries not allowed).
      • -
      • Cannot have more than 127 (witness currently only allow up to 8).
      • -
      • Cannot allocate more than 100% of rewards to one account.
      • -
      • Cannot allocate more than 100% of rewards to a comment.
      • -
      • Must be specified in sorted order (account ascending; no duplicates).
      • -
      -
    • -
    - -
    Roles: posting active owner
    -
    Parameters: author permlink max_accepted_payout percent_steem_dollars allow_votes allow_curation_rewards extensions
    - -
    Example Op:
    - -
    [
    +
    +
    + +
    + +
      + + + + +
    +

    + 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:

    + +
      +
    • The max_accepted_payout may be decreased, but never increased.
    • +
    • The percent_steem_dollars may be decreased, but never increased.
    • +
    • Part of comment_option validation process, to be called when + allowed_vote_assets object has been added as comment option extension are: +
        +
      • When votable assets are greater than maximum votable assets: “Too much votable assets specified”
      • +
      • When the symbol is not allowed in the list for votable assets: “STEEM can not be explicitly specified as one of allowed_vote_assets”
      • +
      +
    • +
    • max_accepted_payout: SBD value of the maximum payout this post will receive
    • +
    • percent_steem_dollars: the percent of Steem Dollars to key, unkept amounts will be received as Steem Power
    • +
    • allow_votes: allows/disallows a post to receive votes;
    • +
    • allow_curation_rewards: allows/disllows voters to recieve curation rewards. Rewards return to reward fund.
    • +
    • beneficiaries +
        +
      • Must have at least one (empty beneficiaries not allowed).
      • +
      • Cannot have more than 127 (witness currently only allow up to 8).
      • +
      • Cannot allocate more than 100% of rewards to one account.
      • +
      • Cannot allocate more than 100% of rewards to a comment.
      • +
      • Must be specified in sorted order (account ascending; no duplicates).
      • +
      +
    • +
    + +
    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",
    @@ -10241,9 +11522,11 @@ 
    Example Op:
    "extensions": [] } ] -
    +
    +
    -
    [
    +            
    +
    [
       "comment_options",
       {
         "author": "bob",
    @@ -10266,9 +11549,11 @@ 
    Example Op:
    ] } ] -
    +
    +
    -
    [
    +            
    +
    [
       "comment_options",
       {
         "author": "charlie",
    @@ -10296,38 +11581,37 @@ 
    Example Op:
    ] } ] -
    +
    +
    -
    +
    -
      +
        -
      -

      -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.

      +
    +

    + 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:

    -
      -
    • Percent must be valid steem percent.
    • -
    +

    Notes:

    +
      +
    • Percent must be valid steem percent.
    • +
    -
    Roles: active owner
    -
    Parameters: from_account to_account percent auto_vest
    +
    Roles: active owner
    +
    Parameters: from_account to_account percent auto_vest
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "set_withdraw_vesting_route",
       {
         "from_account": "alice",
    @@ -10336,30 +11620,31 @@ 
    Example Op:
    "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().

      +
    +

    + 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
    +
    Roles: active owner
    +
    Parameters: owner orderid amount_to_sell exchange_rate fill_or_kill expiration
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "limit_order_create2",
       {
         "owner": "alice",
    @@ -10385,106 +11670,92 @@ 
    Example Op:
    "expiration": "2017-05-12T23:11:13" } ] -
    +
    +
    -
    +
    -
      +
        -
      • Disabled
      • +
      • Disabled
      • -
      -

      -challenge_authority - - -

      -

      Disabled in HF14.

      +
    +

    + challenge_authority + + +

    +

    Disabled in HF14.

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

      -prove_authority - - -

      +
    +

    + prove_authority + + +

    -
    Roles: active owner
    -
    Parameters: challenged require_owner
    +
    Roles: active owner
    +
    Parameters: challenged require_owner
    -
    +
    -
      +
        -
      • Since: HF11
      • +
      • Since: HF11
      • -
      -

      -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.

      +
    +

    + 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.

    +

    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.

    +

    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.

    +

    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.

    +

    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:

    +

    Notes:

    -
      -
    • recovery_account: The recovery account is listed as the recovery account -on the account to recover.
    • -
    • account_to_recover: The account to recover. This is likely due to a -compromised owner authority.
    • -
    • new_owner_authority: The new owner authority the account to recover -wishes to have. This is secret known by the account to recover and -will be confirmed in a recover_account.
    • -
    +
      +
    • recovery_account: The recovery account is listed as the recovery account on the account to recover.
    • +
    • account_to_recover: The account to recover. This is likely due to a compromised owner authority.
    • +
    • new_owner_authority: The new owner authority the account to recover wishes to have. This is secret known by the account to recover and will be confirmed in a recover_account.
    • +
    -

    See: #169

    +

    See: #169

    -
    Roles: active owner
    -
    Parameters: recovery_account account_to_recover new_owner_authority extensions
    +
    Roles: active owner
    +
    Parameters: recovery_account account_to_recover new_owner_authority extensions
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "request_account_recovery",
       {
         "recovery_account": "steem",
    @@ -10502,30 +11773,32 @@ 
    Example Op:
    "extensions": [] } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF11
      • +
      • Since: HF11
      • -
      -

      -recover_account - - -

      +
    +

    + recover_account + + +

    -
    Roles: owner
    -
    Parameters: account_to_recover new_owner_authority recent_owner_authority extensions
    +
    Roles: owner
    +
    Parameters: account_to_recover new_owner_authority recent_owner_authority extensions
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "recover_account",
       {
         "account_to_recover": "alice",
    @@ -10552,48 +11825,40 @@ 
    Example Op:
    "extensions": [] } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF11
      • +
      • Since: HF11
      • -
      -

      -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.

      +
    +

    + 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.

    +

    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

    +

    See: #169

    -
    Roles: owner
    -
    Parameters: account_to_recover new_recovery_account extensions
    +
    Roles: owner
    +
    Parameters: account_to_recover new_recovery_account extensions
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "change_recovery_account",
       {
         "account_to_recover": "alice",
    @@ -10601,51 +11866,45 @@ 
    Example Op:
    "extensions": [] } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF14
      • +
      • Since: HF14
      • -
      -

      -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.

      +
    +

    + 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.

    +

    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.

    +

    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.

    +

    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.

    +

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

    -

    See: steem_operations.hpp:229

    +

    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
    +
    Roles: active owner
    +
    Parameters: from to agent escrow_id sbd_amount steem_amount fee ratification_deadline escrow_expiration json_meta
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "escrow_transfer",
       {
         "from": "alice",
    @@ -10672,35 +11931,35 @@ 
    Example Op:
    "escrow_expiration": "2017-02-28T11:22:39" } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF14
      • +
      • Since: HF14
      • -
      -

      -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.

      +
    +

    + 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

    +

    See: steem_operations.hpp:229

    -
    Roles: active owner
    -
    Parameters: from to agent who escrow_id
    +
    Roles: active owner
    +
    Parameters: from to agent who escrow_id
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "escrow_dispute",
       {
         "from": "alice",
    @@ -10710,44 +11969,42 @@ 
    Example Op:
    "escrow_id": 72526562 } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF14
      • +
      • Since: HF14
      • -
      -

      -escrow_release - - -

      -

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

      +
    +

    + 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:

    -
      -
    • If there is no dispute and escrow has not expired, either party can -release funds to the other.
    • -
    • If escrow expires and there is no dispute, either party can release -funds to either party.
    • -
    • If there is a dispute regardless of expiration, the agent can -release funds to either party following whichever agreement was in place between the parties.
    • -
    +

    The permission scheme is as follows:

    +
      +
    • If there is no dispute and escrow has not expired, either party can release funds to the other.
    • +
    • If escrow expires and there is no dispute, either party can release funds to either party.
    • +
    • If there is a dispute regardless of expiration, the agent can release funds to either party following whichever agreement was in place between the parties.
    • +
    -

    See: steem_operations.hpp:229

    +

    See: steem_operations.hpp:229

    -
    Roles: active owner
    -
    Parameters: from to agent who receiver escrow_id sbd_amount steem_amount
    +
    Roles: active owner
    +
    Parameters: from to agent who receiver escrow_id sbd_amount steem_amount
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "escrow_release",
       {
         "from": "alice",
    @@ -10768,30 +12025,32 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    -
      +
        -
      • Disabled
      • +
      • Disabled
      • -
      -

      -pow2 - - -

      -

      Disabled in HF17.

      -
      Roles: active owner
      -
      Parameters: input pow_summary
      +
    +

    + pow2 + + +

    +

    Disabled in HF17.

    +
    Roles: active owner
    +
    Parameters: input pow_summary
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "pow2",
       {
         "work": [
    @@ -10816,36 +12075,36 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF14
      • +
      • Since: HF14
      • -
      -

      -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.

      +
    +

    + 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

    +

    See: steem_operations.hpp:229

    -
    Roles: active owner
    -
    Parameters: from to agent who escrow_id approve
    +
    Roles: active owner
    +
    Parameters: from to agent who escrow_id approve
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "escrow_approve",
       {
         "from": "alice",
    @@ -10856,39 +12115,36 @@ 
    Example Op:
    "approve": true } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF14
      • +
      • Since: HF14
      • -
      -

      -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.

      +
    +

    + 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

    +

    See: steem_operations.hpp:868

    -
    Roles: active owner
    -
    Parameters: from to amount memo
    +
    Roles: active owner
    +
    Parameters: from to amount memo
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "transfer_to_savings",
       {
         "from": "alice",
    @@ -10901,30 +12157,32 @@ 
    Example Op:
    "memo": "" } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF14
      • +
      • Since: HF14
      • -
      -

      -transfer_from_savings - - -

      +
    +

    + transfer_from_savings + + +

    -
    Roles: active owner
    -
    Parameters: from request_id to amount memo
    +
    Roles: active owner
    +
    Parameters: from request_id to amount memo
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "transfer_from_savings",
       {
         "from": "alice",
    @@ -10938,165 +12196,165 @@ 
    Example Op:
    "memo": "" } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF14
      • +
      • Since: HF14
      • -
      -

      -cancel_transfer_from_savings - - -

      +
    +

    + cancel_transfer_from_savings + + +

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

      -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.

      +
    +

    + 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

    +

    See: steem_operations.hpp:491

    -
    Roles: posting active owner
    -
    Parameters: id data
    +
    Roles: posting active owner
    +
    Parameters: id data
    -
    +
    -
      +
        -
      • Since: HF14
      • +
      • Since: HF14
      • -
      -

      -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.

      +
    +

    + 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

    +

    See: steem_operations.hpp:897

    -
    Roles: owner
    -
    Parameters: account decline
    +
    Roles: owner
    +
    Parameters: account decline
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "decline_voting_rights",
       {"account": "judy", "decline": true}
     ]
    -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF11
      • +
      • Since: HF11
      • -
      • Disabled
      • +
      • Disabled
      • -
      -

      -reset_account - - -

      -

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

      +
    +

    + 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

    +

    See: #169

    -
    Roles: active owner
    -
    Parameters: reset_account account_to_reset new_owner_authority
    +
    Roles: active owner
    +
    Parameters: reset_account account_to_reset new_owner_authority
    -
    +
    -
      +
        -
      • Since: HF11
      • +
      • Since: HF11
      • -
      • Disabled
      • +
      • Disabled
      • -
      -

      -set_reset_account - - -

      -

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

      +
    +

    + 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

    +

    See: #169

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

      -claim_reward_balance - - -

      +
    +

    + claim_reward_balance + + +

    -
    Roles: posting active owner
    -
    Parameters: account reward_steem reward_sbd reward_vests
    +
    Roles: posting active owner
    +
    Parameters: account reward_steem reward_sbd reward_vests
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "claim_reward_balance",
       {
         "account": "alice",
    @@ -11117,43 +12375,41 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF17
      • +
      • Since: HF17
      • -
      -

      -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).

      +
    +

    + 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.

    +

    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:

    - +

    Also see:

    + -
    Roles: active owner
    -
    Parameters: delegator delegatee vesting_shares
    +
    Roles: active owner
    +
    Parameters: delegator delegatee vesting_shares
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "delegate_vesting_shares",
       {
         "delegator": "alice",
    @@ -11165,56 +12421,54 @@ 
    Example Op:
    } } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF17
      • +
      • Since: HF17
      • -
      • Deprecated
      • +
      • Deprecated
      • -
      -

      -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.

      +
    +

    + 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).

    -
    +
    +

    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 +

    +

    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:

    - +

    Also see:

    + -
    Roles: active owner
    -
    Parameters: fee delegation creator new_account_name owner active posting memo_key json_metadata extensions
    +
    Roles: active owner
    +
    Parameters: fee delegation creator new_account_name owner active posting memo_key json_metadata extensions
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "account_create_with_delegation",
       {
         "fee": {
    @@ -11264,164 +12518,166 @@ 
    Example Op:
    "extensions": [] } ] -
    +
    +
    -
    +
    -
      +
        -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -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.

      +
    +

    + 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
    +
    Roles: active owner
    +
    Parameters: owner requestid amount_in amount_out
    -
    +
    -
      +
        -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -author_reward - - -

      +
    +

    + author_reward + + +

    -
    Roles: posting active owner
    -
    Parameters: author permlink sbd_payout steem_payout vesting_payout
    +
    Roles: posting active owner
    +
    Parameters: author permlink sbd_payout steem_payout vesting_payout
    -
    +
    -
      +
        -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -curation_reward - - -

      +
    +

    + curation_reward + + +

    -
    Roles: posting active owner
    -
    Parameters: curator reward comment_author comment_permlink
    +
    Roles: posting active owner
    +
    Parameters: curator reward comment_author comment_permlink
    -
    +
    -
      +
        -
      • Since: HF17
      • +
      • Since: HF17
      • -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -comment_reward - - -

      -

      See: #774

      +
    +

    + comment_reward + + +

    +

    See: #774

    -
    Roles: posting active owner
    -
    Parameters: author permlink payout
    +
    Roles: posting active owner
    +
    Parameters: author permlink payout
    -
    +
    -
      +
        -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      • Disabled
      • +
      • Disabled
      • -
      -

      -liquidity_reward - - -

      -

      Deprecated as of HF12, see: #178.

      +
    +

    + liquidity_reward + + +

    +

    Deprecated as of HF12, see: #178.

    -
    Roles: active owner
    -
    Parameters: owner payout
    +
    Roles: active owner
    +
    Parameters: owner payout
    -
    +
    -
      +
        -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -interest - - -

      +
    +

    + interest + + +

    -
    Roles: active owner
    -
    Parameters: owner interest
    +
    Roles: active owner
    +
    Parameters: owner interest
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "interest",
       {"owner": "alice", "interest": "0.001 SBD"}
     ]
    -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF6
      • +
      • Since: HF6
      • -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -fill_vesting_withdraw - - -

      -

      See: #78

      +
    +

    + fill_vesting_withdraw + + +

    +

    See: #78

    -
    Roles: active owner
    -
    Parameters: from_account to_account withdrawn deposited
    +
    Roles: active owner
    +
    Parameters: from_account to_account withdrawn deposited
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "fill_vesting_withdraw",
       {
         "from_account": "alice",
    @@ -11430,30 +12686,32 @@ 
    Example Op:
    "deposited": "0.710 STEEM" } ] -
    +
    +
    -
    +
    -
      +
        -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -fill_order - - -

      +
    +

    + fill_order + + +

    -
    Roles: posting active owner
    -
    Parameters: current_owner current_orderid current_pays open_owner open_orderid open_pays
    +
    Roles: posting active owner
    +
    Parameters: current_owner current_orderid current_pays open_owner open_orderid open_pays
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "fill_order",
       {
         "current_owner": "alice",
    @@ -11464,195 +12722,197 @@ 
    Example Op:
    "open_pays": "500.000 STEEM" } ] -
    +
    +
    -
    +
    -
      +
        -
      • Since: HF14
      • +
      • Since: HF14
      • -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -shutdown_witness - - -

      -

      When a witness goes offline.

      +
    +

    + shutdown_witness + + +

    +

    When a witness goes offline.

    -

    See: #278

    +

    See: #278

    -
    Roles: posting active owner
    -
    Parameters: owner
    +
    Roles: posting active owner
    +
    Parameters: owner
    -
    Example Op:
    +
    Example Op:
    -
    ["shutdown_witness", {"owner": "alice"}]
    -
    +
    +
    ["shutdown_witness", {"owner": "alice"}]
    +
    +
    -
    +
    -
      +
        -
      • Since: HF14
      • +
      • Since: HF14
      • -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -fill_transfer_from_savings - - -

      +
    +

    + fill_transfer_from_savings + + +

    -
    Roles: posting active owner
    -
    Parameters: from to amount request_id memo
    +
    Roles: posting active owner
    +
    Parameters: from to amount request_id memo
    -
    +
    -
      +
        -
      • Since: HF9
      • +
      • Since: HF9
      • -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -hardfork - - -

      +
    +

    + hardfork + + +

    -
    Roles: posting active owner
    -
    Parameters: hardfork_id
    +
    Roles: posting active owner
    +
    Parameters: hardfork_id
    -
    +
    -
      +
        -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -comment_payout_update - - -

      +
    +

    + comment_payout_update + + +

    -
    Roles: posting active owner
    -
    Parameters: author permlink
    +
    Roles: posting active owner
    +
    Parameters: author permlink
    -
    +
    -
      +
        -
      • Since: HF17
      • +
      • Since: HF17
      • -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -return_vesting_delegation - - -

      +
    +

    + return_vesting_delegation + + +

    -
    Roles: posting active owner
    -
    Parameters: account vesting_shares
    +
    Roles: posting active owner
    +
    Parameters: account vesting_shares
    -
    +
    -
      +
        -
      • Since: HF17
      • +
      • Since: HF17
      • -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -comment_benefactor_reward - - -

      +
    +

    + comment_benefactor_reward + + +

    -
    Roles: posting active owner
    -
    Parameters: benefactor author permlink reward
    +
    Roles: posting active owner
    +
    Parameters: benefactor author permlink reward
    -
    +
    -
      +
        -
      • Since: HF17
      • +
      • Since: HF17
      • -
      • Virtual Operation
      • +
      • Virtual Operation
      • -
      -

      -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.

      +
    +

    + 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
    +
    Roles: posting active owner
    +
    Parameters: producer vesting_shares
    -
    Example Op:
    +
    Example Op:
    -
    [
    +            
    +
    [
       "producer_reward",
       {
         "producer": "alice",
         "vesting_shares": "14403.626449 VESTS"
       }
     ]
    -
    +
    +
    + +
    -
    +
    - - - - - + + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/jsonrpc.html b/docs/apidefinitions/jsonrpc.html index edf549c1..81e4fb5f 100644 --- a/docs/apidefinitions/jsonrpc.html +++ b/docs/apidefinitions/jsonrpc.html @@ -1,399 +1,428 @@ + - - - - - - - - - - - - - - - -Jsonrpc | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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.

    - -
      - - - - - -
    • Working on mainnet
    • - - - -
    • Working on testnet
    • - - -
    -

    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
    -
    - -
    - -
      - - - - - -
    • Working on mainnet
    • +
      +

      + + Steem Developer logo +

      + + +
      + + +
      + + + - - + + +
    • Witness Api
    • + + + +
    • Block Api
    • + + + +
    • Debug Node Api
    • + + + +
    • Broadcast Ops
    • + + + + +
    + + + + + + + + +
    + + + + + + + + + +
    +
    +

    Steem Developer Portal

    + + + +
    + +

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

    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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
    +
    +
    + +
    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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
    +
    +
    + +
    + + +
    + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/market-history-api.html b/docs/apidefinitions/market-history-api.html index 26f77972..2be08d3c 100644 --- a/docs/apidefinitions/market-history-api.html +++ b/docs/apidefinitions/market-history-api.html @@ -1,480 +1,530 @@ + - - - - - - - - - - - - - - - -Market History Api | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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.

    - -
      - - - - - -
    • Working on mainnet
    • - - - -
    • Working on testnet
    • - - -
    -

    market_history_api.get_market_history

    -

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

    -
    Query Parameters JSON
    -
    {
    +    
    +

    + + Steem Developer logo +

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

    Steem Developer Portal

    + + + +
    + +

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

    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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": []}
    -
    +
    +
    +
    Expected Response JSON
    +
    +
    {"buckets": []}
    +
    +
    -
    Example curl
    +
    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":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":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":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":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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      market_history_api.get_market_history_buckets

      -

      Returns the bucket seconds being tracked by the plugin.

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

    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
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history_buckets", "id":1}' https://api.steemit.com
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_market_history_buckets", "id":1}' https://api.steemit.com
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      market_history_api.get_order_book

      -

      Returns the internal market order book.

      -
      Query Parameters JSON
      -
      {"limit": 500}
      -
      -
      Expected Response JSON
      -
      {"bids": [], "asks": []}
      -
      +
    +

    market_history_api.get_order_book

    +

    Returns the internal market order book.

    +
    Query Parameters JSON
    +
    +
    {"limit": 500}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"bids": [], "asks": []}
    +
    +
    -
    Example curl
    +
    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":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
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_order_book", "params":{"limit":50}, "id":1}' https://api.steemit.com
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      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": []}
      -
      +
    +

    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
    +
    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":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
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_recent_trades", "params":{"limit":500}, "id":1}' https://api.steemit.com
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      market_history_api.get_ticker

      -

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

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

    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",
    @@ -490,70 +540,82 @@ 
    Expected Response "nai": "@@000000013" } } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_ticker", "id":1}' https://api.steemit.com
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_ticker", "id":1}' https://api.steemit.com
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      market_history_api.get_trade_history

      -

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

      -
      Query Parameters JSON
      -
      {
      +        
    +

    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": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"trades": []}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      market_history_api.get_volume

      -

      Returns the market volume for the past 24 hours.

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

    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,
    @@ -565,28 +627,31 @@ 
    Expected Response "nai": "@@000000013" } } -
    +
    + -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_volume", "id":1}' https://api.steemit.com
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"market_history_api.get_volume", "id":1}' https://api.steemit.com
    +
    +
    -
    +
    - - - + + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/network-broadcast-api.html b/docs/apidefinitions/network-broadcast-api.html index 87234edb..4efff0d2 100644 --- a/docs/apidefinitions/network-broadcast-api.html +++ b/docs/apidefinitions/network-broadcast-api.html @@ -1,338 +1,350 @@ + - - - - - - - - - - - - - - - -Network Broadcast Api | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Network Broadcast Api | Steem Developer + + + + + + + + + + + + + + -
    -

    - - Steem Developer logo -

    - - -
    - - -
    - - - - - - - - - - - -
    -
    -
    -

    Steem Developer Portal

    - - - -
    - -

    Used to broadcast transactions and blocks. These AppBase API methods are +

    +

    + + 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

    +

    Also see: Blockchain Ops

    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      network_broadcast_api.broadcast_block

      -

      Used to broadcast a block.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    network_broadcast_api.broadcast_block

    +

    Used to broadcast a block.

    +
    Query Parameters JSON
    +
    +
    {
       "block": {
         "previous": "0000000000000000000000000000000000000000",
         "timestamp": "1970-01-01T00:00:00",
    @@ -343,36 +355,42 @@ 
    Query Parameters J "transactions": [] } } -
    -
    Expected Response JSON
    -
    {}
    -
    +
    +
    +
    Expected Response JSON
    +
    +
    {}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      network_broadcast_api.broadcast_transaction

      -

      Used to broadcast a transaction.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    network_broadcast_api.broadcast_transaction

    +

    Used to broadcast a transaction.

    +
    Query Parameters JSON
    +
    +
    {
       "trx": {
         "ref_block_num": 0,
         "ref_block_prefix": 0,
    @@ -383,34 +401,41 @@ 
    Query Parame }, "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
    -
    - -
    - - - - - +
    + +
    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
    +
    +
    + +
    + + + + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/rc-api.html b/docs/apidefinitions/rc-api.html index 10b7577f..e6c9b873 100644 --- a/docs/apidefinitions/rc-api.html +++ b/docs/apidefinitions/rc-api.html @@ -1,360 +1,376 @@ + - - - - - - - - - - - - - - - -Rc Api | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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

    - -
      - -
    • Since: HF20
    • - - - - - -
    • Working on mainnet
    • - - - -
    • Working on testnet
    • - - -
    -

    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
    -
    {
    +    
    +

    + + 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 +

    + +
      + +
    • Since: HF20
    • + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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": "",
    @@ -368,42 +384,50 @@ 
    Expected Response JSON < } ] } -
    +
    +
    -
    Example curl
    +
    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":["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
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.find_rc_accounts", "params":{"accounts":["alice","bob"]}, "id":1}' https://api.steemit.com
    +
    +
    -
    +
    -
      +
        -
      • Since: HF20
      • +
      • Since: HF20
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      rc_api.get_resource_params

      -

      Work in progress. See: #2980

      +
    +

    rc_api.get_resource_params

    +

    Work in progress. See: #2980

    -
    Query Parameters JSON
    -
    {}
    -
    -
    Expected Response JSON
    -
    {
    +        
    Query Parameters JSON
    +
    +
    {}
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "resource_names": [
         "resource_history_bytes",
         "resource_new_accounts",
    @@ -572,39 +596,45 @@ 
    Expected Response JSO } } } -
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.get_resource_params", "id":1}' https://api.steemit.com
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.get_resource_params", "id":1}' https://api.steemit.com
    +
    +
    -
    +
    -
      +
        -
      • Since: HF20
      • +
      • Since: HF20
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      rc_api.get_resource_pool

      -

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

      +
    +

    rc_api.get_resource_pool

    +

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

    -
    Query Parameters JSON
    -
    {}
    -
    -
    Expected Response JSON
    -
    {
    +        
    Query Parameters JSON
    +
    +
    {}
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "resource_pool": {
         "resource_history_bytes": {"pool": "200825644923"},
         "resource_new_accounts": {"pool": 37393465},
    @@ -613,28 +643,31 @@ 
    Expected Response JSON "resource_execution_time": {"pool": "47739958648192"} } } -
    +
    +
    -
    Example curl
    +
    Example curl
    -
    curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.get_resource_pool", "id":1}' https://api.steemit.com
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"rc_api.get_resource_pool", "id":1}' https://api.steemit.com
    +
    +
    -
    +
    -
    - - + + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/tags-api.html b/docs/apidefinitions/tags-api.html index 1e502a44..b596530e 100644 --- a/docs/apidefinitions/tags-api.html +++ b/docs/apidefinitions/tags-api.html @@ -1,370 +1,390 @@ + - - - - - - - - - - - - - - - -Tags Api | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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.

    - -
      - - - - - -
    • Working on mainnet
    • - - - -
    • Working on testnet
    • - - -
    -

    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
    -
    - -
    - - + + + + + + + + +
    + + + + + + + + + +
    +
    +

    Steem Developer Portal

    + + + +
    + +

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

    + +
      + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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
    +
    +
    + +
    + +
      + +
    • Since: HF17
    • + + + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    tags_api.get_comment_discussions_by_payout

    +

    Returns a list of discussions based on payout.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -372,75 +392,93 @@ 
    Query Paramet "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_content_replies

      -

      Returns a list of replies.

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

    tags_api.get_content_replies

    +

    Returns a list of replies.

    +
    Query Parameters JSON
    +
    +
    {"author": "", "permlink": ""}
    +
    +
    +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussion

      -

      Returns the discussion given an author and permlink.

      -
      Query Parameters JSON
      -
      {"author": "", "permlink": ""}
      -
      -
      Expected Response JSON
      -
      {
      +        
    +

    tags_api.get_discussion

    +

    Returns the discussion given an author and permlink.

    +
    Query Parameters JSON
    +
    +
    {"author": "", "permlink": ""}
    +
    +
    +
    Expected Response JSON
    +
    +
    {
       "id": 0,
       "author": "",
       "permlink": "",
    @@ -511,36 +549,42 @@ 
    Expected Response JSON < "body_length": 0, "reblogged_by": [] } -
    +
    + -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_active

      -

      Returns a list of discussions based on active.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    tags_api.get_discussions_by_active

    +

    Returns a list of discussions based on active.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -548,74 +592,88 @@ 
    Query Parameters JSON "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_author_before_date

      -

      Returns a list of discussions based on author before date.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    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": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_blog

      -

      Returns a list of discussions by blog.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    tags_api.get_discussions_by_blog

    +

    Returns a list of discussions by blog.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -623,39 +681,47 @@ 
    Query Parameters JSON < "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_discussions_by_blog", "params":{"tag":"alice","limit":10}, "id":1}' https://api.steemit.com
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_cashout

      -

      Returns a list of discussions by cashout.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    tags_api.get_discussions_by_cashout

    +

    Returns a list of discussions by cashout.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -663,39 +729,47 @@ 
    Query Parameters JSO "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_children

      -

      Returns a list of discussions by children.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    tags_api.get_discussions_by_children

    +

    Returns a list of discussions by children.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -703,39 +777,47 @@ 
    Query Parameters JS "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_comments

      -

      Returns a list of discussions by comments.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    tags_api.get_discussions_by_comments

    +

    Returns a list of discussions by comments.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -743,39 +825,47 @@ 
    Query Parameters JS "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_created

      -

      Returns a list of discussions by created.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    tags_api.get_discussions_by_created

    +

    Returns a list of discussions by created.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -783,41 +873,49 @@ 
    Query Parameters JSO "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Since: HF14
      • +
      • Since: HF14
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_feed

      -

      Returns a list of discussions by feed.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    tags_api.get_discussions_by_feed

    +

    Returns a list of discussions by feed.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -825,39 +923,47 @@ 
    Query Parameters JSON < "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_hot

      -

      Returns a list of discussions by hot.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    tags_api.get_discussions_by_hot

    +

    Returns a list of discussions by hot.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -865,41 +971,49 @@ 
    Query Parameters JSON "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Since: HF13
      • +
      • Since: HF13
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_promoted

      -

      Returns a list of discussions by promoted.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    tags_api.get_discussions_by_promoted

    +

    Returns a list of discussions by promoted.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -907,39 +1021,47 @@ 
    Query Parameters JS "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      - -

      Returns a list of discussions by trending.

      - -
      {
      +        
    + +

    Returns a list of discussions by trending.

    + +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -947,39 +1069,47 @@ 
    - -
    {"discussions": []}
    -
    +
    + + +
    +
    {"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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_discussions_by_votes

      -

      Returns a list of discussions by votes.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    tags_api.get_discussions_by_votes

    +

    Returns a list of discussions by votes.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -987,41 +1117,49 @@ 
    Query Parameters JSON "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Since: HF17
      • +
      • Since: HF17
      • -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_post_discussions_by_payout

      -

      Returns a list of post discussions by payout.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    tags_api.get_post_discussions_by_payout

    +

    Returns a list of post discussions by payout.

    +
    Query Parameters JSON
    +
    +
    {
       "tag": "",
       "limit": 0,
       "filter_tags": [],
    @@ -1029,131 +1167,158 @@ 
    Query Parameters "select_tags": [], "truncate_body": 0 } -
    -
    Expected Response JSON
    -
    {"discussions": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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":"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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_replies_by_last_update

      -

      Returns a list of replies by last update.

      -
      Query Parameters JSON
      -
      {
      +        
    +

    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": []}
    -
    +
    + +
    Expected Response JSON
    +
    +
    {"discussions": []}
    +
    +
    -
    Example curl
    +
    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
    -
    +
    +
    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
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      -

      tags_api.get_tags_used_by_author

      -

      Returns a list of tags used by an author.

      -
      Query Parameters JSON
      -
      {"author": ""}
      -
      -
      Expected Response JSON
      -
      {"tags": []}
      -
      +
    +

    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
    +
    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
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_tags_used_by_author", "params":{"author":"steemit"}, "id":1}' https://api.steemit.com
    +
    +
    -
    +
    -
      +
        -
      • Working on mainnet
      • +
      • Working on mainnet
      • -
      • Working on testnet
      • +
      • Working on testnet
      • -
      - -

      Returns the list of trending tags.

      - -
      {"start_tag": "", "limit": 100}
      -
      - -
      {"tags": []}
      -
      +
    + +

    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":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
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"tags_api.get_trending_tags", "params":{"start_tag":"steem","limit":10}, "id":1}' https://api.steemit.com
    +
    +
    -
    +
    - - - + + + - + - + \ No newline at end of file diff --git a/docs/apidefinitions/witness-api.html b/docs/apidefinitions/witness-api.html index f210cb07..cd7c1496 100644 --- a/docs/apidefinitions/witness-api.html +++ b/docs/apidefinitions/witness-api.html @@ -1,403 +1,426 @@ + - - - - - - - - - - - - - - - -Witness Api | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Witness Api | Steem Developer + + + + + + + + + + + + + + -
    -

    - - Steem Developer logo -

    - - -
    - - -
    - - - - - - - - - - - -
    -
    -
    -

    Steem Developer Portal

    - - - -
    - -

    API removed in 0.20.6, see: #3029

    - -
      - - - -
    • Disabled
    • - - - -
    • Working on mainnet
    • - - - -
    • Working on testnet
    • - - -
    -

    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
    -
    {}
    -
    - -
    +
    +

    + + Steem Developer logo +

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

    Steem Developer Portal

    + + + +
    + +

    API removed in 0.20.6, see: #3029

    + +
      + + + +
    • Disabled
    • + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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
    +
    +
    {}
    +
    +
    + +
    + +
      + + + +
    • Disabled
    • + + + +
    • Working on mainnet
    • + + + +
    • Working on testnet
    • + + +
    +

    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
    +
    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":"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
    -
    +
    +
    curl -s --data '{"jsonrpc":"2.0", "method":"witness_api.get_account_bandwidth", "params":{"account":"alice","type":"market"}, "id":1}' https://api.steemit.com
    +
    +
    -
    +
    - - - + + + - + - + \ No newline at end of file diff --git a/docs/glossary/api.html b/docs/glossary/api.html index e1818b81..6d7ffdc2 100644 --- a/docs/glossary/api.html +++ b/docs/glossary/api.html @@ -1,328 +1,337 @@ + - - - - - - - - - - - - - - - -API | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + API | Steem Developer + + + + + + + + + + + + + + -
    -

    - - Steem Developer logo -

    - - -
    - - -
    - - - - - - - - - - - -
    -
    -
    -

    Steem Developer Portal

    - - - -
    - - -
    - - +
    +

    + + Steem Developer logo +

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

    Steem Developer Portal

    + + + +
    + + +
    + + - + - + \ No newline at end of file diff --git a/docs/glossary/chain_basics.html b/docs/glossary/chain_basics.html index da3fa117..d816405b 100644 --- a/docs/glossary/chain_basics.html +++ b/docs/glossary/chain_basics.html @@ -1,341 +1,353 @@ + - - - - - - - - - - - - - - - -Chain Basics | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Chain Basics | Steem Developer + + + + + + + + + + + + + + -
    -

    - - Steem Developer logo -

    - - -
    - - -
    - - - - - - - - - - - -
    -
    -
    -

    Steem Developer Portal

    - - - -
    - - - - - - - - - - - - - -
    TermDefinition
    BlockchainDecentralized ledger and consensus protocol
    SteemName of the blockchain and platform
    - -
    - - +
    +

    + + Steem Developer logo +

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

    Steem Developer Portal

    + + + +
    + + + + + + + + + + + + + + + + +
    TermDefinition
    BlockchainDecentralized ledger and consensus protocol
    SteemName of the blockchain and platform
    + +
    + + - + - + \ No newline at end of file diff --git a/docs/glossary/governance.html b/docs/glossary/governance.html index b308deb8..df89d2a4 100644 --- a/docs/glossary/governance.html +++ b/docs/glossary/governance.html @@ -1,328 +1,337 @@ + - - - - - - - - - - - - - - - -Governance | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Governance | Steem Developer + + + + + + + + + + + + + + -
    -

    - - Steem Developer logo -

    - - -
    - - -
    - - - - - - - - - - - -
    -
    -
    -

    Steem Developer Portal

    - - - -
    - - -
    - - +
    +

    + + Steem Developer logo +

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

    Steem Developer Portal

    + + + +
    + + +
    + + - + - + \ No newline at end of file diff --git a/docs/glossary/index.html b/docs/glossary/index.html index e854f4b2..924a5004 100644 --- a/docs/glossary/index.html +++ b/docs/glossary/index.html @@ -1,659 +1,671 @@ + - - - - - - - - - - - - - - - -Index | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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
    -
    - -
    - -
    -
    -
    - -
    - - +
    +

    + + 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
    +
    + +
    + +
    +
    +
    + +
    + + - + - + \ No newline at end of file diff --git a/docs/glossary/market.html b/docs/glossary/market.html index c5f6a0ef..13973c57 100644 --- a/docs/glossary/market.html +++ b/docs/glossary/market.html @@ -1,328 +1,337 @@ + - - - - - - - - - - - - - - - -Market | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Market | Steem Developer + + + + + + + + + + + + + + -
    -

    - - Steem Developer logo -

    - - -
    - - -
    - - - - - - - - - - - -
    -
    -
    -

    Steem Developer Portal

    - - - -
    - - -
    - - +
    +

    + + Steem Developer logo +

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

    Steem Developer Portal

    + + + +
    + + +
    + + - + - + \ No newline at end of file diff --git a/docs/glossary/transactions.html b/docs/glossary/transactions.html index ba282687..e5a266a4 100644 --- a/docs/glossary/transactions.html +++ b/docs/glossary/transactions.html @@ -1,328 +1,337 @@ + - - - - - - - - - - - - - - - -Transactions | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Transactions | Steem Developer + + + + + + + + + + + + + + -
    -

    - - Steem Developer logo -

    - - -
    - - -
    - - - - - - - - - - - -
    -
    -
    -

    Steem Developer Portal

    - - - -
    - - -
    - - +
    +

    + + Steem Developer logo +

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

    Steem Developer Portal

    + + + +
    + + +
    + + - + - + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index b67ca6f2..bf6c1ec3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,395 +1,403 @@ + - - - - - - - - - - - - - - - -API Docs | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + API Docs | Steem Developer + + + + + + + + + + + + + + -
    -

    - - Steem Developer logo -

    - - -
    - - -
    - - - - - - - - - - - -
    -
    -
    -

    Steem Developer Portal

    - - - -
    - - - - - - - - -
    -
    -

    - +
    +

    + + 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.

    -

    Welcome to the Steem Developer Portal!

    +

    Our tutorials section will take you through the basics of interacting with Steem apis in Javascript, Python, and Ruby.

    -

    This site is designed to aid those interested in developing applications on the Steem blockchain.

    +

    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.

    -

    If you don’t know about Steem yet, visit steem.com.

    +

    You can find community resources, libraries, and more ‘human’ ways to get help and education in the communities section.

    -

    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

    +

    The glossary has Steem specific terms that will help you understand documentation, whitepapers, and the speech of other steemians.

    -

    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.

    - - - - - - - - - - - - - - - - - - - -
    - - + + + + + + + + + + + + + + - + - + \ No newline at end of file diff --git a/docs/introduction/welcome.html b/docs/introduction/welcome.html index def478a3..319eaccf 100644 --- a/docs/introduction/welcome.html +++ b/docs/introduction/welcome.html @@ -1,350 +1,357 @@ + - - - - - - - - - - - - - - - -Welcome to Steem | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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.

    - - -
    - - +
    +

    + + 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.

    + + +
    + + - + - + \ No newline at end of file diff --git a/docs/quickstart/choose_library.html b/docs/quickstart/choose_library.html index 1ca4bac4..73306fa1 100644 --- a/docs/quickstart/choose_library.html +++ b/docs/quickstart/choose_library.html @@ -1,330 +1,339 @@ + - - - - - - - - - - - - - - - -Choose Library | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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.

    - -
    - - +
    +

    + + 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.

    + +
    + + - + - + \ No newline at end of file diff --git a/docs/quickstart/index.html b/docs/quickstart/index.html index fae62bf2..f4a33575 100644 --- a/docs/quickstart/index.html +++ b/docs/quickstart/index.html @@ -1,504 +1,534 @@ + - - - - - - - - - - - - - - - -Quickstart | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Quickstart | Steem Developer + + + + + + + + + + + + + + -
    -

    - - Steem Developer logo -

    - - -
    - - -
    - - - - - - - - - - - -
    -
    -
    -

    Steem Developer Portal - Quickstart

    - - - -
    - - - - -
    -

    - +
    +

    + + 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.

    +

    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 :
    +            
    +
    +
    +            

    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.

    +

    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:
    +
    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.

    +

    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    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.

    +

    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 \
    +            
    +
    docker run \
         -d -p 2001:2001 -p 8090:8090 --name steemd-default \
         steemit/steem
     
     docker logs -f steemd-default  # follow along
    -
    -
    docker run \
    +
    +
    +
    +
    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.

    +

    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’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!

    +

    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

    +

    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 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.

    +

    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:

    +

    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
    • -
    +
      +
    • ChainID: 46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32
    • +
    • Address prefix: TST
    • +
    • API node: https://testnet.steemitdev.com
    • +
    -

    Running a Testnet Node

    +

    Running a Testnet Node

    -

    First, let’s build steemd specifically for testnet. Recommended specs:

    +

    First, let’s build steemd specifically for testnet. Recommended specs:

    -
      -
    • Ubuntu Server 16.04 LTS
    • -
    • 100GB HDD
    • -
    • 16GB RAM (mostly needed for steemd build)
    • -
    +
      +
    • Ubuntu Server 16.04 LTS
    • +
    • 100GB HDD
    • +
    • 16GB RAM (mostly needed for steemd build)
    • +
    -
    sudo apt-get update && sudo apt-get dist-upgrade
    +            
    +
    sudo apt-get update && sudo apt-get dist-upgrade
     sudo reboot
     
     sudo apt-get install autoconf automake autotools-dev bsdmainutils build-essential cmake doxygen \
    @@ -528,11 +558,13 @@ 

    Running a Testnet Node

    mkdir -p testnet-data cd testnet-data nano config.ini -
    +
    +
    -

    config.ini

    +

    config.ini

    -
    log-console-appender = {"appender":"stderr","stream":"std_error"}
    +            
    +
    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"}
    @@ -548,65 +580,72 @@ 

    config.ini

    # testnet.steemitdev.com p2p-seed-node = testnet.steemitdev.com:2001 -
    +
    +
    -

    Then execute:

    +

    Then execute:

    -
    steemd --data-dir=. --chain-id=46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32
    -
    +
    +
    steemd --data-dir=. --chain-id=46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32
    +
    +
    -

    Now let it sync, and you’ll have a shiny new testnet seed node to play with.

    +

    Now let it sync, and you’ll have a shiny new testnet seed node to play with.

    -

    Custom Testnet

    +

    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 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.

    +

    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.

    +

    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.

    +

    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.

    +

    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:

    +

    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:

    +

    void database::init_genesis( uint64_t init_supply ) inside try add this line:

    -

    set_hardfork( 19, true );

    +

    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.

    +

    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.

    +

    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.

    +

    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

    +

    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

    +

    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
    • -
    +
      +
    • ChainID: 79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673
    • +
    • Address prefix: STX
    • +
    • API node: https://testnet.steem.vc
    • +
    -
    - + -
    - - + + + + - + - + \ No newline at end of file diff --git a/docs/quickstart/steemd_nodes.html b/docs/quickstart/steemd_nodes.html index 524534b5..ce213983 100644 --- a/docs/quickstart/steemd_nodes.html +++ b/docs/quickstart/steemd_nodes.html @@ -1,430 +1,455 @@ + - - - - - - - - - - - - - - - -steemd Nodes | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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.steem.fans@ety001
    steem.61bts.com@ety001
    api.steemyy.com@justyy
    steem.justyy.workers.dev@justyy
    api.justyy.com@justyy
    api.steemitdev.com@steemit
    api.steemit.com@steemit
    - -

    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 :
    +    
    +

    + + 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.steem.fans@ety001
    steem.61bts.com@ety001
    api.steemyy.com@justyy
    steem.justyy.workers.dev@justyy
    api.justyy.com@justyy
    api.steemitdev.com@steemit
    api.steemit.com@steemit
    + +

    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.

    +

    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:
    +
    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.

    +

    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    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.

    +

    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 \
    +        
    +
    docker run \
         -d -p 2001:2001 -p 8090:8090 --name steemd-default \
         steemit/steem
     
     docker logs -f steemd-default  # follow along
    -
    -
    docker run \
    +
    +
    +
    +
    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
    -
    - -
    - - +
    +
    + + + + - + - + \ No newline at end of file diff --git a/docs/quickstart/testnet.html b/docs/quickstart/testnet.html index 8542485e..e187c946 100644 --- a/docs/quickstart/testnet.html +++ b/docs/quickstart/testnet.html @@ -1,345 +1,361 @@ + - - - - - - - - - - - - - - - -Steem Testnet | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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
    +    
    +

    + + 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 \
    @@ -369,11 +385,13 @@ 

    Running a Testnet Node

    mkdir -p testnet-data cd testnet-data nano config.ini -
    +
    +
    -

    config.ini

    +

    config.ini

    -
    log-console-appender = {"appender":"stderr","stream":"std_error"}
    +        
    +
    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"}
    @@ -389,61 +407,68 @@ 

    config.ini

    # testnet.steemitdev.com p2p-seed-node = testnet.steemitdev.com:2001 -
    +
    +
    -

    Then execute:

    +

    Then execute:

    -
    steemd --data-dir=. --chain-id=46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32
    -
    +
    +
    steemd --data-dir=. --chain-id=46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32
    +
    +
    -

    Now let it sync, and you’ll have a shiny new testnet seed node to play with.

    +

    Now let it sync, and you’ll have a shiny new testnet seed node to play with.

    -

    Custom Testnet

    +

    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 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.

    +

    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.

    +

    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.

    +

    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.

    +

    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:

    +

    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:

    +

    void database::init_genesis( uint64_t init_supply ) inside try add this line:

    -

    set_hardfork( 19, true );

    +

    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.

    +

    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.

    +

    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.

    +

    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

    +

    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

    +

    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
    • -
    +
      +
    • ChainID: 79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673
    • +
    • Address prefix: STX
    • +
    • API node: https://testnet.steem.vc
    • +
    -
    - - + + + - + - + \ No newline at end of file diff --git a/docs/resources/client_libs.html b/docs/resources/client_libs.html index 58375bc0..e580b08b 100644 --- a/docs/resources/client_libs.html +++ b/docs/resources/client_libs.html @@ -1,373 +1,382 @@ + - - - - - - - - - - - - - - - -Client Libraries | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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

    - - -
    - - +
    +

    + + 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

    + + +
    + + - + - + \ No newline at end of file diff --git a/docs/resources/developeradvocate.html b/docs/resources/developeradvocate.html index d4816aeb..2eec353e 100644 --- a/docs/resources/developeradvocate.html +++ b/docs/resources/developeradvocate.html @@ -1,342 +1,347 @@ + - - - - - - - - - - - - - - - -Community & Help | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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.

    - - -
    - - +
    +

    + + 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.

    + + + +
    + + - + - + \ No newline at end of file diff --git a/docs/resources/index.html b/docs/resources/index.html index 24d5fabe..324fe8e9 100644 --- a/docs/resources/index.html +++ b/docs/resources/index.html @@ -1,534 +1,533 @@ + - - - - - - - - - - - - - - - -Resources | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Resources | Steem Developer + + + + + + + + + + + + + + -
    -

    - - Steem Developer logo -

    - - -
    - - -
    - - - - - - - - - - - -
    -
    -
    -

    Steem Developer Portal - Resources

    - - - -
    - - - - -
    -

    - +
    +

    + + 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.

    - -
    - -
    -

    - +

    + + +

    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.

    +

    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.

    +

    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

    +

    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.

    +

    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.

    +

    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

    +

    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

    +

    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

    +

    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.

    +

    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.

    +

    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.

    -

    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://steemscan.com

    -
    +
    -

    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.

    +

    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 SteemLogin API.

    -

    If you’re wondering what SteemConnect is, go here.

    +

    If you’re wondering what SteemLogin is, go here.

    -
    +
    -

    SteemConnect SDK - https://github.com/steemit/steemconnect-sdk

    +

    SteemLogin SDK - https://github.com/futureshockco/steemlogin.js

    -

    An official javascript library for utilizing SteemConnect.

    +

    An javascript library for utilizing SteemLogin.

    -
    +
    -

    steem-connect-firebase-function - https://jakipatryk.github.io/steemconnect-firebase-functions/

    +

    steem-login-firebase-function - https://jakipatryk.github.io/steemlogin-firebase-functions/

    -

    A TypeScript library that can help you build applications with SteemConnect and Firebase.

    +

    A TypeScript library that can help you build applications with SteemLogin and Firebase.

    -
    +
    -

    Sc2 SDK PHP - https://github.com/hernandev/sc2-sdk-php

    +

    Sc2 SDK PHP - https://github.com/hernandev/sc2-sdk-php

    -

    Easily integrate STEEM blockchain into your PHP applications, though SteemConnect.

    +

    Easily integrate STEEM blockchain into your PHP applications, though SteemLogin.

    -
    +
    -

    Social Auth SteemConnect - https://pypi.python.org/pypi/social-auth-steemconnect/0.0.2

    +

    Social Auth SteemLogin - https://pypi.python.org/pypi/social-auth-steemlogin/0.0.2

    -

    Pluggable authentication backend for python-social-auth, that allows authentication via SteemConnect (v2).

    +

    Pluggable authentication backend for python-social-auth, that allows authentication via SteemLogin (v2).

    -
    +
    -

    steemconnect-python-client - https://github.com/emre/steemconnect-python-client

    +

    steemlogin-python-client - https://github.com/emre/steemlogin-python-client

    -

    steemconnect-python-client is a simple yet powerful library to interact with the Steemconnect.

    +

    steemlogin-python-client is a simple yet powerful library to interact with the Steemlogin.

    -
    +
    -

    omniauth-steemconnect - https://rubygems.org/gems/omniauth-steemconnect/versions/0.1.0

    +

    omniauth-steemlogin - https://rubygems.org/gems/omniauth-steemlogin/versions/0.1.0

    -

    Ruby Omniauth2 Strategy for SteemConnect.

    +

    Ruby Omniauth2 Strategy for SteemLogin.

    -
    +
    -

    SwiftyConnect - https://github.com/caspernikus/SwiftyConnect

    +

    SwiftyConnect - https://github.com/caspernikus/SwiftyConnect

    -

    SteemConnect Library for iOS / Swift.

    +

    SteemLogin Library for iOS / Swift.

    -
    +
    -

    SteemConnect4j - https://github.com/hapramp/steemconnect4j

    +

    steemlogin4j - https://github.com/hapramp/steemlogin4j

    -

    Steemconnect SDK for Java.

    +

    Steemlogin SDK for Java.

    -
    - -
    -

    - +

    + +
    +

    + Community & Help -

    - + + -

    Developer Advocate

    +

    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.

    +

    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.

    +

    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.

    +

    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.

    +
    - - -
    - - + + + - + - + \ No newline at end of file diff --git a/docs/resources/overview.html b/docs/resources/overview.html index dc6d247a..83213a62 100644 --- a/docs/resources/overview.html +++ b/docs/resources/overview.html @@ -1,330 +1,339 @@ + - - - - - - - - - - - - - - - -Overview | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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.

    - -
    - - +
    +

    + + 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.

    + +
    + + - + - + \ No newline at end of file diff --git a/docs/resources/steem_connect_libs.html b/docs/resources/steem_connect_libs.html index 35f84d0f..f95fa5da 100644 --- a/docs/resources/steem_connect_libs.html +++ b/docs/resources/steem_connect_libs.html @@ -1,378 +1,388 @@ + - - - - - - - - - - - - - - - -SteemConnect Libs | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + SteemLogin 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.

    - -
    +
    +

    + + Steem Developer logo +

    + + +
    + + +
    + + + - - + + +
  • Network Broadcast Api
  • + + + +
  • Rc Api
  • + + + +
  • Tags Api
  • + + + +
  • Witness Api
  • + + + +
  • Block Api
  • + + + +
  • Debug Node Api
  • + + + +
  • Broadcast Ops
  • + + + + + + + + + + + + + +
    + + + + + + + + + +
    +
    +

    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 SteemLogin API.

    + +

    If you’re wondering what SteemLogin is, go here.

    + +
    + +

    SteemLogin SDK - https://github.com/futureshockco/steemlogin.js

    + +

    An javascript library for utilizing SteemLogin.

    + +
    + +

    steem-login-firebase-function - https://jakipatryk.github.io/steemlogin-firebase-functions/

    + +

    A TypeScript library that can help you build applications with SteemLogin and Firebase.

    + +
    + +

    Sc2 SDK PHP - https://github.com/hernandev/sc2-sdk-php

    + +

    Easily integrate STEEM blockchain into your PHP applications, though SteemLogin.

    + +
    + +

    Social Auth SteemLogin - https://pypi.python.org/pypi/social-auth-steemlogin/0.0.2

    + +

    Pluggable authentication backend for python-social-auth, that allows authentication via SteemLogin (v2).

    + +
    + +

    steemlogin-python-client - https://github.com/emre/steemlogin-python-client

    + +

    steemlogin-python-client is a simple yet powerful library to interact with the Steemlogin.

    + +
    + +

    omniauth-steemlogin - https://rubygems.org/gems/omniauth-steemlogin/versions/0.1.0

    + +

    Ruby Omniauth2 Strategy for SteemLogin.

    + +
    + +

    SwiftyConnect - https://github.com/caspernikus/SwiftyConnect

    + +

    SteemLogin Library for iOS / Swift.

    + +
    + +

    steemlogin4j - https://github.com/hapramp/steemlogin4j

    + +

    Steemlogin SDK for Java.

    + +
    + + - + - + \ No newline at end of file diff --git a/docs/resources/tools.html b/docs/resources/tools.html index 2071eef3..80e360a8 100644 --- a/docs/resources/tools.html +++ b/docs/resources/tools.html @@ -1,354 +1,357 @@ + - - - - - - - - - - - - - - - -Tools | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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

    - -
    - -
    - - +
    +

    + + 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.

    + +
    + +

    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://steemscan.com

    + +
    + +
    + + - + - + \ No newline at end of file diff --git a/docs/search/index.html b/docs/search/index.html index 2f9c1ad1..c31691f5 100644 --- a/docs/search/index.html +++ b/docs/search/index.html @@ -1,2617 +1,2607 @@ + - - - - - - - - - - - - - - - -Search | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Search | Steem Developer + + + + + + + + + + + + + + -
    -

    - - Steem Developer logo -

    - - -
    - - -
    - - - - - - - - - - - -
    -
    -
    -

    Steem Developer Portal

    - - - -
    -
    -

    Search Results

    - -

    Loading results

    -
      -
      - - - - - - - -
      - - - - +
      +

      + + Steem Developer logo +

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

      Steem Developer Portal

      + + + +
      +
      +

      Search Results

      + +

      Loading results

      +
        +
        + + + + + + , + + "apidefinitions-jsonrpc": { + "id": "apidefinitions-jsonrpc", + "title": "Jsonrpc", + "category": "apidefinitions", + "description": "", + "type": "", + "url": "/apidefinitions/jsonrpc", + "content": "Used to lookup information about the JSON RPC API. These AppBase API methods are still under development and subject to change.\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\njsonrpc.get_methods \nReturns a list of methods supported by the JSON RPC API.\nQuery Parameters JSON \n{}\n\nExpected Response JSON \n[]\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"jsonrpc.get_methods\", \"id\":1}' https://api.steemit.com\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\njsonrpc.get_signature \nReturns the signature information for a JSON RPC method including the arguments and expected response JSON.\nQuery Parameters JSON \n{\"method\": \"\"}\n\nExpected Response JSON \n{\"args\": null, \"ret\": null}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"jsonrpc.get_signature\", \"params\":{\"method\":\"jsonrpc.get_methods\"}, \"id\":1}' https://api.steemit.com\n\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"jsonrpc.get_signature\", \"params\":{\"method\":\"jsonrpc.get_signature\"}, \"id\":1}' https://api.steemit.com\n\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"jsonrpc.get_signature\", \"params\":{\"method\":\"condenser_api.get_dynamic_global_properties\"}, \"id\":1}' https://api.steemit.com\n\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"jsonrpc.get_signature\", \"params\":{\"method\":\"database_api.get_dynamic_global_properties\"}, \"id\":1}' https://api.steemit.com" + } + + + + + + + , + + "apidefinitions-market-history-api": { + "id": "apidefinitions-market-history-api", + "title": "Market History Api", + "category": "apidefinitions", + "description": "", + "type": "", + "url": "/apidefinitions/market-history-api", + "content": "Used to lookup market history information. These AppBase API methods are still under development and subject to change.\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nmarket_history_api.get_market_history \nReturns the market history for the internal SBD:STEEM market.\nQuery Parameters JSON \n{\n \"bucket_seconds\": 0,\n \"start\": \"1970-01-01T00:00:00\",\n \"end\": \"1970-01-01T00:00:00\"\n}\n\nExpected Response JSON \n{\"buckets\": []}\n\n\nExample curl \n\ncurl -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\n\n\ncurl -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\n\n\ncurl -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\n\n\ncurl -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\n\n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nmarket_history_api.get_market_history_buckets \nReturns the bucket seconds being tracked by the plugin.\nQuery Parameters JSON \n{}\n\nExpected Response JSON \n{\"bucket_sizes\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"market_history_api.get_market_history_buckets\", \"id\":1}' https://api.steemit.com\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nmarket_history_api.get_order_book \nReturns the internal market order book.\nQuery Parameters JSON \n{\"limit\": 500}\n\nExpected Response JSON \n{\"bids\": [], \"asks\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"market_history_api.get_order_book\", \"params\":{\"limit\":10}, \"id\":1}' https://api.steemit.com\n\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"market_history_api.get_order_book\", \"params\":{\"limit\":50}, \"id\":1}' https://api.steemit.com\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nmarket_history_api.get_recent_trades \nReturns the most recent trades for the internal SBD:STEEM market.\nQuery Parameters JSON \n{\"limit\": 1000}\n\nExpected Response JSON \n{\"trades\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"market_history_api.get_recent_trades\", \"params\":{\"limit\":10}, \"id\":1}' https://api.steemit.com\n\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"market_history_api.get_recent_trades\", \"params\":{\"limit\":500}, \"id\":1}' https://api.steemit.com\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nmarket_history_api.get_ticker \nReturns the market ticker for the internal SBD:STEEM market.\nQuery Parameters JSON \n{}\n\nExpected Response JSON \n{\n \"latest\": \"0.00000000000000000\",\n \"lowest_ask\": \"0.00000000000000000\",\n \"highest_bid\": \"0.00000000000000000\",\n \"percent_change\": \"0.00000000000000000\",\n \"steem_volume\": {\n \"amount\": \"0\",\n \"precision\": 3,\n \"nai\": \"@@000000021\"\n },\n \"sbd_volume\": {\n \"amount\": \"0\",\n \"precision\": 3,\n \"nai\": \"@@000000013\"\n }\n}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"market_history_api.get_ticker\", \"id\":1}' https://api.steemit.com\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nmarket_history_api.get_trade_history \nReturns the trade history for the internal SBD:STEEM market.\nQuery Parameters JSON \n{\n \"start\": \"1970-01-01T00:00:00\",\n \"end\": \"1970-01-01T00:00:00\",\n \"limit\": 1000\n}\n\nExpected Response JSON \n{\"trades\": []}\n\n\nExample curl \n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nmarket_history_api.get_volume \nReturns the market volume for the past 24 hours.\nQuery Parameters JSON \n{}\n\nExpected Response JSON \n{\n \"steem_volume\": {\n \"amount\": \"0\",\n \"precision\": 3,\n \"nai\": \"@@000000021\"\n },\n \"sbd_volume\": {\n \"amount\": \"0\",\n \"precision\": 3,\n \"nai\": \"@@000000013\"\n }\n}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"market_history_api.get_volume\", \"id\":1}' https://api.steemit.com" + } + + + + + + + , + + "apidefinitions-network-broadcast-api": { + "id": "apidefinitions-network-broadcast-api", + "title": "Network Broadcast Api", + "category": "apidefinitions", + "description": "", + "type": "", + "url": "/apidefinitions/network-broadcast-api", + "content": "Used to broadcast transactions and blocks. These AppBase API methods are\nstill under development and subject to change.\n\nAlso see: Blockchain Ops\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nnetwork_broadcast_api.broadcast_block \nUsed to broadcast a block.\nQuery Parameters JSON \n{\n \"block\": {\n \"previous\": \"0000000000000000000000000000000000000000\",\n \"timestamp\": \"1970-01-01T00:00:00\",\n \"witness\": \"\",\n \"transaction_merkle_root\": \"0000000000000000000000000000000000000000\",\n \"extensions\": [],\n \"witness_signature\": \"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n \"transactions\": []\n }\n}\n\nExpected Response JSON \n{}\n\n\nExample curl \n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nnetwork_broadcast_api.broadcast_transaction \nUsed to broadcast a transaction.\nQuery Parameters JSON \n{\n \"trx\": {\n \"ref_block_num\": 0,\n \"ref_block_prefix\": 0,\n \"expiration\": \"1970-01-01T00:00:00\",\n \"operations\": [],\n \"extensions\": [],\n \"signatures\": []\n },\n \"max_block_age\": -1\n}\n\nExpected Response JSON \n{}\n\n\nExample curl \n\ncurl -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\n\n\ncurl -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" + } + + + + + + + , + + "apidefinitions-rc-api": { + "id": "apidefinitions-rc-api", + "title": "Rc Api", + "category": "apidefinitions", + "description": "", + "type": "", + "url": "/apidefinitions/rc-api", + "content": "Allows querying of various Resource Credit metrics. See: RC Bandwidth System, 0.20.2 Release Notes, Developer Guide: Resource Credit System\n\n\n\nSince: HF20\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nrc_api.find_rc_accounts \nReturns the available resource credits of accounts. Parameters: accounts:string array\n\n\n \n \n accounts (string)\n  \n \n \n \n \n \"steemit\"\n Query the available resource credits for the account named “steemit”.\n \n \n \"alice\"\n Query the available resource credits for the accounts named “alice” and “bob”.\n \n \n\n\nQuery Parameters JSON \n{\"accounts\": []}\n\nExpected Response JSON \n{\n \"rc_accounts\": [\n {\n \"account\": \"\",\n \"rc_manabar\": {\"current_mana\": \"0\", \"last_update_time\": 0},\n \"max_rc_creation_adjustment\": {\n \"amount\": \"0\",\n \"precision\": 6,\n \"nai\": \"@@000000037\"\n },\n \"max_rc\": \"0\"\n }\n ]\n}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"rc_api.find_rc_accounts\", \"params\":{\"accounts\":[\"steemit\"]}, \"id\":1}' https://api.steemit.com\n\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"rc_api.find_rc_accounts\", \"params\":{\"accounts\":[\"alice\",\"bob\"]}, \"id\":1}' https://api.steemit.com\n\n\n\n\n\n\nSince: HF20\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nrc_api.get_resource_params \nWork in progress. See: #2980\n\nQuery Parameters JSON \n{}\n\nExpected Response JSON \n{\n \"resource_names\": [\n \"resource_history_bytes\",\n \"resource_new_accounts\",\n \"resource_market_bytes\",\n \"resource_state_bytes\",\n \"resource_execution_time\"\n ],\n \"resource_params\": {\n \"resource_history_bytes\": {\n \"resource_dynamics_params\": {\n \"resource_unit\": 1,\n \"budget_per_time_unit\": 347222,\n \"pool_eq\": \"216404314004\",\n \"max_pool_size\": \"432808628007\",\n \"decay_params\": {\n \"decay_per_time_unit\": 3613026481,\n \"decay_per_time_unit_denom_shift\": 51\n },\n \"min_decay\": 0\n },\n \"price_curve_params\": {\n \"coeff_a\": \"12981647055416481792\",\n \"coeff_b\": 1690658703,\n \"shift\": 49\n }\n },\n \"resource_new_accounts\": {\n \"resource_dynamics_params\": {\n \"resource_unit\": 10000,\n \"budget_per_time_unit\": 797,\n \"pool_eq\": 157691079,\n \"max_pool_size\": 157691079,\n \"decay_params\": {\n \"decay_per_time_unit\": 347321,\n \"decay_per_time_unit_denom_shift\": 36\n },\n \"min_decay\": 0\n },\n \"price_curve_params\": {\n \"coeff_a\": \"16484671763857882971\",\n \"coeff_b\": 1231961,\n \"shift\": 51\n }\n },\n \"resource_market_bytes\": {\n \"resource_dynamics_params\": {\n \"resource_unit\": 10,\n \"budget_per_time_unit\": 578704,\n \"pool_eq\": \"16030041350\",\n \"max_pool_size\": \"32060082699\",\n \"decay_params\": {\n \"decay_per_time_unit\": 2540365427,\n \"decay_per_time_unit_denom_shift\": 46\n },\n \"min_decay\": 0\n },\n \"price_curve_params\": {\n \"coeff_a\": \"9231393461629499392\",\n \"coeff_b\": 125234698,\n \"shift\": 53\n }\n },\n \"resource_state_bytes\": {\n \"resource_dynamics_params\": {\n \"resource_unit\": 1,\n \"budget_per_time_unit\": 231481481,\n \"pool_eq\": \"144269542669147\",\n \"max_pool_size\": \"288539085338293\",\n \"decay_params\": {\n \"decay_per_time_unit\": 3613026481,\n \"decay_per_time_unit_denom_shift\": 51\n },\n \"min_decay\": 0\n },\n \"price_curve_params\": {\n \"coeff_a\": \"12981647055416481792\",\n \"coeff_b\": \"1127105802103\",\n \"shift\": 49\n }\n },\n \"resource_execution_time\": {\n \"resource_dynamics_params\": {\n \"resource_unit\": 1,\n \"budget_per_time_unit\": 82191781,\n \"pool_eq\": \"51225569123068\",\n \"max_pool_size\": \"102451138246135\",\n \"decay_params\": {\n \"decay_per_time_unit\": 3613026481,\n \"decay_per_time_unit_denom_shift\": 51\n },\n \"min_decay\": 0\n },\n \"price_curve_params\": {\n \"coeff_a\": \"12981647055416481792\",\n \"coeff_b\": \"400199758774\",\n \"shift\": 49\n }\n }\n },\n \"size_info\": {\n \"resource_state_bytes\": {\n \"authority_base_size\": 40000,\n \"authority_account_member_size\": 180000,\n \"authority_key_member_size\": 350000,\n \"account_object_base_size\": 4800000,\n \"account_authority_object_base_size\": 400000,\n \"account_recovery_request_object_base_size\": 320000,\n \"comment_object_base_size\": 2010000,\n \"comment_object_permlink_char_size\": 10000,\n \"comment_object_parent_permlink_char_size\": 20000,\n \"comment_object_beneficiaries_member_size\": 180000,\n \"comment_vote_object_base_size\": 470000,\n \"convert_request_object_base_size\": 480000,\n \"decline_voting_rights_request_object_base_size\": 280000,\n \"escrow_object_base_size\": 1190000,\n \"limit_order_object_base_size\": 147440,\n \"savings_withdraw_object_byte_size\": 14656,\n \"transaction_object_base_size\": 6090,\n \"transaction_object_byte_size\": 174,\n \"vesting_delegation_object_base_size\": 600000,\n \"vesting_delegation_expiration_object_base_size\": 440000,\n \"withdraw_vesting_route_object_base_size\": 430000,\n \"witness_object_base_size\": 2660000,\n \"witness_object_url_char_size\": 10000,\n \"witness_vote_object_base_size\": 400000,\n \"STATE_BYTES_SCALE\": 10000\n },\n \"resource_execution_time\": {\n \"account_create_operation_exec_time\": 57700,\n \"account_create_with_delegation_operation_exec_time\": 57700,\n \"account_update_operation_exec_time\": 14000,\n \"account_witness_proxy_operation_exec_time\": 117000,\n \"account_witness_vote_operation_exec_time\": 23000,\n \"cancel_transfer_from_savings_operation_exec_time\": 11500,\n \"change_recovery_account_operation_exec_time\": 12000,\n \"claim_account_operation_exec_time\": 10000,\n \"claim_reward_balance_operation_exec_time\": 50300,\n \"comment_operation_exec_time\": 114100,\n \"comment_options_operation_exec_time\": 13200,\n \"convert_operation_exec_time\": 15700,\n \"create_claimed_account_operation_exec_time\": 57700,\n \"custom_operation_exec_time\": 228000,\n \"custom_json_operation_exec_time\": 228000,\n \"custom_binary_operation_exec_time\": 228000,\n \"decline_voting_rights_operation_exec_time\": 5300,\n \"delegate_vesting_shares_operation_exec_time\": 19900,\n \"delete_comment_operation_exec_time\": 51100,\n \"escrow_approve_operation_exec_time\": 9900,\n \"escrow_dispute_operation_exec_time\": 11500,\n \"escrow_release_operation_exec_time\": 17200,\n \"escrow_transfer_operation_exec_time\": 19100,\n \"feed_publish_operation_exec_time\": 6200,\n \"limit_order_cancel_operation_exec_time\": 9600,\n \"limit_order_create_operation_exec_time\": 31700,\n \"limit_order_create2_operation_exec_time\": 31700,\n \"request_account_recovery_operation_exec_time\": 54400,\n \"set_withdraw_vesting_route_operation_exec_time\": 17900,\n \"transfer_from_savings_operation_exec_time\": 17500,\n \"transfer_operation_exec_time\": 9600,\n \"transfer_to_savings_operation_exec_time\": 6400,\n \"transfer_to_vesting_operation_exec_time\": 44400,\n \"vote_operation_exec_time\": 26500,\n \"withdraw_vesting_operation_exec_time\": 10400,\n \"witness_set_properties_operation_exec_time\": 9500,\n \"witness_update_operation_exec_time\": 9500\n }\n }\n}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"rc_api.get_resource_params\", \"id\":1}' https://api.steemit.com\n\n\n\n\n\n\nSince: HF20\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nrc_api.get_resource_pool \nWork in progress. See: #2563, PR#2678\n\nQuery Parameters JSON \n{}\n\nExpected Response JSON \n{\n \"resource_pool\": {\n \"resource_history_bytes\": {\"pool\": \"200825644923\"},\n \"resource_new_accounts\": {\"pool\": 37393465},\n \"resource_market_bytes\": {\"pool\": \"15915722826\"},\n \"resource_state_bytes\": {\"pool\": \"132151641791507\"},\n \"resource_execution_time\": {\"pool\": \"47739958648192\"}\n }\n}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"rc_api.get_resource_pool\", \"id\":1}' https://api.steemit.com" + } + + + + + + + , + + "apidefinitions-tags-api": { + "id": "apidefinitions-tags-api", + "title": "Tags Api", + "category": "apidefinitions", + "description": "", + "type": "", + "url": "/apidefinitions/tags-api", + "content": "Used to lookup information about tags, posts, and discussions. These AppBase API methods are still under development and subject to change.\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_active_votes \nReturns all votes for the given post.\nQuery Parameters JSON \n{\"author\": \"\", \"permlink\": \"\"}\n\nExpected Response JSON \n{\"votes\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_active_votes\", \"params\":{\"author\":\"steemit\", \"permlink\":\"firstpost\"}, \"id\":1}' https://api.steemit.com\n\n\ncurl -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\n\n\n\n\n\n\nSince: HF17\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_comment_discussions_by_payout \nReturns a list of discussions based on payout.\nQuery Parameters JSON \n{\n \"tag\": \"\",\n \"limit\": 0,\n \"filter_tags\": [],\n \"select_authors\": [],\n \"select_tags\": [],\n \"truncate_body\": 0\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_comment_discussions_by_payout\", \"params\":{\"tag\":\"steem\",\"limit\":1}, \"id\":1}' https://api.steemit.com\n\n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_content_replies \nReturns a list of replies.\nQuery Parameters JSON \n{\"author\": \"\", \"permlink\": \"\"}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_content_replies\", \"params\":{\"author\":\"steemit\", \"permlink\":\"firstpost\"}, \"id\":1}' https://api.steemit.com\n\n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_discussion \nReturns the discussion given an author and permlink.\nQuery Parameters JSON \n{\"author\": \"\", \"permlink\": \"\"}\n\nExpected Response JSON \n{\n \"id\": 0,\n \"author\": \"\",\n \"permlink\": \"\",\n \"category\": \"\",\n \"parent_author\": \"\",\n \"parent_permlink\": \"\",\n \"title\": \"\",\n \"body\": \"\",\n \"json_metadata\": \"\",\n \"last_update\": \"1970-01-01T00:00:00\",\n \"created\": \"1970-01-01T00:00:00\",\n \"active\": \"1970-01-01T00:00:00\",\n \"last_payout\": \"1970-01-01T00:00:00\",\n \"depth\": 0,\n \"children\": 0,\n \"net_rshares\": 0,\n \"abs_rshares\": 0,\n \"vote_rshares\": 0,\n \"children_abs_rshares\": 0,\n \"cashout_time\": \"1970-01-01T00:00:00\",\n \"max_cashout_time\": \"1970-01-01T00:00:00\",\n \"total_vote_weight\": 0,\n \"reward_weight\": 0,\n \"total_payout_value\": {\n \"amount\": \"0\",\n \"precision\": 3,\n \"nai\": \"@@000000021\"\n },\n \"curator_payout_value\": {\n \"amount\": \"0\",\n \"precision\": 3,\n \"nai\": \"@@000000021\"\n },\n \"author_rewards\": 0,\n \"net_votes\": 0,\n \"root_author\": \"\",\n \"root_permlink\": \"\",\n \"max_accepted_payout\": {\n \"amount\": \"0\",\n \"precision\": 3,\n \"nai\": \"@@000000021\"\n },\n \"percent_steem_dollars\": 0,\n \"allow_replies\": false,\n \"allow_votes\": false,\n \"allow_curation_rewards\": false,\n \"beneficiaries\": [],\n \"url\": \"\",\n \"root_title\": \"\",\n \"pending_payout_value\": {\n \"amount\": \"0\",\n \"precision\": 3,\n \"nai\": \"@@000000021\"\n },\n \"total_pending_payout_value\": {\n \"amount\": \"0\",\n \"precision\": 3,\n \"nai\": \"@@000000021\"\n },\n \"active_votes\": [],\n \"replies\": [],\n \"author_reputation\": 0,\n \"promoted\": {\n \"amount\": \"0\",\n \"precision\": 3,\n \"nai\": \"@@000000013\"\n },\n \"body_length\": 0,\n \"reblogged_by\": []\n}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_discussion\", \"params\":{\"author\":\"steemit\", \"permlink\":\"firstpost\"}, \"id\":1}' https://api.steemit.com\n\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_discussion\", \"params\":{\"author\":\"alice\", \"permlink\":\"a-post-by-alice\"}, \"id\":1}' https://api.steemit.com\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_discussions_by_active \nReturns a list of discussions based on active.\nQuery Parameters JSON \n{\n \"tag\": \"\",\n \"limit\": 0,\n \"filter_tags\": [],\n \"select_authors\": [],\n \"select_tags\": [],\n \"truncate_body\": 0\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_discussions_by_active\", \"params\":{\"tag\":\"steem\",\"limit\":1}, \"id\":1}' https://api.steemit.com\n\n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_discussions_by_author_before_date \nReturns a list of discussions based on author before date.\nQuery Parameters JSON \n{\n \"author\": \"\",\n \"start_permlink\": \"\",\n \"before_date\": \"1970-01-01T00:00:00\",\n \"limit\": 100\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_discussions_by_blog \nReturns a list of discussions by blog.\nQuery Parameters JSON \n{\n \"tag\": \"\",\n \"limit\": 0,\n \"filter_tags\": [],\n \"select_authors\": [],\n \"select_tags\": [],\n \"truncate_body\": 0\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_discussions_by_blog\", \"params\":{\"tag\":\"steemit\",\"limit\":1}, \"id\":1}' https://api.steemit.com\n\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_discussions_by_blog\", \"params\":{\"tag\":\"alice\",\"limit\":10}, \"id\":1}' https://api.steemit.com\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_discussions_by_cashout \nReturns a list of discussions by cashout.\nQuery Parameters JSON \n{\n \"tag\": \"\",\n \"limit\": 0,\n \"filter_tags\": [],\n \"select_authors\": [],\n \"select_tags\": [],\n \"truncate_body\": 0\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_discussions_by_cashout\", \"params\":{\"tag\":\"steem\",\"limit\":1}, \"id\":1}' https://api.steemit.com\n\n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_discussions_by_children \nReturns a list of discussions by children.\nQuery Parameters JSON \n{\n \"tag\": \"\",\n \"limit\": 0,\n \"filter_tags\": [],\n \"select_authors\": [],\n \"select_tags\": [],\n \"truncate_body\": 0\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_discussions_by_children\", \"params\":{\"tag\":\"steem\",\"limit\":1}, \"id\":1}' https://api.steemit.com\n\n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_discussions_by_comments \nReturns a list of discussions by comments.\nQuery Parameters JSON \n{\n \"tag\": \"\",\n \"limit\": 0,\n \"filter_tags\": [],\n \"select_authors\": [],\n \"select_tags\": [],\n \"truncate_body\": 0\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -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\n\n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_discussions_by_created \nReturns a list of discussions by created.\nQuery Parameters JSON \n{\n \"tag\": \"\",\n \"limit\": 0,\n \"filter_tags\": [],\n \"select_authors\": [],\n \"select_tags\": [],\n \"truncate_body\": 0\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_discussions_by_created\", \"params\":{\"tag\":\"steem\",\"limit\":1}, \"id\":1}' https://api.steemit.com\n\n\ncurl -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\n\n\n\n\n\n\nSince: HF14\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_discussions_by_feed \nReturns a list of discussions by feed.\nQuery Parameters JSON \n{\n \"tag\": \"\",\n \"limit\": 0,\n \"filter_tags\": [],\n \"select_authors\": [],\n \"select_tags\": [],\n \"truncate_body\": 0\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_discussions_by_feed\", \"params\":{\"tag\":\"steem\",\"limit\":1}, \"id\":1}' https://api.steemit.com\n\n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_discussions_by_hot \nReturns a list of discussions by hot.\nQuery Parameters JSON \n{\n \"tag\": \"\",\n \"limit\": 0,\n \"filter_tags\": [],\n \"select_authors\": [],\n \"select_tags\": [],\n \"truncate_body\": 0\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_discussions_by_hot\", \"params\":{\"tag\":\"steem\",\"limit\":1}, \"id\":1}' https://api.steemit.com\n\n\ncurl -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\n\n\n\n\n\n\nSince: HF13\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_discussions_by_promoted \nReturns a list of discussions by promoted.\nQuery Parameters JSON \n{\n \"tag\": \"\",\n \"limit\": 0,\n \"filter_tags\": [],\n \"select_authors\": [],\n \"select_tags\": [],\n \"truncate_body\": 0\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_discussions_by_promoted\", \"params\":{\"tag\":\"steem\",\"limit\":1}, \"id\":1}' https://api.steemit.com\n\n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_discussions_by_trending \nReturns a list of discussions by trending.\nQuery Parameters JSON \n{\n \"tag\": \"\",\n \"limit\": 0,\n \"filter_tags\": [],\n \"select_authors\": [],\n \"select_tags\": [],\n \"truncate_body\": 0\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_discussions_by_trending\", \"params\":{\"tag\":\"steem\",\"limit\":1}, \"id\":1}' https://api.steemit.com\n\n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_discussions_by_votes \nReturns a list of discussions by votes.\nQuery Parameters JSON \n{\n \"tag\": \"\",\n \"limit\": 0,\n \"filter_tags\": [],\n \"select_authors\": [],\n \"select_tags\": [],\n \"truncate_body\": 0\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_discussions_by_votes\", \"params\":{\"tag\":\"steem\",\"limit\":1}, \"id\":1}' https://api.steemit.com\n\n\ncurl -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\n\n\n\n\n\n\nSince: HF17\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_post_discussions_by_payout \nReturns a list of post discussions by payout.\nQuery Parameters JSON \n{\n \"tag\": \"\",\n \"limit\": 0,\n \"filter_tags\": [],\n \"select_authors\": [],\n \"select_tags\": [],\n \"truncate_body\": 0\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_post_discussions_by_payout\", \"params\":{\"tag\":\"steem\",\"limit\":1}, \"id\":1}' https://api.steemit.com\n\n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_replies_by_last_update \nReturns a list of replies by last update.\nQuery Parameters JSON \n{\n \"start_parent_author\": \"\",\n \"start_permlink\": \"\",\n \"limit\": 100\n}\n\nExpected Response JSON \n{\"discussions\": []}\n\n\nExample curl \n\ncurl -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\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_tags_used_by_author \nReturns a list of tags used by an author.\nQuery Parameters JSON \n{\"author\": \"\"}\n\nExpected Response JSON \n{\"tags\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_tags_used_by_author\", \"params\":{\"author\":\"steemit\"}, \"id\":1}' https://api.steemit.com\n\n\n\n\n\n\n\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\ntags_api.get_trending_tags \nReturns the list of trending tags.\nQuery Parameters JSON \n{\"start_tag\": \"\", \"limit\": 100}\n\nExpected Response JSON \n{\"tags\": []}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_trending_tags\", \"params\":{\"start_tag\":null,\"limit\":100}, \"id\":1}' https://api.steemit.com\n\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"tags_api.get_trending_tags\", \"params\":{\"start_tag\":\"steem\",\"limit\":10}, \"id\":1}' https://api.steemit.com" + } + + + + + + + , + + "apidefinitions-witness-api": { + "id": "apidefinitions-witness-api", + "title": "Witness Api", + "category": "apidefinitions", + "description": "", + "type": "", + "url": "/apidefinitions/witness-api", + "content": "API removed in 0.20.6, see: #3029\n\n\n\n\n\nDisabled\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nwitness_api.get_account_bandwidth \nDisabled since 0.20.6, see: #3029\n\nReturns the available bandwidth of an account. See: Forum/Market Bandwidth\n\nQuery Parameters JSON \n{\"account\": \"\", \"type\": \"post\"}\n\nExpected Response JSON \n{}\n\n\n\n\n\n\n\n\nDisabled\n\n\n\nWorking on mainnet\n\n\n\nWorking on testnet\n\n\n\nwitness_api.get_reserve_ratio \nDisabled since 0.20.6, see: #3029\n\nReturns the current reserve ratio.\n\nQuery Parameters JSON \n{}\n\nExpected Response JSON \n{\n \"id\": 0,\n \"average_block_size\": 0,\n \"current_reserve_ratio\": 1,\n \"max_virtual_bandwidth\": \"0\"\n}\n\n\nExample curl \n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"witness_api.get_account_bandwidth\", \"params\":{\"account\":\"steemit\",\"type\":\"forum\"}, \"id\":1}' https://api.steemit.com\n\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"witness_api.get_account_bandwidth\", \"params\":{\"account\":\"alice\",\"type\":\"market\"}, \"id\":1}' https://api.steemit.com" + } + + + + + + + + + + + , + + "glossary-api": { + "id": "glossary-api", + "title": "API", + "category": "glossary", + "description": "Dictionary of API Terms", + "type": "", + "url": "/glossary/api", + "content": "" + } + + + + + + + , + + "glossary-chain-basics": { + "id": "glossary-chain-basics", + "title": "Chain Basics", + "category": "glossary", + "description": "Dictionary of Chain Basic Terms", + "type": "", + "url": "/glossary/chain_basics", + "content": "TermDefinition\n\t\n\n\t\n\t\tBlockchainDecentralized ledger and consensus protocol\n\t\n\n\t\n\t\tSteemName of the blockchain and platform" + } + + + + + + + , + + "glossary-governance": { + "id": "glossary-governance", + "title": "Governance", + "category": "glossary", + "description": "Dictionary of Governance Terms", + "type": "", + "url": "/glossary/governance", + "content": "" + } + + + + + + + , + + "glossary-index": { + "id": "glossary-index", + "title": "Index", + "category": "glossary", + "description": "", + "type": "", + "url": "/glossary/index", + "content": "Chain Basics\n\t\t\t \t\n\t\t\t \t\t\n\t\t\t\t\t \tBlockchain\n\t\t\t\t\t Decentralized ledger and consensus protocol\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tSteem\n\t\t\t\t\t Name of the blockchain and platform\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tBandwidth\n\t\t\t\t\t formerly the limit of data each account can send/use (replaced by Resource Credits)\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tResource Credits\n\t\t\t\t\t is the limit of data each account can utilize resources on the blockchain (also known as RC)\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tVESTS\n\t\t\t\t\t Vests is underlying token that STEEM is derived from, and are share in Steem Power\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tSTEEM\n\t\t\t\t\t Currency of the blockchain, liquid version of Steem Power\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tSBD\n\t\t\t\t\t Steem Backed Dollar, $1 worth of STEEM\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tSteem Power\n\t\t\t\t\t Locked version of STEEM which gives account influence on the platform\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tTransaction\n\t\t\t\t\t Operations/Activity/Write requests to the blockchain\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tBlock\n\t\t\t\t\t Bundle of transactions to be included in blockchain\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tBlock Header\n\t\t\t\t\t Information about block, root and witness who signed, etc.\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tPrice feed\n\t\t\t\t\t Feed that is maintained by witnesses to ensure SBD/STEEM price stability\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tAccount\n\t\t\t\t\t User account on Steem blockchain\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tAuthority\n\t\t\t\t\t Each Account has multiple authority and keys to manager different permissions on the platform\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tOwner\n\t\t\t\t\t Owner authority/permission of account\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tPublic Key\n\t\t\t\t\t Public key of account's certain authority\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tPrivate Key\n\t\t\t\t\t Private key to sign a transaction with account's authority, should be kept secret because it grants access to account\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tWif\n\t\t\t\t\t Wallet Import Format/Private key, should be kept secret because it grants access to account\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tActive key\n\t\t\t\t\t The active key is used to make transfers and place orders in the internal market\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tPosting key\n\t\t\t\t\t The posting key is used for posting and voting\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tOwner key\n\t\t\t\t\t The owner key is the master key for the account and is required to change the other keys\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tVote\n\t\t\t\t\t Voting a content\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tReputation\n\t\t\t\t\t Account's reputation on platform\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tMarkdown language\n\t\t\t\t\t Easy to read and write, plain text format language commonly used to create Steemit articles\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tPermlink\n\t\t\t\t\t Unique identifier of every comment or post of an author, within the context of that author. ('@author/permlink' combos are globally unique)\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tMainnet\n\t\t\t\t\t The 'production' Steem blockchain network wherein real STEEM is held and actual transactions take place.\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tDelegation\n\t\t\t\t\t The assignment of a portion your Steem Power for use to another account (cannot be spent, can be reclaimed)\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tPowerUp\n\t\t\t\t\t Convert STEEM to Steem Power and vice-versa with PowerDown\n\t\t\t\t \n\t\t\t \n\t\t\t\t\n\t\t\t\n\t\t\t \tGovernance\n\t\t\t \t\n\t\t\t \t\t\n\t\t\t\t\t \tDPOS\n\t\t\t\t\t Delegated Proof of Stake\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tNode\n\t\t\t\t\t Servers running blockchain software\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tWitness\n\t\t\t\t\t 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\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tHardfork\n\t\t\t\t\t Process to release protocol/blockchain consensus upgrades\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tSoftfork\n\t\t\t\t\t Process to release protocol/blockchain software improvements\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tWitness Vote\n\t\t\t\t\t Voting/electing witnesses with account's stake\n\t\t\t\t \n\t\t\t \n\t\t\t\t\n\t\t\t\n\t\t\t \tTransactions\n\t\t\t \t\n\t\t\t \t\t\n\t\t\t\t\t \tTransaction\n\t\t\t\t\t Operations submitted to the blockchain\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tPending Transaction\n\t\t\t\t\t Transaction that is pending and to be included to the blockchain\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tTransaction Hex\n\t\t\t\t\t Hash of the transaction\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tSignatures\n\t\t\t\t\t Transaction signature signed by account with private key\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tBroadcast Transaction\n\t\t\t\t\t Event where signed transaction is broadcasted to the network, so that witnesses could validate and include in block\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tVirtual operation\n\t\t\t\t\t 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\n\t\t\t\t \n\t\t\t \n\t\t\t\t\n\t\t\t\n\t\t\t \tAPI\n\t\t\t \t\n\t\t\t \t\t\n\t\t\t\t\t \tTrending\n\t\t\t\t\t Posts/Discussions that are highly valued by community with bigger time interval update\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tHot\n\t\t\t\t\t Posts/Disccussions that are highly valued with shorter time interval update\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tFeed\n\t\t\t\t\t Posts/Disccussions from followers of particular account\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tActive\n\t\t\t\t\t Posts/Disscussions that are still actively being engaged\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tNew\n\t\t\t\t\t Newly created posts\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tCashout\n\t\t\t\t\t Posts which was paid out recently\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tPromoted\n\t\t\t\t\t Posts which was promoted by burning SBD to get more visibility\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tPending Payout\n\t\t\t\t\t Estimated pending payout for blog posts/comments\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tTags\n\t\t\t\t\t Tags, categories, hashtags each post is assigned to.\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tTrending Tags\n\t\t\t\t\t Mostly used tags\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tFollowing\n\t\t\t\t\t Account that is being followed\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tFollower\n\t\t\t\t\t Account that is following the user\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tState\n\t\t\t\t\t State of blockchain for path - accounts/tags/filters/posts\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tDynamic Global Properties\n\t\t\t\t\t Current blockchain global properties which is being in each block\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tMedian Price\n\t\t\t\t\t Median Price feed provided by all witnesses\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tCurator\n\t\t\t\t\t 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\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tCuration reward\n\t\t\t\t\t The reward given to a curator, which is their portion of the 50% allocated to all curators that have upvoted a post\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tResteem\n\t\t\t\t\t (Reblog) re-posting another authors' post in your blog feed for your followers list\n\t\t\t\t \n\t\t\t \n\t\t\t\t\n\t\t\t\n\t\t\t \tMarket\n\t\t\t \t\n\t\t\t \t\t\n\t\t\t\t\t \tConversion Requests\n\t\t\t\t\t Request submitted for Converting SBD to STEEM\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tOrder Book\n\t\t\t\t\t Internal market order book to exchange SBDSTEEM\n\t\t\t\t \n\t\t\t \n\t\t\t \t\t\n\t\t\t\t\t \tSMT\n\t\t\t\t\t Smart Media Tokens" + } + + + + + + + , + + "glossary-market": { + "id": "glossary-market", + "title": "Market", + "category": "glossary", + "description": "Dictionary of Market Terms", + "type": "", + "url": "/glossary/market", + "content": "" + } + + + + + + + , + + "glossary-transactions": { + "id": "glossary-transactions", + "title": "Transactions", + "category": "glossary", + "description": "Dictionary of Transaction Terms", + "type": "", + "url": "/glossary/transactions", + "content": "" + } + + + + + + + + + , + + "introduction-welcome": { + "id": "introduction-welcome", + "title": "Welcome to Steem", + "category": "introduction", + "description": "", + "type": "", + "url": "/introduction/welcome", + "content": "Welcome to the Steem Developer Portal!\n\nThis site is designed to aid those interested in developing applications on the Steem blockchain.\n\nIf you don’t know about Steem yet, visit steem.com.\n\nThe code for this site is on github. If you’d like to see a specific improvement \nyou can either submit a pull request or file an issue. Please follow our \ncontribution guidelines\n\nSite Resources\n\nThe quickstart section has some general information on working with nodes, and testnets.\n\nOur tutorials section will take you through the basics of interacting with Steem apis in Javascript, Python, and Ruby.\n\nMore detailed API specs are available in the APPBASE API section. Those apis are under development, so please read \nnotes at the top of each section.\n\nYou can find community resources, libraries, and more ‘human’ ways to get help and education in the communities section.\n\nThe glossary has Steem specific terms that will help you understand documentation, whitepapers, and the speech of other steemians." + } + + + + + + + + + + + + + , + + "quickstart-choose-library": { + "id": "quickstart-choose-library", + "title": "Choose Library", + "category": "quickstart", + "description": "", + "type": "", + "url": "/quickstart/choose_library", + "content": "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.\n\nBuilding 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." + } + + + + + + + , + + "quickstart-steemd-nodes": { + "id": "quickstart-steemd-nodes", + "title": "steemd Nodes", + "category": "quickstart", + "description": "", + "type": "", + "url": "/quickstart/steemd_nodes", + "content": "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.\n\nPublic Nodes\n\n\n \n \n URL\n Owner\n \n \n \n \n api.steemit.com\n @steemit\n \n \n api.steemitdev.com\n @steemit\n \n \n api.steemitstage.com\n @steemit\n \n \n api.steem.house\n @gtg\n \n \n appbasetest.timcliff.com\n @timcliff\n \n \n gtg.steem.house:8090\n @gtg\n \n \n rpc.curiesteem.com\n @curie\n \n \n rpc.steemliberator.com\n @netuoso\n \n \n rpc.steemviz.com\n @ausbitbank\n \n \n steemd.minnowsupportproject.org\n @followbtcnews\n \n \n steemd.privex.io\n @privex\n \n \n\n\nPrivate Nodes\n\nThe simplest way to get started is by deploying a pre-built dockerized container.\n\nDockerized p2p Node\n\nTo run a p2p node (ca. 2GB of memory is required at the moment):\n\nDockerized Full Node\n\nto run a node with all the data (e.g. for supporting a content website) that uses ca. 14GB of memory and growing:\n\nSyncing blockchain\n\nNormally 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.\n\nTrusted 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.\n\nBoth 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.\n\nBlock 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.\n\nReplay helps to sync blockchain in much faster rate, but as blockchain grows in size replay might also take some time to verify blocks.\n\nThere is another trick which might help with faster sync/replay on smaller equipped servers:\n\nwhile :\ndo\n dd if=blockchain/block_log iflag=nocache count=0\n sleep 60\ndone\n\n\nAbove 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.\n\nFew other tricks that might help:\n\nFor 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.\n\necho 75 | sudo tee /proc/sys/vm/dirty_background_ratio\necho 1000 | sudo tee /proc/sys/vm/dirty_expire_centisecs\necho 80 | sudo tee /proc/sys/vm/dirty_ratio\necho 30000 | sudo tee /proc/sys/vm/dirty_writeback_centisecs\n\n\nAnother 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.\n\ndocker run \\\n -d -p 2001:2001 -p 8090:8090 --name steemd-default \\\n steemit/steem\n\ndocker logs -f steemd-default # follow along\n\ndocker run \\\n --env USE_WAY_TOO_MUCH_RAM=1 \\\n -d -p 2001:2001 -p 8090:8090 --name steemd-full \\\n steemit/steem\n\ndocker logs -f steemd-full" + } + + + + + + + , + + "quickstart-testnet": { + "id": "quickstart-testnet", + "title": "Steem Testnet", + "category": "quickstart", + "description": "", + "type": "", + "url": "/quickstart/testnet", + "content": "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.\n\nSteemit’s Testnet\n\nSteemit 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!\n\nFeatures\n\nThe 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.\n\nThe 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.\n\nAt the time of this writing, the connection information for Steemit’s testnet is as follows:\n\n\n ChainID: 46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32\n Address prefix: TST\n API node: https://testnet.steemitdev.com\n\n\nRunning a Testnet Node\n\nFirst, let’s build steemd specifically for testnet. Recommended specs:\n\n\n Ubuntu Server 16.04 LTS\n 100GB HDD\n 16GB RAM (mostly needed for steemd build)\n\n\nsudo apt-get update && sudo apt-get dist-upgrade\nsudo reboot\n\nsudo apt-get install autoconf automake autotools-dev bsdmainutils build-essential cmake doxygen \\\n git libboost-all-dev libreadline-dev libssl-dev libtool ncurses-dev pbzip2 pkg-config \\\n python3-dev python3-jinja2 python3-pip libbz2-dev libsnappy-dev\\\n wget curl screen pv virtualenv nano xz-utils\nmkdir -p src\ncd src\ngit clone https://github.com/steemit/steem\ncd steem\ngit checkout <20180824-testnet OR develop OR a more current branch>\ngit submodule update --init --recursive\nmkdir -p build\ncd build\ncmake \\\n -DCMAKE_BUILD_TYPE=Release \\\n -DBUILD_STEEM_TESTNET=ON \\\n -DENABLE_SMT_SUPPORT=ON \\\n -DLOW_MEMORY_NODE=ON \\\n -DCHAINBASE_CHECK_LOCKING=ON \\\n -DCLEAR_VOTES=ON \\\n -DSKIP_BY_TX_ID=ON \\\n -DSTEEM_LINT_LEVEL=OFF \\\n ..\nmake -j$(nproc) install\ncd\nmkdir -p testnet-data\ncd testnet-data\nnano config.ini\n\n\nconfig.ini\n\nlog-console-appender = {\"appender\":\"stderr\",\"stream\":\"std_error\"}\nlog-file-appender = {\"appender\":\"p2p\",\"file\":\"logs/p2p/p2p.log\"}\nlog-logger = {\"name\":\"default\",\"level\":\"info\",\"appender\":\"stderr\"}\nlog-logger = {\"name\":\"p2p\",\"level\":\"warn\",\"appender\":\"p2p\"}\n\nbacktrace = yes\nplugin = chain p2p webserver witness database_api network_broadcast_api block_api \n\nshared-file-dir = \"blockchain\"\nshared-file-size = 12G\np2p-endpoint = 0.0.0.0:2001\nwebserver-http-endpoint = 0.0.0.0:8751\nwebserver-ws-endpoint = 0.0.0.0:8752\n\n# testnet.steemitdev.com\np2p-seed-node = testnet.steemitdev.com:2001\n\n\nThen execute:\n\nsteemd --data-dir=. --chain-id=46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32\n\n\nNow let it sync, and you’ll have a shiny new testnet seed node to play with.\n\nCustom Testnet\n\nIn order to create a custom, isolated, testnet separate from the Steemit’s we need to modify a few things mentioned in the previous section.\n\nIn 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.\n\nLet’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.\n\nA 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.\n\nOne 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.\n\nAnother 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:\n\nvoid database::init_genesis( uint64_t init_supply ) inside try add this line:\n\nset_hardfork( 19, true );\n\nThis would mean that 19 hardforks have been accepted by witnesses and the new chain will start with all previous forks included.\n\nAfter 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.\n\nIf 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.\n\nCustom live testnet\n\nAn example of a custom testnet run by Steem community member @almost-digital. It doesn’t have a snapshot of the main network\n\n\n ChainID: 79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673\n Address prefix: STX\n API node: https://testnet.steem.vc" + } + + + + + + + + + , + + "resources-client-libs": { + "id": "resources-client-libs", + "title": "Client Libraries", + "category": "resources", + "description": "", + "type": "", + "url": "/resources/client_libs", + "content": "Radiator - https://github.com/inertia186/radiator\n\nRadiator is a Ruby API client to interact with the steem blockchain.\n\n\n\nSteem-JS - https://github.com/steemit/steem-js\n\nPure JavaScript Steem crypto library for node.js and browsers. Can be used to construct, sign and broadcast transactions in JavaScript.\n\n\n\nDSteem - https://github.com/jnordberg/dsteem\n\nA Typescript Steem crypto library for node.js and browsers. Steemit Inc also maintains a version of this library\n\n\n\nBeem - https://github.com/holgern/beem\n\nA python library to interact with the STEEM blockchain. It includes the CLI tool beempy.\n\n\n\nPHP Steem - https://github.com/lukestokes/php-steem-tools\n\nVarious tools and scripts written in PHP for exploring the STEEM blockchain.\n\n\n\nSteemJ - https://github.com/marvin-we/steem-java-api-wrapper\n\nAn API Wrapper for Steem written in Java\n\n\n\nGoSteem - https://github.com/go-steem/rpc\n\nGolang RPC client library for Steem\n\n\n\nSteemClientRS - https://github.com/cyberpunk-ventures/steem-client-rs\n\nClient library for Steem blockchain built with Rust" + } + + + + + + + , + + "resources-developeradvocate": { + "id": "resources-developeradvocate", + "title": "Community & Help", + "category": "resources", + "description": "", + "type": "", + "url": "/resources/developeradvocate", + "content": "Developer Advocate\n\nThe 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.\n\nSteemit’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.\n\nThe D.A. receives a lot of emails, but will respond as quickly as possible." + } + + + + + + + , + + "resources-overview": { + "id": "resources-overview", + "title": "Overview", + "category": "resources", + "description": "", + "type": "", + "url": "/resources/overview", + "content": "Steem has an active developer community that is constantly innovating on the blockchain. \nWhile the their presence on this page doesn’t constitute endorsement, \nit’s likely a few of these projects could be beneficial for your Steem idea." + } + + + + + + + , + + "resources-steem-login-libs": { + "id": "resources-steem-login-libs", + "title": "SteemLogin Libs", + "category": "resources", + "description": "", + "type": "", + "url": "/resources/steem_login_libs", + "content": "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 SteemLogin API.\n\nIf you’re wondering what SteemLogin is, go here.\n\n\n\nsteemlogin SDK - https://github.com/futureshockco/steemlogin.js\n\nAn javascript library for utilizing SteemLogin.\n\n\n\nsteem-login-firebase-function - https://jakipatryk.github.io/steemlogin-firebase-functions/\n\nA TypeScript library that can help you build applications with SteemLogin and Firebase.\n\n\n\nSc2 SDK PHP - https://github.com/hernandev/sc2-sdk-php\n\nEasily integrate STEEM blockchain into your PHP applications, though SteemLogin.\n\n\n\nSocial Auth SteemLogin - https://pypi.python.org/pypi/social-auth-steemlogin/0.0.2\n\nPluggable authentication backend for python-social-auth, that allows authentication via SteemLogin (v2).\n\n\n\nsteemlogin-python-client - https://github.com/emre/steemlogin-python-client\n\nsteemlogin-python-client is a simple yet powerful library to interact with the Steemlogin.\n\n\n\nomniauth-steemlogin - https://rubygems.org/gems/omniauth-steemlogin/versions/0.1.0\n\nRuby Omniauth2 Strategy for SteemLogin.\n\n\n\nSwiftyConnect - https://github.com/caspernikus/SwiftyConnect\n\nsteemlogin Library for iOS / Swift.\n\n\n\nsteemlogin4j - https://github.com/hapramp/steemlogin4j\n\nsteemlogin SDK for Java." + } + + + + + + + , + + "services-imagehoster": { + "id": "services-imagehoster", + "title": "ImageHoster", + "category": "services", + "description": "", + "type": "", + "url": "/services/imageHoster", + "content": "Definition\n\nImagehoster 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.\n\nThe 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.\n\nUsing 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.\n\nThe 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.\n\nDetaied information on Imagehoster can be found in its repository\n\nThe API\n\nBelow are examples of how to process images with the API\n\n\n Upload an image\n Fetch an uploaded image\n Proxy and resize an image\n Get user avatar image\n Signing uploads\n How to run\n\n\n1. Upload an image \n\nPOST /<username>/<signature>\n\nThis returns a JSON object container the URL to the uploaded image, ex:\n\n{\n \"url\": \"https://images.example.com/DQmZi174Xz96UrRVBMNRHb6A2FfU3z1HRPwPPQCgSMgdiUT/test.jpg\"\n}\n\n\nFor this to succeed it requires a signature from a Steem account in good standing.\n\n2. Fetch an uploaded image \n\nGET /<image_hash>/<filename>\n\nThis downloads a previously uploaded image.\n\n<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)\n\n3. Proxy and resize an image \n\nGET /<width>x<hight>/<image_url>\n\nThis 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.\n\n<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.\n\n4. Get user avatar image \n\nGET /u/<username>/avatar/<size>\n\nThis presents the avatar for username. If no avatar is set, a default image will be served. This default is set in the service config.\n\nThe sizes are:\n\n small - 64x64\n medium - 128x128\n large - 512x512\n\n\nThe 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\n\n5. Signing uploads \n\nUploads 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.\n\nCreating a signature for node.js and with dsteem:\n\nconst dsteem = require('dsteem')\nconst crypto = require('crypto')\nconst fs = require('fs')\n\nconst [wif, file] = process.argv.slice(2)\n\nif (!wif || !file) {\n process.stderr.write(`Usage: ./sign.js <posting_wif> <file>\\n`)\n process.exit(1)\n}\n\nconst data = fs.readFileSync(file)\nconst key = dsteem.PrivateKey.fromString(wif)\nconst imageHash = crypto.createHash('sha256')\n .update('ImageSigningChallenge')\n .update(data)\n .digest()\n\nprocess.stdout.write(key.sign(imageHash).toString() + '\\n')\n\n\n6. How to run \n\nThis imagehoster demo must be run through linux due to a dependency on the make commandline.\nYou will also require node.js and yarn to run\n\n\n \n git clone https://github.com/steemit/imagehoster\n \n \n Run make devserver\n \n\n\nThis 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.\n\n\n Run make lint to load the autolinter.\n Run make test to run the unit tests for the active functions.\n\n\nDefault configuration variables are in <./config/defailt.toml> and can be overridden by environment variables as definded in <./config/custom-enfironment-variables.toml>\n\nThe load order for the config files are: env vars > config/$NODE_ENV.toml > config/default.toml" + } + + + + + + + , + + "services-jussi": { + "id": "services-jussi", + "title": "Jussi", + "category": "services", + "description": "A reverse proxy that forwards json-rpc requests.", + "type": "", + "url": "/services/jussi", + "content": "Jussi is a custom-built caching layer for use with steemd and other various services (such as SBDS).\n\nThe purpose of this document is to help developers and node operators set up their own jussi node within a docker container.\n\nIntro\n\nJussi 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.\n\nSections\n\n\n Installation\n Adding Upstreams\n Benefits of jussi\n \n TTL\n Multiple Routes\n Retry\n json-rpc batch\n \n \n Footnotes\n\n\nInstallation\n\nTo run jussi locally:\n\ngit clone https://github.com/steemit/jussi.git\ncd jussi\ndocker build -t=\"$USER/jussi:$(git rev-parse --abbrev-ref HEAD)\" .\ndocker run -itp 9000:8080 \"$USER/jussi:$(git rev-parse --abbrev-ref HEAD)\"\n\n\n\njussi in a docker container as seen from Kitematic for macOS.\n\nTry out your local configuration:\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"condenser_api.get_block\", \"params\":[8675309], \"id\":1}' http://localhost:9000\n\n\nSee: Running Condenser, Jussi and a new service locally + adding feature flags to Condenser\n\n\n\nAdding Upstreams\n\nThe default DEV_config.json is:\n\n{\n \"limits\":{\"blacklist_accounts\":[\"non-steemit\"]},\n \"upstreams\":[\n {\n \"name\":\"steemd\",\n \"translate_to_appbase\":false,\n \"urls\":[[\"steemd\", \"https://steemd.steemitdev.com\"]],\n \"ttls\":[\n [\"steemd\", 3],\n [\"steemd.login_api\", -1],\n [\"steemd.network_broadcast_api\", -1],\n [\"steemd.follow_api\", 10],\n [\"steemd.market_history_api\", 1],\n [\"steemd.database_api\", 3],\n [\"steemd.database_api.get_block\", -2],\n [\"steemd.database_api.get_block_header\", -2],\n [\"steemd.database_api.get_content\", 1],\n [\"steemd.database_api.get_state\", 1],\n [\"steemd.database_api.get_state.params=['/trending']\", 30],\n [\"steemd.database_api.get_state.params=['trending']\", 30],\n [\"steemd.database_api.get_state.params=['/hot']\", 30],\n [\"steemd.database_api.get_state.params=['/welcome']\", 30],\n [\"steemd.database_api.get_state.params=['/promoted']\", 30],\n [\"steemd.database_api.get_state.params=['/created']\", 10],\n [\"steemd.database_api.get_dynamic_global_properties\", 1]\n ],\n \"timeouts\":[\n [\"steemd\", 5],\n [\"steemd.network_broadcast_api\", 0]\n ],\n \"retries\": [\n [\"steemd\", 3],\n [\"steemd.network_broadcast_api\", 0]\n ]\n },\n {\n \"name\":\"appbase\",\n \"urls\":[[\"appbase\", \"https://steemd.steemitdev.com\"]],\n \"ttls\":[\n [\"appbase\", -2],\n [\"appbase.block_api\", -2],\n [\"appbase.database_api\", 1]\n ],\n \"timeouts\":[\n [\"appbase\", 3],\n [\"appbase.chain_api.push_block\", 0],\n [\"appbase.chain_api.push_transaction\", 0],\n [\"appbase.network_broadcast_api\", 0],\n [\"appbase.condenser_api.broadcast_block\", 0],\n [\"appbase.condenser_api.broadcast_transaction\", 0],\n [\"appbase.condenser_api.broadcast_transaction_synchronous\", 0]\n ]\n }\n ]\n}\n\n\nUpstreams can be added to the upstreams array:\n\n{\n \"name\": \"foo\",\n \"urls\": [[\"foo\", \"https://foo.host.name\"]],\n \"ttls\": [[\"foo\", 3]],\n \"timeouts\": [[\"foo\", 5]]\n}\n\n\nOnce the above upstream is added to the local config and docker has been built, the following curl will work:\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"foo.bar\", \"params\":[\"baz\"], \"id\":1}' http://localhost:9000\n\n\nNote: 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.\n\nBenefits of jussi\n\nTime To Live\n\nJussi 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:\n\n\n \n \n Upstream\n API\n Method\n Parameters\n TTL (seconds)\n \n \n \n \n steemd\n login_api\n all\n all\n -1\n \n \n steemd\n network_broadcast_api\n all\n all\n -1\n \n \n steemd\n follow_api\n all\n all\n 10\n \n \n steemd\n market_history_api\n all\n all\n 1\n \n \n steemd\n database_api\n all\n all\n 3\n \n \n steemd\n database_api\n get_block\n all\n -2\n \n \n steemd\n database_api\n get_block_header\n all\n -2\n \n \n steemd\n database_api\n get_content\n all\n 1\n \n \n steemd\n database_api\n get_state\n all\n 1\n \n \n steemd\n database_api\n get_state\n '/trending'\n 30\n \n \n steemd\n database_api\n get_state\n 'trending'\n 30\n \n \n steemd\n database_api\n get_state\n '/hot'\n 30\n \n \n steemd\n database_api\n get_state\n '/welcome'\n 30\n \n \n steemd\n database_api\n get_state\n '/promoted'\n 30\n \n \n steemd\n database_api\n get_state\n '/created'\n 10\n \n \n steemd\n database_api\n get_dynamic_global_properties\n all\n 1\n \n \n overseer\n all\n all\n all\n 5\n \n \n conveyor\n all\n all\n all\n -1\n \n \n sbds\n all\n all\n all\n 3\n \n \n hivemind\n all\n all\n all\n 3\n \n \n yo\n all\n all\n all\n 3\n \n \n\n\nIn 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.\n\nSome methods and parameters have their own TTL that overrides the general default, like database_api.get_block, which overrides database_api.*.\n\nTime to Live Special Meaning\n\n\n 0 won’t expire\n -1 won’t be cached\n -2 will be cached without expiration only if it is irreversible in terms of blockchain consensus\n\n\nIf you have a local copy of jussi (see: Installation), you can change these defaults by modifying DEV_config.json.\n\nMultiple Routes\n\nEach urls key can have multiple endpoints for each namespace. For example:\n\n{\n \"urls\":[\n [\"appbase\", \"https://api.steemitdev.com\"]\n ]\n}\n\n\n… can also be expressed as:\n\n{\n \"urls\":[\n [\"appbase\",\"https://api.steemitdev.com\"],\n [\"appbase.condenser_api.get_account_history\",\"https://api-for-account-history.steemitdev.com\"],\n [\"appbase.condenser_api.get_ops_in_block\",\"https://api-for-get-ops-in-block.steemitdev.com\"]\n ]\n}\n\n\nIn 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.\n\nRetry\n\nAdding a retries element defines the number of retry attempts, where 0 (or absent) means no retry. The maximum number of retries is 3.\n\nNote that retrying broadcast methods is not recommended, which is why the example explicitly sets steemd.network_broadcast_api to 0.\n\njson-rpc batch\n\nNormally, a request is made with a JSON Object ({}). But jussi also supports batch requests, which is constructed with a JSON Array of Objects ([{}]).\n\nFor example, this would be a typical, non-batched JSON Object request that asks for a single block:\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"condenser_api.get_block\", \"params\":[1], \"id\":1}' https://api.steemit.com\n\n\n{\n \"id\":1,\n \"jsonrpc\":\"2.0\",\n \"result\":{\n \"previous\":\"0000000000000000000000000000000000000000\",\n \"timestamp\":\"2016-03-24T16:05:00\",\n \"witness\":\"initminer\",\n \"transaction_merkle_root\":\"0000000000000000000000000000000000000000\",\n \"extensions\":[\n\n ],\n \"witness_signature\":\"204f8ad56a8f5cf722a02b035a61b500aa59b9519b2c33c77a80c0a714680a5a5a7a340d909d19996613c5e4ae92146b9add8a7a663eef37d837ef881477313043\",\n \"transactions\":[\n\n ],\n \"block_id\":\"0000000109833ce528d5bbfb3f6225b39ee10086\",\n \"signing_key\":\"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX\",\n \"transaction_ids\":[\n\n ]\n }\n}\n\n\nTo request more than one block using the batch construct, wrap each call in a JSON Array, that asks for two blocks in one request:\n\ncurl -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\n\n\n[\n {\n \"id\":1,\n \"jsonrpc\":\"2.0\",\n \"result\":{\n \"previous\":\"0000000000000000000000000000000000000000\",\n \"timestamp\":\"2016-03-24T16:05:00\",\n \"witness\":\"initminer\",\n \"transaction_merkle_root\":\"0000000000000000000000000000000000000000\",\n \"extensions\":[\n\n ],\n \"witness_signature\":\"204f8ad56a8f5cf722a02b035a61b500aa59b9519b2c33c77a80c0a714680a5a5a7a340d909d19996613c5e4ae92146b9add8a7a663eef37d837ef881477313043\",\n \"transactions\":[\n\n ],\n \"block_id\":\"0000000109833ce528d5bbfb3f6225b39ee10086\",\n \"signing_key\":\"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX\",\n \"transaction_ids\":[\n\n ]\n }\n },\n {\n \"id\":2,\n \"jsonrpc\":\"2.0\",\n \"result\":{\n \"previous\":\"0000000109833ce528d5bbfb3f6225b39ee10086\",\n \"timestamp\":\"2016-03-24T16:05:36\",\n \"witness\":\"initminer\",\n \"transaction_merkle_root\":\"0000000000000000000000000000000000000000\",\n \"extensions\":[\n\n ],\n \"witness_signature\":\"1f3e85ab301a600f391f11e859240f090a9404f8ebf0bf98df58eb17f455156e2d16e1dcfc621acb3a7acbedc86b6d2560fdd87ce5709e80fa333a2bbb92966df3\",\n \"transactions\":[\n\n ],\n \"block_id\":\"00000002ed04e3c3def0238f693931ee7eebbdf1\",\n \"signing_key\":\"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX\",\n \"transaction_ids\":[\n\n ]\n }\n }\n]\n\n\nError 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.\n\ncurl -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\n\n\n[\n {\n \"jsonrpc\":\"2.0\",\n \"result\":{\n \"previous\":\"0000000000000000000000000000000000000000\",\n \"timestamp\":\"2016-03-24T16:05:00\",\n \"witness\":\"initminer\",\n \"transaction_merkle_root\":\"0000000000000000000000000000000000000000\",\n \"extensions\":[\n\n ],\n \"witness_signature\":\"204f8ad56a8f5cf722a02b035a61b500aa59b9519b2c33c77a80c0a714680a5a5a7a340d909d19996613c5e4ae92146b9add8a7a663eef37d837ef881477313043\",\n \"transactions\":[\n\n ],\n \"block_id\":\"0000000109833ce528d5bbfb3f6225b39ee10086\",\n \"signing_key\":\"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX\",\n \"transaction_ids\":[\n\n ]\n },\n \"id\":1\n },\n {\n \"jsonrpc\":\"2.0\",\n \"error\":{\n \"code\":-32000,\n \"message\":\"Parse Error:Couldn't parse uint64_t\",\n \"data\":{\n \"code\":4,\n \"name\":\"parse_error_exception\",\n \"message\":\"Parse Error\",\n \"stack\":[\n {\n \"context\":{\n \"level\":\"error\",\n \"file\":\"string.cpp\",\n \"line\":113,\n \"method\":\"to_uint64\",\n \"hostname\":\"\",\n \"timestamp\":\"2018-05-21T18:02:41\"\n },\n \"format\":\"Couldn't parse uint64_t\",\n \"data\":{\n\n }\n },\n {\n \"context\":{\n \"level\":\"warn\",\n \"file\":\"string.cpp\",\n \"line\":116,\n \"method\":\"to_uint64\",\n \"hostname\":\"\",\n \"timestamp\":\"2018-05-21T18:02:41\"\n },\n \"format\":\"\",\n \"data\":{\n \"i\":\"WRONG\"\n }\n },\n {\n \"context\":{\n \"level\":\"warn\",\n \"file\":\"variant.cpp\",\n \"line\":405,\n \"method\":\"as_uint64\",\n \"hostname\":\"\",\n \"timestamp\":\"2018-05-21T18:02:41\"\n },\n \"format\":\"\",\n \"data\":{\n \"*this\":\"WRONG\"\n }\n }\n ]\n }\n },\n \"id\":2\n }\n]\n\n\nFootnotes\n\n\n Batch requests are limited to a maximum of 50 request elements.\n \n Also see: json-rpc batch specification\n \n \n Repository: github.com/steemit/jussi\n\n\n\n\nLatin\n\n\n jussi\n\nnoun\n\ndeclension: 2nd declension\ngender: neuter\n\nDefinitions:\n 1. order, command, decree, ordinance, law" + } + + + + + + + , + + "services-sbds": { + "id": "services-sbds", + "title": "SBDS", + "category": "services", + "description": "", + "type": "", + "url": "/services/sbds", + "content": "sbds is a tool for easily querying the data of the Steem Blockchain.\n\nWhile 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.\n\nDocker Hub\n\ndocker run -d steemit/sbds\n\n\nPython 3\npip3 install -e git+git@github.com:steemit/sbds.git#egg=sbds\n\n\nExamples\n\nStream blocks 1 to 3450000 from our dev S3 bucket\nsbds checkpoints get-blocks s3://steemit-dev-sbds-checkpoints/gzipped --start 1 --end 3450000\n\n\nStream blocks 8000000 to the last block from your local copy of our S3 bucket\nsbds checkpoints get-blocks /home/ubuntu/checkpoints/gzipped --start 8000000\n\n\nStream all blocks from your local copy of our S3 bucket\n\nsbds checkpoints get-blocks /home/ubuntu/checkpoints/gzipped\n\n\nRoutes\n\nComing soon." + } + + + + + + + , + + "services-steemlogin": { + "id": "services-steemlogin", + "title": "SteemLogin", + "category": "services", + "description": "", + "type": "", + "url": "/services/steemlogin", + "content": "What is SteemLogin?\n\nThe goal of SteemLogin 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 SteemLogin nor the authorised app store the private keys as the posting key is incrypted on your cookie.\n\nHow SteemLogin is implemented\n\nsteemlogin works by granting an access token to the requesting app once the application has been approved.\nA full tutorial on how to set up an application, request authorisation and grant access can be found here.\n\nSteem Authorisation and OAuth 2\n\nThe 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.\nSimplified, the process includes the following steps:\n\n\n The user is presented with an authorisation link that requests a token from the API\n The user has to log in to the service to verify their identity whereupon they will be prompted to authorise the application\n The user is redirected to the application redirect URI along with the access token\n\n\nOnce 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.\nA full breakdown of OAuth2 and how it applies to SteemIt and SteemLogin can be found here.\n\nUseful Links\n\n\n SteemLogin Repo\n Community Resources\n\n\nFor additional material you can refer to the original steemit blog post by busy.org" + } + + + + + + + , + + "services-steemit": { + "id": "services-steemit", + "title": "Steemit.com", + "category": "services", + "description": "", + "type": "", + "url": "/services/steemit", + "content": "steemit.com endpoints\n\nSteemit.com offers a few endpoints for getting common data. User profile and post JSON data is very convenient and simple by appending .json\nto your request.\n\nGetting a particular user profile JSON:\n\nhttps://steemit.com/@curie.json\n\n\nUser object\n{\n \"user\":{\n \"id\":81544,\n \"name\":\"curie\",\n \"owner\":{\n \"weight_threshold\":1,\n \"account_auths\":[],\n \"key_auths\":[[\"STM69WGR1yhUdKrnzwQLDPnXrW9kaAERwHze8Uvtw2ecgRqCEjWxT\", 1]]\n },\n \"active\":{\n \"weight_threshold\":1,\n \"account_auths\":[],\n \"key_auths\":[[\"STM5GAbbS84ViMEouJL3LKcM8VZzPejn68AfPaYaLZZDdmy98kwU5\", 1]]\n },\n \"posting\":{\n \"weight_threshold\":1,\n \"account_auths\":[[\"steemauto\", 1]],\n \"key_auths\":[[\"STM5cmuKw6EPkZWeVNXcZorKtattZTX5wSopcRb4xNe6VhRKjETgv\", 1]]\n },\n \"memo_key\":\"STM7ZBi61xYz1b9STE1PHcAraPXJbvafzge3AcPjcfeq4XkKtM2At\",\n \"json_metadata\":{\n \"profile\":{\n \"profile_image\":\"https://i.imgur.com/Mjewc66.jpg\",\n \"name\":\"Curie\",\n \"about\":\"Discovering exceptional content. \",\n \"location\":\"Worldwide\",\n \"website\":\"http://curiesteem.com\"\n }\n },\n \"proxy\":\"\",\n \"last_owner_update\":\"1970-01-01T00:00:00\",\n \"last_account_update\":\"2018-02-28T14:21:24\",\n \"created\":\"2016-09-02T10:44:24\",\n \"mined\":false,\n \"recovery_account\":\"anonsteem\",\n \"last_account_recovery\":\"1970-01-01T00:00:00\",\n \"reset_account\":\"null\",\n \"comment_count\":0,\n \"lifetime_vote_count\":0,\n \"post_count\":1042,\n \"can_vote\":true,\n \"voting_power\":8927,\n \"last_vote_time\":\"2018-06-21T19:42:33\",\n \"balance\":\"24.519 STEEM\",\n \"savings_balance\":\"0.000 STEEM\",\n \"sbd_balance\":\"36.736 SBD\",\n \"sbd_seconds\":\"11732264931\",\n \"sbd_seconds_last_update\":\"2018-06-21T19:35:00\",\n \"sbd_last_interest_payment\":\"2018-06-15T14:05:03\",\n \"savings_sbd_balance\":\"0.000 SBD\",\n \"savings_sbd_seconds\":\"0\",\n \"savings_sbd_seconds_last_update\":\"1970-01-01T00:00:00\",\n \"savings_sbd_last_interest_payment\":\"1970-01-01T00:00:00\",\n \"savings_withdraw_requests\":0,\n \"reward_sbd_balance\":\"0.000 SBD\",\n \"reward_steem_balance\":\"0.000 STEEM\",\n \"reward_vesting_balance\":\"481.354811 VESTS\",\n \"reward_vesting_steem\":\"0.237 STEEM\",\n \"vesting_shares\":\"128367480.795804 VESTS\",\n \"delegated_vesting_shares\":\"0.000000 VESTS\",\n \"received_vesting_shares\":\"17069919.621493 VESTS\",\n \"vesting_withdraw_rate\":\"9672265.370398 VESTS\",\n \"next_vesting_withdrawal\":\"2018-06-24T14:01:51\",\n \"withdrawn\":0,\n \"to_withdraw\":\"125739449815180\",\n \"withdraw_routes\":0,\n \"curation_rewards\":79730650,\n \"posting_rewards\":168964559,\n \"proxied_vsf_votes\":[\"1753316906111\", 0, 0, 0],\n \"witnesses_voted_for\":1,\n \"last_post\":\"2018-06-21T18:06:57\",\n \"last_root_post\":\"2018-06-19T13:16:15\",\n \"average_bandwidth\":\"540385456623\",\n \"lifetime_bandwidth\":\"33717478000000\",\n \"last_bandwidth_update\":\"2018-06-21T19:42:33\",\n \"average_market_bandwidth\":\"83841450748\",\n \"lifetime_market_bandwidth\":\"8042800000000\",\n \"last_market_bandwidth_update\":\"2018-06-19T04:21:42\",\n \"vesting_balance\":\"0.000 STEEM\",\n \"reputation\":\"418378051905700\",\n \"transfer_history\":[],\n \"market_history\":[],\n \"post_history\":[],\n \"vote_history\":[],\n \"other_history\":[],\n \"witness_votes\":[\"curie\"],\n \"tags_usage\":[],\n \"guest_bloggers\":[]\n },\n \"status\":\"200\"\n}\n\n\nGetting a particular post JSON:\n\nhttps://steemit.com/curation/@curie/the-daily-curie-12-13-feb-2017.json\n\n\nPost object\n{\n \"post\":{\n \"id\":1720643,\n \"author\":\"curie\",\n \"permlink\":\"the-daily-curie-08-09-jan-2017\",\n \"category\":\"curation\",\n \"parent_author\":\"\",\n \"parent_permlink\":\"curation\",\n \"title\":\"The Daily Curie (08-09 Jan 2017)\",\n \"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 ...\",\n \"last_update\":\"2017-01-09T12:20:15\",\n \"created\":\"2017-01-09T12:20:15\",\n \"active\":\"2017-01-11T22:44:57\",\n \"last_payout\":\"2017-02-09T14:40:54\",\n \"depth\":0,\n \"children\":36,\n \"children_rshares2\":\"0\",\n \"net_rshares\":0,\n \"abs_rshares\":0,\n \"vote_rshares\":0,\n \"children_abs_rshares\":0,\n \"cashout_time\":\"1969-12-31T23:59:59\",\n \"max_cashout_time\":\"1969-12-31T23:59:59\",\n \"total_vote_weight\":0,\n \"reward_weight\":10000,\n \"total_payout_value\":\"0.000 SBD\",\n \"curator_payout_value\":\"0.000 SBD\",\n \"author_rewards\":0,\n \"net_votes\":519,\n \"root_comment\":1720643,\n \"mode\":\"archived\",\n \"max_accepted_payout\":\"0.000 SBD\",\n \"percent_steem_dollars\":10000,\n \"allow_replies\":true,\n \"allow_votes\":true,\n \"allow_curation_rewards\":true,\n \"url\":\"/curation/@curie/the-daily-curie-08-09-jan-2017\",\n \"root_title\":\"The Daily Curie (08-09 Jan 2017)\",\n \"pending_payout_value\":\"0.000 SBD\",\n \"total_pending_payout_value\":\"0.000 SBD\"\n }\n}" + } + + + + + + + + + , + + "testnet-index": { + "id": "testnet-index", + "title": "Steem Testnet", + "category": "testnet", + "description": "", + "type": "", + "url": "/testnet/index", + "content": "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. \nHaving 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.\n\nRunning Testnet\n\nBy 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.\n\nThe 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.\n\nJoining/Running the development testnet requires around 10 GB for block log on an SSD and 8 GB RAM. The CPU requirements are the same.\n\nTestnet has the following parameters by default (as of this writing):\n\n\n Initial supply (250 billion) - STEEM_INIT_SUPPLY 250,000,000,000\n Max number of blocks to be produced - TESTNET_BLOCK_LIMIT 3,000,000\n Address prefix, prefix on public addresses - STEEM_ADDRESS_PREFIX \"TST\"\n Chain id name, used for chain id - STEEM_CHAIN_ID_NAME \"testnet\"\n Chain id, unique id hash of chain - STEEM_CHAIN_ID (fc::sha256::hash(STEEM_CHAIN_ID_NAME))\n Public key of genesis account - STEEM_INIT_PUBLIC_KEY_STR \n Account creation fee - STEEM_MIN_ACCOUNT_CREATION_FEE 0\n\n\nThere are a number of other subtle changes that we don’t need to focus on right now.\n\nLive testnet\n\n\n ChainID: 46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32\n Address prefix: TST\n API node: https://testnet.steemitdev.com\n\n\nAnyone can join the Live testnet and start testing their node and applications, become a witness, and provide API (RPC) node for public use.\n\nCustom Testnet\n\nIn order to create a custom testnet, separate from the development one, we need to modify a few parameters mentioned in the previous section.\n\nIn 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.\n\nLet’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.\n\nA 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.\n\nOne 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.\n\nAnother 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:\n\nvoid database::init_genesis( uint64_t init_supply ) inside try add this line:\n\nset_hardfork( 19, true );\n\nThis would mean that 19 hardforks have been accepted by witnesses and the new chain will start with all previous forks included.\n\nAfter 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.\n\nIf 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.\n\nCustom live testnet\n\n\n ChainID: 79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673\n Address prefix: STX\n API node: https://testnet.steem.vc\n\n\nThe above testnet is powered by community member @almost-digital and doesn’t have a snapshot of the main network." + } + + + + + + + , + + "testnet-tools": { + "id": "testnet-tools", + "title": "Tools", + "category": "testnet", + "description": "Directory of community testnet tools", + "type": "", + "url": "/testnet/tools", + "content": "Testnet ID\n Tool\n Purpose\n \n \n \n \n 46d82ab\n Steemit, Inc. Live Testnet Endpoint\n For anyone who wants to start testing their node and applications.\n \n \n 79276ae\n testnet.steem.vc\n General bootstrapping to testnet.steem.vc maintained maintained by @almost-digital.\n \n \n 79276ae\n TestNET Condenser\n A condenser instance for testnet.steem.vc." + } + + + + + + + + + , + + "tutorials-index": { + "id": "tutorials-index", + "title": "Tutorials", + "category": "tutorials", + "description": "", + "type": "", + "url": "/tutorials/index", + "content": "Read, play, and learn Steem.\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tJavascript\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Getting Started\n\t\t\t\t\t\t\tPrepare your development environment to use Javascript with the Steem blockchain.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Blog Feed\n\t\t\t\t\t\t\tBy the end of this tutorial you should know how to fetch most recent five posts from particular user on Steem.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Steemlogin\n\t\t\t\t\t\t\tUnderstand the basics of using Steemlogin with your Steem application.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Client Signing\n\t\t\t\t\t\t\tBy the end of this tutorial you would know how to sign, verify broadcast transactions locally on Steem.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Get Posts\n\t\t\t\t\t\t\tQuery for the most recent posts having a specific tag, using a Steem filter\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Get Post Details\n\t\t\t\t\t\t\tBy the end of this tutorial you would know how to get post details and use them appropriately.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Get Voters List On Post\n\t\t\t\t\t\t\tBy the end of this tutorial you would know how to get voters list on any content.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Get Post Comments\n\t\t\t\t\t\t\tBy the end of this tutorial you would know how to get comments made by others on any post.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Get Account Replies\n\t\t\t\t\t\t\tBy the end of this tutorial you would know how to get replies made on particular account’s content.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Get Account Comments\n\t\t\t\t\t\t\tBy the end of this tutorial you should know how to retrieve account comments from the steem blockchain\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Submit Post\n\t\t\t\t\t\t\tBy the end of this tutorial you should know how to prepare comments for Steem and then submit using the broadcast.comment function.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Submit Comment Reply\n\t\t\t\t\t\t\tBy the end of this tutorial you should know how to post a simple comment to Steem.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Edit Content Patching\n\t\t\t\t\t\t\tBy the end of this tutorial you should know how to patch post edits to Steem.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Stream Blockchain Transactions\n\t\t\t\t\t\t\tBy the end of this tutorial you should know how to stream transactions and blocks from Steem blockchain.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Reblogging Post\n\t\t\t\t\t\t\tBy the end of this tutorial you should know how to reblog (resteem) a blog from steem\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Search Accounts\n\t\t\t\t\t\t\tBy the end of this tutorial you should know how to call a list of user names from the steem blockchain\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Search Tags\n\t\t\t\t\t\t\tBy the end of this tutorial you should know how to run a search for trending tags\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Vote On Content\n\t\t\t\t\t\t\tCreate a weighted up or down vote on a comment/post.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Follow A User\n\t\t\t\t\t\t\tFollow and unfollow a user / author.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Get Follower And Following List\n\t\t\t\t\t\t\tGet the followers of a user/author & the authors that user is following.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Account Reputation\n\t\t\t\t\t\t\tLearn how to interpret account reputation.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Transfer Steem And Sbd\n\t\t\t\t\t\t\tTransfer both STEEM and SBD from one account to another.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Witness Listing And Voting\n\t\t\t\t\t\t\tCreate a list of available witnesses as well as vote for and remove your vote for a witness.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Claim Rewards\n\t\t\t\t\t\t\tLearn how to claim rewards from unclaimed reward balance using Steemlogin as well as client signing method.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Power Up Steem\n\t\t\t\t\t\t\tPower up an account’s Steem using either Steemlogin or a client-side signing.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Power Down\n\t\t\t\t\t\t\tPerform a power down on all or part of an account’s VESTS using either Steemlogin or client-side signing.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Create Account\n\t\t\t\t\t\t\tCreate Steem account using Steemlogin as well as with client-side signing.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Delegate Power\n\t\t\t\t\t\t\tDelegate power to other users using Steemlogin or Client-side signing.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Set Withdraw Route\n\t\t\t\t\t\t\tSet routes to an account’s power downs or withdraws.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Get Delegations By User\n\t\t\t\t\t\t\tView the vesting delegations made by a user as well as the delegations that are expiring.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Grant Posting Permission\n\t\t\t\t\t\t\tHow to grant and revoke posting permission to another user.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Grant Active Permission\n\t\t\t\t\t\t\tHow to grant and revoke active permission to another user.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Convert Sbd To Steem\n\t\t\t\t\t\t\tHow to convert SBD to STEEM for a specified account.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tJS: Get State Replacement Api\n\t\t\t\t\t\t\tThis is a list of replacement API calls for each of the different routes available from the getState function.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tPython\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Getting Started\n\t\t\t\t\t\t\tThe official Steem library for Python is steem-python. It comes with a BIP38 encrypted wallet and a practical CLI utility called steempy.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Using Keys Securely\n\t\t\t\t\t\t\tLearn how Steem-Python library handles transaction signing with user’s key and how to securely manage your private keys.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Get Posts\n\t\t\t\t\t\t\tTutorial pulls a list of the posts from the blockchain with selected filter and tag then displays output.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Get Post Details\n\t\t\t\t\t\t\tGet post details from list of posts from the blockchain with created filter and tag then display selected post details.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Get Voters List On Post\n\t\t\t\t\t\t\tVoters list and detail of each vote on selected content.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Get Post Comments\n\t\t\t\t\t\t\tFetch comments made on each content or post using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Get Account Replies\n\t\t\t\t\t\t\tList of replies received by account to its content, post, comment.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Get Account Comments\n\t\t\t\t\t\t\tFetch list of comments made by account on posts or comments.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Submit Post\n\t\t\t\t\t\t\tHow to submit post on Steem blockchain using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Submit Comment Reply\n\t\t\t\t\t\t\tHow to submit a comment on a post to the Steem blockchain.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Edit Content Patching\n\t\t\t\t\t\t\tHow to edit post content with diff_match_patch using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Stream Blockchain Transactions\n\t\t\t\t\t\t\tHow to stream transactions on the live Steem blockchain\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Reblogging Post\n\t\t\t\t\t\t\tWe will show how to reblog or resteem post using Python, with username and posting private key.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Search Accounts\n\t\t\t\t\t\t\tHow to pull a list of the active user accounts or trending tags from the blockchain using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Search Tags\n\t\t\t\t\t\t\tHow to pull a list of the trending tags from the blockchain using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Vote On Content\n\t\t\t\t\t\t\tHow to vote on a post/comment using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Follow A User\n\t\t\t\t\t\t\tHow to follow or unfollow an author using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Get Follower And Following List\n\t\t\t\t\t\t\tTutorial pulls a list of the followers or authors being followed from the blockchain then displays the result.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Account Reputation\n\t\t\t\t\t\t\tWould you like to know how to interpret account reputation to more human readable format, then this tutorial is for you.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Transfer Steem And Sbd\n\t\t\t\t\t\t\tHow to transfer STEEM and SBD to another account using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Witness Listing And Voting\n\t\t\t\t\t\t\tHow to vote for or remove a vote for a witness user using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Claim Rewards\n\t\t\t\t\t\t\tHow to claim rewards using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Power Up Steem\n\t\t\t\t\t\t\tHow to power up your STEEM to STEEM POWER using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Power Down\n\t\t\t\t\t\t\tHow to power down (withdraw) your vesting shares using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Delegate Power\n\t\t\t\t\t\t\tHow to delegate or remove delegation of STEEM POWER to another user using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Get Delegations By User\n\t\t\t\t\t\t\tHow to get a list of active or expiring vesting delegations using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Grant Posting Permission\n\t\t\t\t\t\t\tHow to give another user posting permission on your account using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Grant Active Permission\n\t\t\t\t\t\t\tHow to give another user active permission on your account using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Convert Sbd To Steem\n\t\t\t\t\t\t\tHow to convert your SBD to STEEM using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Transfer Steem And Sbd To Savings Balance\n\t\t\t\t\t\t\tHow to transfer STEEM and SBD to savings using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Password Key Change\n\t\t\t\t\t\t\tHow to change your accounts password and keys\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tPY: Account Recovery\n\t\t\t\t\t\t\tHow to recover an account using Python.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tRuby\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Getting Started\n\t\t\t\t\t\t\tTo 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.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Blog Feed\n\t\t\t\t\t\t\tThis example will output blog details to the terminal for the author specified, limited to five results.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Get Posts\n\t\t\t\t\t\t\tThis example will output posts depending on which category is provided as the arguments.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Get Post Details\n\t\t\t\t\t\t\tUnderstand and use the most common fields of the requested content.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Get Voters List On Post\n\t\t\t\t\t\t\tThis example will output the active vote totals for the post/comment passed as an argument to the script.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Get Post Comments\n\t\t\t\t\t\t\tThis example will output the reply details and totals for the post/comment passed as an argument to the script.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Get Account Replies\n\t\t\t\t\t\t\tFetching the replies written to a particular account.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Get Account Comments\n\t\t\t\t\t\t\tFetching the comments written by a particular account.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Submit Post\n\t\t\t\t\t\t\tThis 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.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Submit Comment Reply\n\t\t\t\t\t\t\tBy the end of this tutorial you should know how to prepare comments for Steem and then submit using Radiator.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Edit Content Patching\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Stream Blockchain Transactions\n\t\t\t\t\t\t\tHow to stream transactions and operations from Steem blockchain.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Reblogging Post\n\t\t\t\t\t\t\tTo reblog (‘resteem’) a post, we can use a custom json operation that is handled by the follow plugin.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Search Accounts\n\t\t\t\t\t\t\tPerforming a search on account by names starting with a given input.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Search Tags\n\t\t\t\t\t\t\tPerforming a search for tags.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Vote On Content\n\t\t\t\t\t\t\tTo vote for a post (or reply), we can use a vote operation and provide the voting weight (the percentage of one vote being cast).\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Follow Another User\n\t\t\t\t\t\t\tHow to follow/unfollow another user.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRB: Get Follower And Following List\n\t\t\t\t\t\t\tHow to create a list of followers and accounts that you are following.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tRecipes\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tStreaming blockchain transactions\n\t\t\t\t\t\t\tIncluding virtual operations when streaming blockchain transactions\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tCalculating RC costs\n\t\t\t\t\t\t\tHow to calculate resource credit cost for transactions.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tEstimate the value of an upvote\n\t\t\t\t\t\t\tCalculate the approximate value of an upvote on Steem\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tForum/Market Bandwidth\n\t\t\t\t\t\t\tHow to interpret raw bandwidth data.\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tUsing jussi as a Multiplexer\n\t\t\t\t\t\t\tOptimize your local applications with jussi\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tEnable SteemD Node APIs\n\t\t\t\t\t\t\tRun a SteemD Node with your preferred APIs\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tUnderstanding Configuration Values\n\t\t\t\t\t\t\tLow level blockchain constants\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tUnderstanding Dynamic Global Properties\n\t\t\t\t\t\t\tMaintains global state information\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tConverting VESTS to STEEM\n\t\t\t\t\t\t\tHow to convert VESTS to STEEM or STEEM POWER\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tAccount creation process\n\t\t\t\t\t\t\tThe methods on how to create a new account." + } + + + + + + + + + , + + "tutorials-javascript-account-reputation": { + "id": "tutorials-javascript-account-reputation", + "title": "JS: Account Reputation", + "category": "tutorials-javascript", + "description": "_Learn how to interpret account reputation._", + "type": "", + "url": "/tutorials-javascript/account_reputation", + "content": "Full, runnable src of Account Reputation can be downloaded as part of the JS tutorials repository.\n\n\nThis tutorial runs on the main Steem blockchain. And accounts queried are real users with reputation.\n\nIntro\n\nThis tutorial will show the method of capturing a queried tag name and matching it to the Steem. 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 both capture the string query as well as display the completed search.\n\nsteps\n\n\n App setup Configuration of dsteem to use the proper connection and network.\n Search account Collecting the relevant search criteria\n Interpret account reputation Running the search and interpreting reputation.\n Output Displaying the results\n\n\n1. App setup \n\nBelow 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to production server\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n//connect to server which is connected to the network/production\nconst client = new dsteem.Client('https://api.steemit.com');\n\n\n2. Search account \n\nCollecting 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:\n\nconst max = 5;\nwindow.submitAcc = async () => {\n const accSearch = document.getElementById('username').value;\n\n\n3. Interpret account reputation \n\nIn order to get accounts, we run the search with the search field and maximum list items as parameters.\n\nconst _accounts = await client.database.call('lookup_accounts',[accSearch, max]);\n\n\nThe result of the search is an array of accounts. After that we use get_accounts to pull account data from Steem.\n\nconst acc = await client.database.call('get_accounts',[_accounts]);\n\n\nAnd we loop through each account to convert their reputation to human readable format with following function:\n\nfunction log10(str) {\n const leadingDigits = parseInt(str.substring(0, 4));\n const log = Math.log(leadingDigits) / Math.LN10 + 0.00000001;\n const n = str.length - 1;\n return n + (log - parseInt(log));\n}\n\nexport const repLog10 = rep2 => {\n if (rep2 == null) return rep2;\n let rep = String(rep2);\n const neg = rep.charAt(0) === '-';\n rep = neg ? rep.substring(1) : rep;\n\n let out = log10(rep);\n if (isNaN(out)) out = 0;\n out = Math.max(out - 9, 0); // @ -9, $0.50 earned is approx magnitude 1\n out = (neg ? -1 : 1) * out;\n out = out * 9 + 25; // 9 points per magnitude. center at 25\n // base-line 0 to darken and < 0 to auto hide (grep rephide)\n out = parseInt(out);\n return out;\n};\n\n\n4. Output \n\nAfter each account’s reputation is interpreted we can then display them on screen with readable reputation.\n\n//disply list of account names and reputation with line breaks\nfor (var i = 0; i < _accounts.length; i++) {\n _accounts[i] = `${_accounts[i]} - ${repLog10(acc[i].reputation)}`;\n}\ndocument.getElementById('accList').innerHTML = _accounts.join('<br/>');\n\n\nThat’s it!\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/20_account_reputation\n npm i\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-blog-feed": { + "id": "tutorials-javascript-blog-feed", + "title": "JS: Blog Feed", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you should know how to fetch most recent five posts from particular user on Steem._", + "type": "", + "url": "/tutorials-javascript/blog_feed", + "content": "Full, runnable src of Blog Feed can be downloaded as part of the JS tutorials repository.\n\n\nThis 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.\n\nIntro\n\nTutorial 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\n\nSteps\n\n\n Configure connection Configuration of dsteem to use proper connection and network\n Query format Simple query format to help use fetch data\n Fetch data and format Fetch data and display in proper interface\n\n\n\n\n1. Configure connection\n\nIn 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.\n\nIn first couple lines we require package and define connection server:\n\nconst { Client } = require('dsteem');\n\nconst client = new Client('https://api.steemit.com');\n\n\n2. Query format\n\n\n 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.\n You can also limit the number of results you would like to receive from the query\n\n\nvar query = {\n tag: 'steemitblog', // This tag is used to filter the results by a specific post tag\n limit: 5, // This limit allows us to limit the overall results returned to 5\n};\n\n\n3. Fetch data and format\n\nclient.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.\n\n client.database\n .getDiscussions('blog', query)\n .then(result => {\n var posts = [];\n result.forEach(post => {\n const json = JSON.parse(post.json_metadata);\n const image = json.image ? json.image[0] : '';\n const title = post.title;\n const author = post.author;\n const created = new Date(post.created).toDateString();\n posts.push(\n `<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>`\n );\n });\n\n document.getElementById('postList').innerHTML = posts.join('');\n })\n .catch(err => {\n alert('Error occured' + err);\n });\n\n\nThe result returned form the service is a JSON object with the following properties:\n\n[\n {\n \"id\": 37338948,\n \"author\": \"steemitblog\",\n \"permlink\": \"join-team-steemit-at-tokenfest\",\n \"category\": \"steemit\",\n \"parent_author\": \"\",\n \"parent_permlink\": \"steemit\",\n \"title\": \"Join Team Steemit at TokenFest!\",\n \"body\":\n \"<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*\",\n \"json_metadata\":\n \"{\\\"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\\\"}\",\n \"last_update\": \"2018-03-07T23:22:54\",\n \"created\": \"2018-03-07T20:56:36\",\n \"active\": \"2018-03-13T01:40:21\",\n \"last_payout\": \"1970-01-01T00:00:00\",\n \"depth\": 0,\n \"children\": 29,\n \"net_rshares\": \"11453442114933\",\n \"abs_rshares\": \"11454054795840\",\n \"vote_rshares\": \"11454054795840\",\n \"children_abs_rshares\": \"13568695606090\",\n \"cashout_time\": \"2018-03-14T20:56:36\",\n \"max_cashout_time\": \"1969-12-31T23:59:59\",\n \"total_vote_weight\": 3462435,\n \"reward_weight\": 10000,\n \"total_payout_value\": \"0.000 SBD\",\n \"curator_payout_value\": \"0.000 SBD\",\n \"author_rewards\": 0,\n \"net_votes\": 77,\n \"root_comment\": 37338948,\n \"max_accepted_payout\": \"0.000 SBD\",\n \"percent_steem_dollars\": 10000,\n \"allow_replies\": true,\n \"allow_votes\": true,\n \"allow_curation_rewards\": true,\n \"beneficiaries\": [],\n \"url\": \"/steemit/@steemitblog/join-team-steemit-at-tokenfest\",\n \"root_title\": \"Join Team Steemit at TokenFest!\",\n \"pending_payout_value\": \"46.436 SBD\",\n \"total_pending_payout_value\": \"0.000 STEEM\",\n \"active_votes\": [\n {\n \"voter\": \"steemitblog\",\n \"weight\": 0,\n \"rshares\": \"1870813909383\",\n \"percent\": 10000,\n \"reputation\": \"128210130644387\",\n \"time\": \"2018-03-07T20:56:36\"\n },\n {\n \"voter\": \"kevinwong\",\n \"weight\": 526653,\n \"rshares\": \"2208942520687\",\n \"percent\": 5000,\n \"reputation\": \"374133832002581\",\n \"time\": \"2018-03-08T04:27:00\"\n }\n ],\n \"replies\": [],\n \"author_reputation\": \"128210130644387\",\n \"promoted\": \"0.000 SBD\",\n \"body_length\": 754,\n \"reblogged_by\": []\n }\n]\n\n\nFrom 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\n\nThat’s all there is to it.\n\nTo Run the tutorial\n\n\n clone this repo\n cd tutorials/01_blog_feed\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-claim-rewards": { + "id": "tutorials-javascript-claim-rewards", + "title": "JS: Claim Rewards", + "category": "tutorials-javascript", + "description": "_Learn how to claim rewards from unclaimed reward balance using Steemlogin as well as client signing method._", + "type": "", + "url": "/tutorials-javascript/claim_rewards", + "content": "Full, runnable src of Claim Rewards can be downloaded as part of the JS tutorials repository.\n\n\nThis tutorial runs on the main Steem blockchain. And accounts queried are real users with unclaimed balances.\n\nIntro\n\nThis 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.\n\nSteps\n\n\n App setup Setup dsteem to use the proper connection and network.\n Search account Get account details after input has account name\n Fill form Fill form with account reward balances\n Claim reward Claim reward with Steemlogin or Client signing options\n\n\n1. App setup \n\nBelow 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to production server\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n//connect to server which is connected to the network/production\nconst client = new dsteem.Client('https://api.steemit.com');\n\n\n2. Search account \n\nAfter 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:\n\n const accSearch = document.getElementById('username').value;\n const _accounts = await client.database.call('get_accounts', [[accSearch]]);\n console.log(`_accounts:`, _accounts);\n\n\n3. Fill form \n\nAfter we fetched account data, we will fill form with reward balance and show current reward balance details.\n\nconst name = _accounts[0].name;\nconst reward_steem = _accounts[0].reward_steem_balance.split(' ')[0];\nconst reward_sbd = _accounts[0].reward_sbd_balance.split(' ')[0];\nconst reward_sp = _accounts[0].reward_vesting_steem.split(' ')[0];\nconst reward_vests = _accounts[0].reward_vesting_balance.split(' ')[0];\nconst unclaimed_balance = `Unclaimed balance for ${name}: ${reward_steem} STEEM, ${reward_sbd} SBD, ${reward_sp} SP = ${reward_vests} VESTS<br/>`;\ndocument.getElementById('accList').innerHTML = unclaimed_balance;\ndocument.getElementById('steem').value = reward_steem;\ndocument.getElementById('sbd').value = reward_sbd;\ndocument.getElementById('sp').value = reward_vests;\n\n\n4. Claim reward \n\nWe have 2 options on how to claim rewards. Steemlogin and Client signing options. We generate Steemlogin link to claim rewards, but you can also choose client signing option to claim rewards right inside tutorial.\n\nIn order to enable client signing, we will generate operation and also show Posting Private key (wif) field to sign transaction right there client side.\nBelow 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.\n\nwindow.submitTx = async () => {\n const privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('wif').value\n );\n const op = [\n 'claim_reward_balance',\n {\n account: document.getElementById('username').value,\n reward_steem: document.getElementById('steem').value + ' STEEM',\n reward_sbd: document.getElementById('sbd').value + ' SBD',\n reward_vests: document.getElementById('sp').value + ' VESTS',\n },\n ];\n client.broadcast.sendOperations([op], privateKey).then(\n function(result) {\n document.getElementById('result').style.display = 'block';\n document.getElementById(\n 'result'\n ).innerHTML = `<br/><p>Included in block: ${\n result.block_num\n }</p><br/><br/>`;\n },\n function(error) {\n console.error(error);\n }\n );\n};\n\n\nThat’s it!\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/21_claim_rewards\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-client-signing": { + "id": "tutorials-javascript-client-signing", + "title": "JS: Client Signing", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you would know how to sign, verify broadcast transactions locally on Steem._", + "type": "", + "url": "/tutorials-javascript/client_signing", + "content": "Full, runnable src of Client Signing can be downloaded as part of the JS tutorials repository.\n\n\nThis tutorial gives you overview of how client side transaction signing works under the hood.\n\nPurpose is to guide you through the steps required so that you could adapt this in your own applications.\n\nWe have predefined accounts to select for you to quickly use and few transaction types to test the process.\n\nIntro\n\nClient side signing of transaction is yet another way of interacting with Steem blockchain. Compare to Steemlogin 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.\n\nSteps\n\n\n App setup Import dsteem into app.js and prepare it to communicate with a Testnet instance of Steem blockchain\n Get globals Network globals\n Account selection Select predefined account\n Operation selection Select common operations\n Generate transaction Generate transaction with selected account and operation\n Sign and verify transaction Sign and verify signature of the transaction\n Broadcast transaction Broadcast signed transaction to the network\n\n\n1. App setup\n\nTestnet 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.\n\nopts.addressPrefix = 'TST';\nopts.chainId =\n '46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32';\n//connect to server which is connected to the network/testnet\nconst client = new dsteem.Client('https://testnet.steemitdev.com', opts);\n\n\n\n Disclaimer: In this tutorial we are using testnet powered by community member (@almost-digital) and predefined accounts reside on this network only.\n\n\n2. Get globals\n\nTo 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.\n\n\n\n3. Account selection\n\nWe 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.\n\nprivateKey = dsteem.PrivateKey.fromString(\n document.getElementById('account').value\n);\n\n\nAccount and its credentials should belong to specified testnet/mainnet network to sign/verify/broadcast transactions properly.\n\n4. Operation selection\n\nNumber of operations are also predefined to show you example of operation format. opChange also keeps selected operation name in memory.\n\n5. Generate transaction\n\nNext 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:\n\n\n 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.\n ref_block_prefix - reference buffer of block id of ref_block_num as prefix\n expiration - transaction expiration date in future, in our example we have set it +1 minute into future\n operations - array of operations, this field holds main information about transaction type and its structure which is recognized by the network\n extensions - any extensions to the transaction to change its parameters or options\n\n\nVote operation example\n\nop = {\n ref_block_num: head_block_number,\n ref_block_prefix: Buffer.from(head_block_id, 'hex').readUInt32LE(4),\n expiration: new Date(Date.now() + expireTime).toISOString().slice(0, -5),\n operations: [['vote', {\n voter: account,\n author: 'test',\n permlink: 'test',\n weight: 10000\n }]],\n extensions: [],\n}\n\n\nFirst 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.\n\nAnd output of operation object/json is set to OpInput element.\n\n6. Sign and verify transaction\n\nEach 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.\n\nstx = client.broadcast.sign(op, privateKey)\n\nVerifying 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.\n\nconst rv = await client.database.verifyAuthority(stx)\n\n7. Broadcast transaction\n\nFinal 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.\n\nconst res = await client.broadcast.send(stx)\n\nThat’s it!\n\nTo Run the tutorial\n\n\n clone this repo\n cd tutorials/03_client_signing\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-convert-sbd-to-steem": { + "id": "tutorials-javascript-convert-sbd-to-steem", + "title": "JS: Convert Sbd To Steem", + "category": "tutorials-javascript", + "description": "_How to convert SBD to STEEM for a specified account._", + "type": "", + "url": "/tutorials-javascript/convert_sbd_to_steem", + "content": "Full, runnable src of Convert Sbd To Steem can be downloaded as part of the JS tutorials repository.\n\n\nThis 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.\n\nIt 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.\n\nThere 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\n\nsteemlogin 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.\nhttps://steemlogin.com/sign/convert?owner=username&requestid=1234567&amount=0.000%20SBD\nThis is similar to the steemlogin links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://steemlogin.com/sign\nThis article has more information on using steemlogin\n\nIntro\n\nThis 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:\n\n\n owner - The account for which the conversion is being done\n requestid - Integer identifier for tracking the conversion. This needs to be a unique number for a specified user\n amount - The amount of SBD to withdraw\n\n\nThe only other information required is the private active key of the user.\n\nSteps\n\n\n Configure connection Configuration of dsteem to communicate with a Steem blockchain\n User account User account is captured and balances displayed\n Input variables Collecting the required inputs via an HTML UI\n Broadcast operation Broadcasting the operation to the blockchain\n\n\n1. Configure connection\n\nAs 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:\n\nimport { Client, PrivateKey } from 'dsteem';\nimport { Testnet as NetConfig } from '../../configuration'; //A Steem Testnet. Replace 'Testnet' with 'Mainnet' to connect to the main Steem blockchain.\n\nlet opts = { ...NetConfig.net };\n\n// //connect to a steem node, tesetnet in this case\nconst client = new Client(NetConfig.url, opts);\n\n\nAbove, 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.\n\n2. User account\n\nThe 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.\n\nwindow.onload = async () => {\n const account = NetConfig.accounts[0];\n document.getElementById('username').value = account.address;\n document.getElementById('privateKey').value = account.privActive;\n};\n\n\nWith the account search function as seen below.\n\nwindow.submitAcc = async () => {\n const accSearch = document.getElementById('username').value;\n\n const _account = await client.database.call('get_accounts', [[accSearch]]);\n console.log(`_account:`, _account);\n\n const availSBD = _account[0].sbd_balance \n const availSTEEM = _account[0].balance\n\n const balance = `Available balance: ${availSBD} and ${availSTEEM} <br/>`;\n document.getElementById('accBalance').innerHTML = balance;\n\n //create random number for requestid paramter\n var x = Math.floor(Math.random() * 10000000);\n document.getElementById(\"requestID\").value = x\n}\n\n\n3. Input variables\n\nThe parameters for the convert function are input in the UI and assigned as seen below once the user presses the convert button.\n\n//get all values from the UI\n//get account name\nconst username = document.getElementById('username').value;\n//get private active key\nconst privateKey = PrivateKey.fromString(\n document.getElementById('privateKey').value\n);\n//get convert amount\nconst quantity = document.getElementById('quantity').value;\n//create correct format\nconst convert = quantity.concat(' SBD');\n//assign integer value of ID\nconst requestid = parseInt(document.getElementById('requestID').value);\n\n\n4. Broadcast operation\n\nWith 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.\n\n//create convert operation\nconst op = [\n 'convert',\n { owner: username, amount: convert, requestid: requestid },\n];\n \n//broadcast the conversion\nclient.broadcast.sendOperations([op], privateKey).then(\n function(result) {\n console.log(\n 'included in block: ' + result.block_num,\n 'expired: ' + result.expired\n );\n document.getElementById('convertResultContainer').style.display = 'flex';\n document.getElementById('convertResult').className =\n 'form-control-plaintext alert alert-success';\n document.getElementById('convertResult').innerHTML = 'Success';\n },\n function(error) {\n console.error(error);\n document.getElementById('convertResultContainer').style.display = 'flex';\n document.getElementById('convertResult').className =\n 'form-control-plaintext alert alert-danger';\n document.getElementById('convertResult').innerHTML = error.jse_shortmsg;\n }\n);\n\n\nThe results of the operation is displayed on the UI along with a block number in the console to confirm a successful operation.\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/32_convert_sbd_to_steem\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-create-account": { + "id": "tutorials-javascript-create-account", + "title": "JS: Create Account", + "category": "tutorials-javascript", + "description": "_Create Steem account using Steemlogin as well as with client-side signing._", + "type": "", + "url": "/tutorials-javascript/create_account", + "content": "Full, runnable src of Create Account can be downloaded as part of the JS tutorials repository.\n\n\nThis tutorial will show how to search for a valid account name and then create a new account by means of Resource Credits or STEEM. This tutorial runs on the main Steem blockchain so extra care needs to be taken as any operation will affect real accounts.\n\nIntro\n\nThis tutorial will show few functions such as querying account by name and check if username is taken or available to register. We are using the call function provided by the dsteem library to pull account from the Steem blockchain. We then create proper private keys for new account. A simple HTML interface is used to enter payment of account creation fee and create account right inside tutorial. We use the account_create function to commit the transaction to the blockchain. This function is used to create what is called a “non-discounted account”. This means that the creator account needs to supply the exact account_creation_fee in STEEM in order for the transaction to process successfully. Currently this value is set to 3 STEEM. There is a second method of creating accounts using tokens. These are called “discounted accounts”. In stead of STEEM, the account_creation_fee is paid in RC (resource credits). There are however a limited amount of discounted accounts that can be claimed which is decided upon by the witnesses. This account creation process is done in two steps, first claiming an account and then creating the account.\n\nSteps\n\n\n App setup Setup dsteem to use the proper connection and network.\n Search account Get account details after input has account name\n Generate private keys Generate proper keys for new account\n Create account Create account via Client-side or Steemlogin\n\n\n1. App setup \n\nBelow 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to production server\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n//connect to server which is connected to the network/production\nconst client = new dsteem.Client('https://api.steemit.com');\n\n\n2. Search account \n\nAfter account name field is filled with some name, tutorial has Search button to search for account by name. HTML input forms can be found in the index.html file. The values are pulled from that screen with the below:\n\nconst accSearch = document.getElementById('username').value;\nlet avail = 'Account is NOT available to register';\nif (accSearch.length > 2) {\n const _account = await client.database.call('get_accounts', [\n [accSearch],\n ]);\n console.log(`_account:`, _account, accSearch.length);\n\n if (_account.length == 0) {\n avail = 'Account is available to register';\n }\n}\ndocument.getElementById('accInfo').innerHTML = avail;\n\n\nWe will then do simple check if account is taken or not.\n\n3. Generate private keys \n\nAfter we know that account is available to register, we will fill form with password we wish for that account and enter creation fee. Note, that creation fees are “burned” once the new account is created. The creator account wishes to provide the new account with VEST (as per previous account creation process) they can do so by following the delegate_vesting_shares process (refer tutorial #27). Irrespective of which account creation method is being followed, the process for generating new accounts keys is the same for both.\n\nconst username = document.getElementById('username').value;\nconst password = document.getElementById('password').value;\n\nconst ownerKey = dsteem.PrivateKey.fromLogin(username, password, 'owner');\nconst activeKey = dsteem.PrivateKey.fromLogin(username, password, 'active');\nconst postingKey = dsteem.PrivateKey.fromLogin(username, password, 'posting');\nconst memoKey = dsteem.PrivateKey.fromLogin(\n username,\n password,\n 'memo'\n).createPublic(opts.addressPrefix);\n\nconst ownerAuth = {\n weight_threshold: 1,\n account_auths: [],\n key_auths: [[ownerKey.createPublic(opts.addressPrefix), 1]],\n};\nconst activeAuth = {\n weight_threshold: 1,\n account_auths: [],\n key_auths: [[activeKey.createPublic(opts.addressPrefix), 1]],\n};\nconst postingAuth = {\n weight_threshold: 1,\n account_auths: [],\n key_auths: [[postingKey.createPublic(opts.addressPrefix), 1]],\n};\n\n\nAbove script shows, how to properly setup private keys of new account.\n\n4. Create account \n\nAfter following all steps properly, we can now submit transaction to create new account.\n\n//non-discounted account creation\nconst privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('wif').value\n);\nconst op = [\n 'account_create',\n {\n fee: document.getElementById('steem').value,\n creator: document.getElementById('account').value,\n new_account_name: username,\n owner: ownerAuth,\n active: activeAuth,\n posting: postingAuth,\n memo_key: memoKey,\n json_metadata: '',\n },\n];\n\nclient.broadcast.sendOperations([op], privateKey).then(\n function(result) {\n document.getElementById('result').style.display = 'block';\n document.getElementById(\n 'result'\n ).innerHTML = `<br/><p>Included in block: ${\n result.block_num\n }</p><br/><br/>`;\n },\n function(error) {\n console.error(error);\n }\n);\n\n\nDiscounted account creation uses the same eventual account_create parameters but does not include the optional fee parameter. We also check to see if the creator account has an account_creation_token available already and then skips the first section of claiming this token.\n\n//discounted account creation\n//private active key of creator account\nconst privateKey = dsteem.PrivateKey.fromString(document.getElementById('wif').value);\n\nlet ops = [];\n\n//claim discounted account operation\nconst creator = document.getElementById('account').value\nconst _account = await client.database.call('get_accounts', [\n [creator],\n]);\nconsole.log('current pending claimed accounts: ' + _account[0].pending_claimed_accounts)\nif (_account[0].pending_claimed_accounts == 0) {\n const claim_op = [\n 'claim_account',\n {\n creator: creator,\n fee: '0.000 STEEM',\n extensions: [],\n }\n ];\n console.log('You have claimed a token')\n ops.push(claim_op)\n}\n\n//create operation to transmit\nconst create_op = [\n 'create_claimed_account',\n {\n creator: document.getElementById('account').value,\n new_account_name: username,\n owner: ownerAuth,\n active: activeAuth,\n posting: postingAuth,\n memo_key: memoKey,\n json_metadata: '',\n extensions: []\n },\n];\nops.push(create_op)\n\n//broadcast operation to blockchain\nclient.broadcast.sendOperations(ops, privateKey).then(\n function(result) {\n document.getElementById('result').style.display = 'block';\n document.getElementById(\n 'result'\n ).innerHTML = `<br/><p>Included in block: ${\n result.block_num\n }</p><br/><br/>`;\n },\n function(error) {\n console.error(error);\n }\n);\n\n\nThat’s it!\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/26_create_account\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-delegate-power": { + "id": "tutorials-javascript-delegate-power", + "title": "JS: Delegate Power", + "category": "tutorials-javascript", + "description": "_Delegate power to other users using Steemlogin or Client-side signing._", + "type": "", + "url": "/tutorials-javascript/delegate_power", + "content": "Full, runnable src of Delegate Power can be downloaded as part of the JS tutorials repository.\n\n\nThis tutorial runs on the main Steem blockchain. And accounts queried/searched are real accounts with their available VESTS balances and estimated STEEM POWER holdings.\n\nIntro\n\nThis 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.\n\nSteps\n\n\n App setup Setup dsteem to use the proper connection and network.\n Search account Get account details after input has account name\n Calculate and Fill form Calculate available vesting shares and Fill form with details\n Delegate power Delegate VESTS with Steemlogin or Client-side signing.\n\n\n1. App setup \n\nBelow 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to production server\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n//connect to server which is connected to the network/production\nconst client = new dsteem.Client('https://api.steemit.com');\n\n\n2. Search account \n\nAfter 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:\n\n const accSearch = document.getElementById('username').value;\n const _account = await client.database.call('get_accounts', [[accSearch]]);\n console.log(`_account:`, _account);\n\n\n3. Calculate and Fill form \n\nAfter 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.\n\n const name = _account[0].name;\n const avail = parseFloat(_account[0].vesting_shares) - (parseFloat(_account[0].to_withdraw) - parseFloat(_account[0].withdrawn)) / 1e6 - parseFloat(_account[0].delegated_vesting_shares);\n\n const props = await client.database.getDynamicGlobalProperties();\n const vestSteem = parseFloat(parseFloat(props.total_vesting_fund_steem) *\n (parseFloat(avail) / parseFloat(props.total_vesting_shares)),6);\n\n const balance = `Available Vests for ${name}: ${avail} VESTS ~ ${vestSteem} STEEM POWER<br/><br/>`;\n document.getElementById('accBalance').innerHTML = balance;\n document.getElementById('steem').value = avail+' VESTS';\n\n\nOnce form is filled with maximum available VESTS balance, you can choose portion or lesser amount of VESTS to delegate other user.\n\n4. Delegate power \n\nWe have 2 options on how to delegate others. Steemlogin and Client-side signing options. By default we generate Steemlogin 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.\n\nIn order to enable client signing, we will generate operation and also show Active Private key (wif) field to sign transaction client side.\nBelow 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.\n\nwindow.submitTx = async () => {\n const privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('wif').value\n );\n const op = [\n 'delegate_vesting_shares',\n {\n delegator: document.getElementById('username').value,\n delegatee: document.getElementById('account').value,\n vesting_shares: document.getElementById('steem').value,\n },\n ];\n client.broadcast.sendOperations([op], privateKey).then(\n function(result) {\n document.getElementById('result').style.display = 'block';\n document.getElementById(\n 'result'\n ).innerHTML = `<br/><p>Included in block: ${\n result.block_num\n }</p><br/><br/>`;\n },\n function(error) {\n console.error(error);\n }\n );\n};\n\n\nThat’s it!\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/25_delegate_power\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-edit-content-patching": { + "id": "tutorials-javascript-edit-content-patching", + "title": "JS: Edit Content Patching", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you should know how to patch post edits to Steem._", + "type": "", + "url": "/tutorials-javascript/edit_content_patching", + "content": "Full, runnable src of Edit Content Patching can be downloaded as part of the JS tutorials repository.\n\n\nThis 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.\n\nIntro\n\nTutorial 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.\n\nNote 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.\n\nWe 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.\n\nSteps\n\n\n Configure testnet Testnet connection should be established with proper configurations\n Get latest post Get @demo’s latest post for editing\n Creating patch Creating patch with new edited text\n Submit a patch Submit newly formatted post\n\n\n1. Configure testnet\n\nAs 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to community testnet\nopts.addressPrefix = 'STX';\nopts.chainId =\n '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673';\n//connect to server which is connected to the network/testnet\nconst client = new dsteem.Client('https://testnet.steem.vc', opts);\n\n\nAbove, 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.\n\n2. Get latest post\n\nNext, 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.\n\nconst query = { tag: 'demo', limit: '1' };\nclient.database\n .call('get_discussions_by_blog', [query])\n .then(result => {\n document.getElementById('title').value = result[0].title;\n document.getElementById('body').value = result[0].body;\n document.getElementById('tags').value = JSON.parse(\n result[0].json_metadata\n ).tags.join(' ');\n o_body = result[0].body;\n o_permlink = result[0].permlink;\n })\n .catch(err => {\n console.log(err);\n alert('Error occured, please reload the page');\n });\n\n\nNotice, we are only fetching a single blog post by specifying a limit and we have filled all necessary fields/variables with the old content.\n\n3. Creating patch\n\nWe have created a small function called createPatch to patch edits to the old content.\n\nfunction createPatch(text, out) {\n if (!text && text === '') return undefined;\n //get list of patches to turn text to out\n const patch_make = dmp.patch_make(text, out);\n //turns patch to text\n const patch = dmp.patch_toText(patch_make);\n return patch;\n}\n\n\nThe createPatch function computes a list of patches to turn old content to edited content.\n\n4. Submit a patch\n\nNext, we have the submitPost function, which executes when the Submit button is clicked.\n\n//get private key\nconst privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('postingKey').value\n);\n//get account name\nconst account = document.getElementById('username').value;\n//get title\nconst title = document.getElementById('title').value;\n//get body\nconst edited_body = document.getElementById('body').value;\n\nlet body = '';\n\n//computes a list of patches to turn o_body to edited_body\nconst patch = createPatch(o_body, edited_body);\n\n//check if patch size is smaller than original content\nif (patch && patch.length < new Buffer(o_body, 'utf-8').length) {\n body = patch;\n} else {\n body = o_body;\n}\n\n//get tags and convert to array list\nconst tags = document.getElementById('tags').value;\nconst taglist = tags.split(' ');\n//make simple json metadata including only tags\nconst json_metadata = JSON.stringify({ tags: taglist });\n//generate random permanent link for post\nconst permlink = o_permlink;\n\nclient.broadcast\n .comment(\n {\n author: account,\n body: body,\n json_metadata: json_metadata,\n parent_author: '',\n parent_permlink: taglist[0],\n permlink: permlink,\n title: title,\n },\n privateKey\n )\n .then(\n function(result) {\n document.getElementById('title').value = '';\n document.getElementById('body').value = '';\n document.getElementById('tags').value = '';\n document.getElementById('postLink').style.display = 'block';\n document.getElementById(\n 'postLink'\n ).innerHTML = `<br/><p>Included in block: ${\n result.block_num\n }</p><br/><br/><a href=\"http://condenser.steem.vc/${\n taglist[0]\n }/@${account}/${permlink}\">Check post here</a>`;\n },\n function(error) {\n console.error(error);\n }\n );\n\n\nAs 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.\n\nIn 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.\n\n//computes a list of patches to turn o_body to edited_body\nconst patch = createPatch(o_body, edited_body);\n\n//check if patch size is smaller than edited content itself\nif (patch && patch.length < new Buffer(edited_body, 'utf-8').length) {\n body = patch;\n} else {\n body = edited_body;\n}\n\n\nThe 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.\n\nAfter 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!\n\nTo Run the tutorial\n\n\n clone this repo\n cd tutorials/12_edit_content_patching\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-follow-a-user": { + "id": "tutorials-javascript-follow-a-user", + "title": "JS: Follow A User", + "category": "tutorials-javascript", + "description": "_Follow and unfollow a user / author._", + "type": "", + "url": "/tutorials-javascript/follow_a_user", + "content": "Full, runnable src of Follow A User can be downloaded as part of the JS tutorials repository.\n\n\nThis 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.\n\nIntro\n\nWe 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:\n\n\n follower - The specific user that will select the author to follow/unfollow (username).\n privatekey - This is the private posting key of the user(postingKey).\n following - The account/author that the user would like to follow (author).\n 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.\n\n\nA simple HTML UI is used to capture the required information, after which the broadcast operation can be compiled.\n\nSteps\n\n\n Configure connection Configuration of dsteem to communicate with the Steem blockchain\n Input variables Collecting the required inputs via an HTML UI\n Get status Get the follow status for the specified author\n Follow operation Execute the follow operation\n\n\n1. Configure connection\n\nAs 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:\n\nimport { Client, PrivateKey } from 'dsteem';\nimport { Testnet as NetConfig } from '../../configuration'; //A Steem Testnet. Replace 'Testnet' with 'Mainnet' to connect to the main Steem blockchain.\n\nlet opts = { ...NetConfig.net };\n\n//connect to a steem node, testnet in this case\nconst client = new Client(NetConfig.url, opts);\n\n\nAbove, 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.\n\nwindow.onload = async () => {\n const account = NetConfig.accounts[0];\n const accountI = NetConfig.accounts[1];\n document.getElementById('username').value = account.address;\n document.getElementById('postingKey').value = account.privPosting;\n document.getElementById('author').value = accountI.address;\n};\n\n\n2. Input variables\n\nThe required parameters for the follow operation is recorded via an HTML UI that can be found in the public/index.html file.\n\nThe parameter values are allocated as seen below once the user clicks on the “Follow / Unfollow” button.\n\nwindow.submitFollow = async () => {\n //get private key\n const privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('postingKey').value\n );\n //get account name\n const follower = document.getElementById('username').value;\n //get author permalink\n const following = document.getElementById('author').value;\n\n\n3. Get status\n\nThe 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.\n\nconsole.log({ follower: follower, following: following });\n\n let status = await client.call('follow_api', 'get_following', [\n follower,\n following,\n 'blog',\n 1,\n ]);\n\n console.log({ status: status });\n\n if (status.length > 0 && status[0].following == following) {\n type = '';\n } else {\n type = 'blog';\n }\n\n\n4. Follow operation\n\nA JSON with the collected input variables is created in order for the data object within the broadcast operation to be completed.\n\nconst json = JSON.stringify([\n 'follow',\n {\n follower: follower,\n following: following,\n what: [type], //null value for unfollow, 'blog' for follow\n },\n]);\n\n\nThe 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.\n\nconst data = {\n id: 'follow',\n json: json,\n required_auths: [],\n required_posting_auths: [follower],\n};\n\n\nThe 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.\n\nclient.broadcast.json(data, privateKey).then(\n function(result) {\n console.log('user follow result: ', result);\n document.getElementById('followResultContainer').style.display = 'flex';\n document.getElementById('followResult').className =\n 'form-control-plaintext alert alert-success';\n if (type == 'blog') {\n document.getElementById('followResult').innerHTML =\n 'Author followed';\n } else {\n document.getElementById('followResult').innerHTML =\n 'Author unfollowed';\n }\n },\n function(error) {\n console.error(error);\n document.getElementById('followResultContainer').style.display = 'flex';\n document.getElementById('followResult').className =\n 'form-control-plaintext alert alert-danger';\n document.getElementById('followResult').innerHTML = error.jse_shortmsg;\n }\n);\n\n\nIf 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.\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/18_follow_user\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-get-account-comments": { + "id": "tutorials-javascript-get-account-comments", + "title": "JS: Get Account Comments", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you should know how to retrieve account comments from the steem blockchain_", + "type": "", + "url": "/tutorials-javascript/get_account_comments", + "content": "Full, runnable src of Get Account Comments can be downloaded as part of the JS tutorials repository.\n\n\nThis tutorial will show how to fetch comments made by a specific account (in this case @steemitblog) by demonstrating how to use the get_state api function call. We will also demonstrate the most commonly used fields from the response object as well as how to parse the body of each comment.\n\nIntro\n\nWe are using the get_state function with dsteem that returns the current state of the network as well as additional content. Each content body is written in markdown and could be submitted to the blockchain by many different applications built on top of Steem. For that reason we are using the remarkable npm package to parse markdown in a readable format.\n\nSteps\n\n\n App setup Configuration of dsteem to use the proper connection and network.\n Query Query the path which we want to extract from Steem blockchain state.\n Formatting Formatting the JSON object to be viewed in a simple user interface.\n\n\n1. App setup\n\nBelow we have dsteem pointing to the main network with the proper chainId, addressPrefix and connection server.\nThere is a public/app.js file which holds the Javascript segment of this tutorial. In the first few lines we define and configure library and packages.\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to production server\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n//connect to server which is connected to the network/production\nconst client = new dsteem.Client('https://api.steemit.com');\n\nconst Remarkable = require('remarkable');\nconst md = new Remarkable({ html: true, linkify: true });\n\n\nremarkable is assigned to the variable md with linkify and html options, allowing us to parse markdown links and html properly.\n\n2. Query\n\nNext, we have the main function which runs when the page is loaded.\n\n// query string, fetching comments made by @steemitblog account\nconst query = '/@steemitblog/comments';\n\nclient.database.call('get_state', [query]).then(result => {\n // work with state object\n});\n\n\nquery is the path from where want to extract Steem blockchain state. In our example we are querying comments from the @steemitblog account. The result will be the current state object with various information as well as the content property holding the content of the query.\n\nThe following is an example of the returned object:\n\n{\n \"current_route\":\"/@steemitblog/comments\",\n \"props\":{\n \"head_block_number\":22307429,\n \"head_block_id\":\"01546265c9dc3e761add4c4b652743e3c640fa19\",\n \"time\":\"2018-05-10T12:15:30\",\n \"current_witness\":\"smooth.witness\",\n \"total_pow\":514415,\n \"num_pow_witnesses\":172,\n \"virtual_supply\":\"271970374.699 STEEM\",\n \"current_supply\":\"268140818.508 STEEM\",\n \"confidential_supply\":\"0.000 STEEM\",\n \"current_sbd_supply\":\"13342173.771 SBD\",\n \"confidential_sbd_supply\":\"0.000 SBD\",\n \"total_vesting_fund_steem\":\"191002132.498 STEEM\",\n \"total_vesting_shares\":\"388786707656.308148 VESTS\",\n \"total_reward_fund_steem\":\"0.000 STEEM\",\n \"total_reward_shares2\":\"0\",\n \"pending_rewarded_vesting_shares\":\"366359809.533218 VESTS\",\n \"pending_rewarded_vesting_steem\":\"178575.754 STEEM\",\n \"sbd_interest_rate\":0,\n \"sbd_print_rate\":10000,\n \"maximum_block_size\":65536,\n \"current_aslot\":22373110,\n \"recent_slots_filled\":\"340282366920938463463374607431768211455\",\n \"participation_count\":128,\n \"last_irreversible_block_num\":22307411,\n \"vote_power_reserve_rate\":10,\n \"average_block_size\":14881,\n \"current_reserve_ratio\":200000000,\n \"max_virtual_bandwidth\":\"264241152000000000000\"\n },\n \"tag_idx\":{\n \"trending\":[\"\",\"life\",\"photography\",\"steemit\",\"kr\",\"introduceyourself\",\"bitcoin\",\"art\",\"travel\",\"cryptocurrency\",\"spanish\",\"food\",\"steem\",\"blog\",\"funny\",\"news\",\"nature\",\"colorchallenge\",\"dtube\",\"indonesia\",\"story\",\"cn\",\"money\",\"music\",\"writing\",\"crypto\",\"contest\",\"busy\",\"health\",\"poetry\",\"meme\",\"video\",\"utopian-io\",\"photo\",\"new\",\"love\",\"blockchain\",\"deutsch\",\"dmania\",\"science\",\"technology\",\"aceh\",\"entertainment\",\"gaming\",\"politics\",\"myanmar\",\"esteem\",\"sports\",\"fun\",\"tr\"]\n },\n \"tags\":{},\n \"content\":{\n \"steemitblog/afm007-re-steemitblog-devportal-update-3-ux-improvements-more-javascript-tutorials-and-more-20180509t050215510z\":{\n \"id\":47669989,\n \"author\":\"steemitblog\",\n \"permlink\":\"afm007-re-steemitblog-devportal-update-3-ux-improvements-more-javascript-tutorials-and-more-20180509t050215510z\",\n \"category\":\"steem\",\n \"parent_author\":\"afm007\",\n \"parent_permlink\":\"devportal-update-3-ux-improvements-more-javascript-tutorials-and-more\",\"title\":\"\",\"body\":\"I want to learn the Python language.\",\n \"json_metadata\":\"{''}\",\n \"last_update\":\"2018-05-09T05:02:15\",\n \"created\":\"2018-05-09T05:02:15\",\n \"active\":\"2018-05-09T05:02:15\",\n \"last_payout\":\"1970-01-01T00:00:00\",\n \"depth\":1,\n \"children\":0,\n \"net_rshares\":1057692008,\n \"abs_rshares\":1057692008,\n \"vote_rshares\":1057692008,\n \"children_abs_rshares\":0,\n \"cashout_time\":\"2018-05-16T05:02:15\",\n \"max_cashout_time\":\"1969-12-31T23:59:59\",\n \"total_vote_weight\":32523,\n \"reward_weight\":10000,\n \"total_payout_value\":\"0.000 SBD\",\n \"curator_payout_value\":\"0.000 SBD\",\n \"author_rewards\":0,\n \"net_votes\":1,\n \"root_author\":\"steemitblog\",\n \"root_permlink\":\"devportal-update-3-ux-improvements-more-javascript-tutorials-and-more\",\n \"max_accepted_payout\":\"1000000.000 SBD\",\n \"percent_steem_dollars\":10000,\n \"allow_replies\":true,\n \"allow_votes\":true,\n \"allow_curation_rewards\":true,\n \"beneficiaries\":[],\n \"url\":\"/steem/@steemitblog/devportal-update-3-ux-improvements-more-javascript-tutorials-and-more#@afm007/afm007-re-steemitblog-devportal-update-3-ux-improvements-more-javascript-tutorials-and-more-20180509t050215510z\",\n \"root_title\":\"DevPortal Update #3: UX Improvements, More Javascript Tutorials and More!\",\n \"pending_payout_value\":\"0.005 SBD\",\n \"total_pending_payout_value\":\"0.000 STEEM\",\n \"active_votes\":[{\"voter\":\"afm007\",\"weight\":17182,\"rshares\":1057692008,\"percent\":10000,\"reputation\":\"855556264424\",\"time\":\"2018-05-09T05:18:06\"}],\n \"replies\":[],\n \"author_reputation\":\"855556264424\",\n \"promoted\":\"0.000 SBD\",\n \"body_length\":0,\n \"reblogged_by\":[]\n },\n \"steemitblog/re-steemitblog-devportal-update-3-ux-improvements-more-javascript-tutorials-and-more-20180509t045305223z\":{\n \"id\":47669080,\n \"author\":\"steemitblog\",\n \"permlink\":\"re-steemitblog-devportal-update-3-ux-improvements-more-javascript-tutorials-and-more-20180509t045305223z\",\n \"category\":\"steem\",\n \"parent_author\":\"andreina89\",\n \"parent_permlink\":\"devportal-update-3-ux-improvements-more-javascript-tutorials-and-more\",\n \"title\":\"\",\n \"body\":\"Excellent post very interesting friend, thanks\",\n \"json_metadata\":\"{\\\"tags\\\":[\\\"steem\\\"],\\\"app\\\":\\\"steemit/0.1\\\"}\",\n \"last_update\":\"2018-05-09T04:53:21\",\n \"created\":\"2018-05-09T04:53:21\",\n \"active\":\"2018-05-09T04:53:27\",\n \"last_payout\":\"1970-01-01T00:00:00\",\n \"depth\":1,\n \"children\":1,\n \"net_rshares\":0,\n \"abs_rshares\":0,\n \"vote_rshares\":0,\n \"children_abs_rshares\":0,\n \"cashout_time\":\"2018-05-16T04:53:21\",\n \"max_cashout_time\":\"1969-12-31T23:59:59\",\n \"total_vote_weight\":0,\n \"reward_weight\":10000,\n \"total_payout_value\":\"0.000 SBD\",\n \"curator_payout_value\":\"0.000 SBD\",\n \"author_rewards\":0,\n \"net_votes\":0,\n \"root_author\":\"steemitblog\",\n \"root_permlink\":\"devportal-update-3-ux-improvements-more-javascript-tutorials-and-more\",\n \"max_accepted_payout\":\"1000000.000 SBD\",\n \"percent_steem_dollars\":10000,\n \"allow_replies\":true,\n \"allow_votes\":true,\n \"allow_curation_rewards\":true,\n \"beneficiaries\":[],\n \"url\":\"/steem/@steemitblog/devportal-update-3-ux-improvements-more-javascript-tutorials-and-more#@andreina89/re-steemitblog-devportal-update-3-ux-improvements-more-javascript-tutorials-and-more-20180509t045305223z\",\n \"root_title\":\"DevPortal Update #3: UX Improvements, More Javascript Tutorials and More!\",\n \"pending_payout_value\":\"0.000 SBD\",\n \"total_pending_payout_value\":\"0.000 STEEM\",\n \"active_votes\":[],\n \"replies\":[],\n \"author_reputation\":\"174938588721\",\n \"promoted\":\"0.000 SBD\",\n \"body_length\":0,\"reblogged_by\":[]\n },\n {\"etc.\":\"etc.\"}\n },\n \"accounts\":{\n \"steemitblog:{\n \"etc.\":\"etc.\"\n },\n },\n \"witnesses\":{},\n \"discussion_idx\":{},\n \"witness_schedule\":{\n \"id\":0,\n \"current_virtual_time\":\"326078326927286190874576091\",\n \"next_shuffle_block_num\":22307439,\n \"current_shuffled_witnesses\":[\"furion\",\"someguy123\",\"good-karma\",\"blocktrades\",\"smooth.witness\"],\n \"num_scheduled_witnesses\":21,\n \"top19_weight\":1,\n \"timeshare_weight\":5,\n \"miner_weight\":1,\n \"witness_pay_normalization_factor\":25,\n \"median_props\":{\n \"account_creation_fee\":\"0.100 STEEM\",\n \"maximum_block_size\":65536,\n \"sbd_interest_rate\":0\n },\n \"majority_version\":\"0.19.3\",\n \"max_voted_witnesses\":20,\n \"max_miner_witnesses\":0,\n \"max_runner_witnesses\":1,\n \"hardfork_required_witnesses\":17\n },\n \"feed_price\":{\n \"base\":\"3.484 SBD\",\n \"quote\":\"1.000 STEEM\"\n },\n \"error\":\"\"\n}\n\n\n3. Formatting\n\nNext we will format the above object properly to view in a simple user interface. From the above object, we are only interested in the content object which holds the data we require.\n\nif (\n !(\n Object.keys(result.content).length === 0 &&\n result.content.constructor === Object\n )\n) {\n var comments = [];\n Object.keys(result.content).forEach(key => {\n const comment = result.content[key];\n const parent_author = comment.parent_author;\n const parent_permlink = comment.parent_permlink;\n const created = new Date(comment.created).toDateString();\n const body = md.render(comment.body);\n const netvotes = comment.net_votes;\n comments.push(\n `<div class=\"list-group-item list-group-item-action flex-column align-items-start\">\\\n <div class=\"d-flex w-100 justify-content-between\">\\\n <h6 class=\"mb-1\">@${comment.author}</h6>\\\n <small class=\"text-muted\">${created}</small>\\\n </div>\\\n <p class=\"mb-1\">${body}</p>\\\n <small class=\"text-muted\">&#9650; ${netvotes}, Replied to: @${parent_author}/${parent_permlink}</small>\\\n </div>`\n );\n });\n document.getElementById('comments').style.display = 'block';\n document.getElementById('comments').innerHTML = comments.join('');\n}\n\n\nWe first check if content is not an empty object. We then iterate through each object in content and extract:\n\n\n parent_author\n parent_permlink\n and the post or comment the @steemitblog account is replying to\n\n\nWe format created date and time, parse body markdown and get net_votes on that comment.\nEach line is then pushed and displayed separately.\n\nTo Run the tutorial\n\n\n clone this repo\n cd tutorials/09_get_account_comments\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-get-account-replies": { + "id": "tutorials-javascript-get-account-replies", + "title": "JS: Get Account Replies", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you would know how to get replies made on particular account's content._", + "type": "", + "url": "/tutorials-javascript/get_account_replies", + "content": "Full, runnable src of Get Account Replies can be downloaded as part of the JS tutorials repository.\n\n\nThe purpose of this tutorial is How to get account replies and a) demonstrate how to use get_state api function call, and b) fetch recent replies for the content of specific account, in this case @steemitblog.\n\nWe focus on listing part of the content with simply UI as well as explain the most commonly used fields from the response object as well as parse body of each comment.\n\nIntro\n\nWe are using get_state function with dsteem, which is straight-forward and this function returns current state of the network as well as additional content given proper query. Each content body, as we described in previous tutorials, is written markdown and submitted to the blockchain by many applications built on top of Steem. For that reason we are using remarkable npm package to parse markdown in a readable format.\n\nSteps\n\n\n App setup Setup app packages\n Query result Form a proper query and retrieve result\n Display replies Parse and display result in user interface\n\n\n1. App setup\n\nAs usual, we have public/app.js file which holds the javascript part of the tutorial. In first few lines we define, configure library and packages.\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to production server\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n//connect to server which is connected to the network/production\nconst client = new dsteem.Client('https://api.steemit.com');\n\nconst Remarkable = require('remarkable');\nconst md = new Remarkable({ html: true, linkify: true });\n\n\ndsteem is pointing to the main network and proper chain_id, addressPrefix and connection server.\nremarkable is assigned to md variable with linkify and html options, allowing markdown parsing links and html properly.\n\n2. Query result\n\nNext, we have main function which fires when page is loaded.\n\n// query string, fetching recent replies for @steemitblog account\nconst query = '/@steemitblog/recent-replies';\n\nclient.database.call('get_state', [query]).then(result => {\n // work with state object\n});\n\n\nQuery is the path which we want to extract from Steem blockchain state. In our example we are using @steemitblog account and recent-replies to its content. Result will be current state object with various information as well as content object property holding content of the query.\n\nFollowing is example of returned object:\n\n{\n \"current_route\":\"/@steemitblog/recent-replies\",\n \"props\":{\n \"head_block_number\":22307429,\n \"head_block_id\":\"01546265c9dc3e761add4c4b652743e3c640fa19\",\n \"time\":\"2018-05-10T12:15:30\",\n \"current_witness\":\"smooth.witness\",\n \"total_pow\":514415,\n \"num_pow_witnesses\":172,\n \"virtual_supply\":\"271970374.699 STEEM\",\n \"current_supply\":\"268140818.508 STEEM\",\n \"confidential_supply\":\"0.000 STEEM\",\n \"current_sbd_supply\":\"13342173.771 SBD\",\n \"confidential_sbd_supply\":\"0.000 SBD\",\n \"total_vesting_fund_steem\":\"191002132.498 STEEM\",\n \"total_vesting_shares\":\"388786707656.308148 VESTS\",\n \"total_reward_fund_steem\":\"0.000 STEEM\",\n \"total_reward_shares2\":\"0\",\n \"pending_rewarded_vesting_shares\":\"366359809.533218 VESTS\",\n \"pending_rewarded_vesting_steem\":\"178575.754 STEEM\",\n \"sbd_interest_rate\":0,\n \"sbd_print_rate\":10000,\n \"maximum_block_size\":65536,\n \"current_aslot\":22373110,\n \"recent_slots_filled\":\"340282366920938463463374607431768211455\",\n \"participation_count\":128,\n \"last_irreversible_block_num\":22307411,\n \"vote_power_reserve_rate\":10,\n \"average_block_size\":14881,\n \"current_reserve_ratio\":200000000,\n \"max_virtual_bandwidth\":\"264241152000000000000\"\n },\n \"tag_idx\":{\n \"trending\":[\"\",\"life\",\"photography\",\"steemit\",\"kr\",\"introduceyourself\",\"bitcoin\",\"art\",\"travel\",\"cryptocurrency\",\"spanish\",\"food\",\"steem\",\"blog\",\"funny\",\"news\",\"nature\",\"colorchallenge\",\"dtube\",\"indonesia\",\"story\",\"cn\",\"money\",\"music\",\"writing\",\"crypto\",\"contest\",\"busy\",\"health\",\"poetry\",\"meme\",\"video\",\"utopian-io\",\"photo\",\"new\",\"love\",\"blockchain\",\"deutsch\",\"dmania\",\"science\",\"technology\",\"aceh\",\"entertainment\",\"gaming\",\"politics\",\"myanmar\",\"esteem\",\"sports\",\"fun\",\"tr\"]\n },\n \"tags\":{},\n \"content\":{\n \"afm007/afm007-re-steemitblog-devportal-update-3-ux-improvements-more-javascript-tutorials-and-more-20180509t050215510z\":{\n \"id\":47669989,\n \"author\":\"afm007\",\n \"permlink\":\"afm007-re-steemitblog-devportal-update-3-ux-improvements-more-javascript-tutorials-and-more-20180509t050215510z\",\n \"category\":\"steem\",\n \"parent_author\":\"steemitblog\",\n \"parent_permlink\":\"devportal-update-3-ux-improvements-more-javascript-tutorials-and-more\",\"title\":\"\",\"body\":\"I want to learn the Python language.\",\n \"json_metadata\":\"{''}\",\n \"last_update\":\"2018-05-09T05:02:15\",\n \"created\":\"2018-05-09T05:02:15\",\n \"active\":\"2018-05-09T05:02:15\",\n \"last_payout\":\"1970-01-01T00:00:00\",\n \"depth\":1,\n \"children\":0,\n \"net_rshares\":1057692008,\n \"abs_rshares\":1057692008,\n \"vote_rshares\":1057692008,\n \"children_abs_rshares\":0,\n \"cashout_time\":\"2018-05-16T05:02:15\",\n \"max_cashout_time\":\"1969-12-31T23:59:59\",\n \"total_vote_weight\":32523,\n \"reward_weight\":10000,\n \"total_payout_value\":\"0.000 SBD\",\n \"curator_payout_value\":\"0.000 SBD\",\n \"author_rewards\":0,\n \"net_votes\":1,\n \"root_author\":\"steemitblog\",\n \"root_permlink\":\"devportal-update-3-ux-improvements-more-javascript-tutorials-and-more\",\n \"max_accepted_payout\":\"1000000.000 SBD\",\n \"percent_steem_dollars\":10000,\n \"allow_replies\":true,\n \"allow_votes\":true,\n \"allow_curation_rewards\":true,\n \"beneficiaries\":[],\n \"url\":\"/steem/@steemitblog/devportal-update-3-ux-improvements-more-javascript-tutorials-and-more#@afm007/afm007-re-steemitblog-devportal-update-3-ux-improvements-more-javascript-tutorials-and-more-20180509t050215510z\",\n \"root_title\":\"DevPortal Update #3: UX Improvements, More Javascript Tutorials and More!\",\n \"pending_payout_value\":\"0.005 SBD\",\n \"total_pending_payout_value\":\"0.000 STEEM\",\n \"active_votes\":[{\"voter\":\"afm007\",\"weight\":17182,\"rshares\":1057692008,\"percent\":10000,\"reputation\":\"855556264424\",\"time\":\"2018-05-09T05:18:06\"}],\n \"replies\":[],\n \"author_reputation\":\"855556264424\",\n \"promoted\":\"0.000 SBD\",\n \"body_length\":0,\n \"reblogged_by\":[]\n },\n \"andreina89/re-steemitblog-devportal-update-3-ux-improvements-more-javascript-tutorials-and-more-20180509t045305223z\":{\n \"id\":47669080,\n \"author\":\"andreina89\",\n \"permlink\":\"re-steemitblog-devportal-update-3-ux-improvements-more-javascript-tutorials-and-more-20180509t045305223z\",\n \"category\":\"steem\",\n \"parent_author\":\"steemitblog\",\n \"parent_permlink\":\"devportal-update-3-ux-improvements-more-javascript-tutorials-and-more\",\n \"title\":\"\",\n \"body\":\"Excellent post very interesting friend, thanks\",\n \"json_metadata\":\"{\\\"tags\\\":[\\\"steem\\\"],\\\"app\\\":\\\"steemit/0.1\\\"}\",\n \"last_update\":\"2018-05-09T04:53:21\",\n \"created\":\"2018-05-09T04:53:21\",\n \"active\":\"2018-05-09T04:53:27\",\n \"last_payout\":\"1970-01-01T00:00:00\",\n \"depth\":1,\n \"children\":1,\n \"net_rshares\":0,\n \"abs_rshares\":0,\n \"vote_rshares\":0,\n \"children_abs_rshares\":0,\n \"cashout_time\":\"2018-05-16T04:53:21\",\n \"max_cashout_time\":\"1969-12-31T23:59:59\",\n \"total_vote_weight\":0,\n \"reward_weight\":10000,\n \"total_payout_value\":\"0.000 SBD\",\n \"curator_payout_value\":\"0.000 SBD\",\n \"author_rewards\":0,\n \"net_votes\":0,\n \"root_author\":\"steemitblog\",\n \"root_permlink\":\"devportal-update-3-ux-improvements-more-javascript-tutorials-and-more\",\n \"max_accepted_payout\":\"1000000.000 SBD\",\n \"percent_steem_dollars\":10000,\n \"allow_replies\":true,\n \"allow_votes\":true,\n \"allow_curation_rewards\":true,\n \"beneficiaries\":[],\n \"url\":\"/steem/@steemitblog/devportal-update-3-ux-improvements-more-javascript-tutorials-and-more#@andreina89/re-steemitblog-devportal-update-3-ux-improvements-more-javascript-tutorials-and-more-20180509t045305223z\",\n \"root_title\":\"DevPortal Update #3: UX Improvements, More Javascript Tutorials and More!\",\n \"pending_payout_value\":\"0.000 SBD\",\n \"total_pending_payout_value\":\"0.000 STEEM\",\n \"active_votes\":[],\n \"replies\":[],\n \"author_reputation\":\"174938588721\",\n \"promoted\":\"0.000 SBD\",\n \"body_length\":0,\"reblogged_by\":[]\n },\n {\"etc.\":\"etc.\"}\n },\n \"accounts\":{\n \"afm007/afm007-re-steemitblog-devportal-update-3-ux-improvements-more-javascript-tutorials-and-more-20180509t050215510z\":{\n {\"etc.\":\"etc.\"}\n },\n },\n \"witnesses\":{},\n \"discussion_idx\":{},\n \"witness_schedule\":{\n \"id\":0,\n \"current_virtual_time\":\"326078326927286190874576091\",\n \"next_shuffle_block_num\":22307439,\n \"current_shuffled_witnesses\":[\"furion\",\"someguy123\",\"good-karma\",\"blocktrades\",\"smooth.witness\"],\n \"num_scheduled_witnesses\":21,\n \"top19_weight\":1,\n \"timeshare_weight\":5,\n \"miner_weight\":1,\n \"witness_pay_normalization_factor\":25,\n \"median_props\":{\n \"account_creation_fee\":\"0.100 STEEM\",\n \"maximum_block_size\":65536,\n \"sbd_interest_rate\":0\n },\n \"majority_version\":\"0.19.3\",\n \"max_voted_witnesses\":20,\n \"max_miner_witnesses\":0,\n \"max_runner_witnesses\":1,\n \"hardfork_required_witnesses\":17\n },\n \"feed_price\":{\n \"base\":\"3.484 SBD\",\n \"quote\":\"1.000 STEEM\"\n },\n \"error\":\"\"\n}\n\n\n3. Display replies\n\nNext we will format above object properly in simple user interface. From above object, we are only interested in content object which holds the data we queried.\n\nif (\n !(\n Object.keys(result.content).length === 0 &&\n result.content.constructor === Object\n )\n) {\n var replies = [];\n Object.keys(result.content).forEach(key => {\n const reply = result.content[key];\n const author = reply.author;\n const created = new Date(reply.created).toDateString();\n const body = md.render(reply.body);\n const netvotes = reply.net_votes;\n replies.push(\n `<div class=\"list-group-item list-group-item-action flex-column align-items-start\">\\\n <div class=\"d-flex w-100 justify-content-between\">\\\n <h5 class=\"mb-1\">@${author}</h5>\\\n <small class=\"text-muted\">${created}</small>\\\n </div>\\\n <p class=\"mb-1\">${body}</p>\\\n <small class=\"text-muted\">&#9650; ${netvotes}</small>\\\n </div>`\n );\n });\n document.getElementById('replies').style.display = 'block';\n document.getElementById('replies').innerHTML = replies.join('');\n}\n\n\nWe check if content is not an empty object and we iterate through each object via its key and extract, author, format created date and time, parse body markdown, get net_votes on that reply. Pushing each list item separately and displaying it. That’s it!\n\nTo Run the tutorial\n\n\n clone this repo\n cd tutorials/08_get_account_replies\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-get-delegations-by-user": { + "id": "tutorials-javascript-get-delegations-by-user", + "title": "JS: Get Delegations By User", + "category": "tutorials-javascript", + "description": "_View the vesting delegations made by a user as well as the delegations that are expiring._", + "type": "", + "url": "/tutorials-javascript/get_delegations_by_user", + "content": "Full, runnable src of Get Delegations By User can be downloaded as part of the JS tutorials repository.\n\n\nThis 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.\n\nIntro\n\nThis 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:\n\n\n account - The username for which the query is done\n from - The value from where to start the search. This can be used for paging. This parameter is optional\n limit - The quantity of results that is queried from the blockchain. This parameter is optional\n\n\nThe second function is getExpiringVestingDelegations with parameters:\n\n\n user - The account that the query is referencing\n 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\n limit - The quantity of results that is queried from the blockchain\n\n\nSteps\n\n\n Configure connection Configuration of dsteem to communicate with a Steem blockchain\n Input variables Collecting the required inputs via an HTML UI\n Database query Sending a query to the blockchain for the user delegations\n Display results Display the results of the blockchain query\n\n\n1. Configure connection\n\nAs 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//define network parameters\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n//connect to a steem node, production in this case\nconst client = new dsteem.Client('https://api.steemit.com');\n\n\nAbove, we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint.\n\n2. Input variables\n\nThe 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.\n\nBoth 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.\n\n//active delegations function\nwindow.createList = async () => {\n //clear list\n document.getElementById('delegationList').innerHTML = '';\n\n //get username\n const delegator = document.getElementById('username').value;\n\n\n3. Database query\n\nThe 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.\n\n//active delegations function\ndelegationdata = await client.database.getVestingDelegations(delegator, \"\", 100);\n console.log(JSON.stringify(delegationdata));\n\n\n//expiring delegations function\nconst delegationdata = await client.database.call('get_expiring_vesting_delegations',[delegator, \"2018-01-01T00:00:00\", 100]);\n console.log(delegationdata);\n\n\n4. Display results\n\nBefore the results are displayed a check is done whether there are in fact any transactions for the specific user.\n\n//active delegations function\nif (delegationdata[0] == null) {\n console.log('No delegation information');\n document.getElementById('searchResultContainer').style.display = 'flex';\n document.getElementById('searchResult').className =\n 'form-control-plaintext alert alert-danger';\n document.getElementById('searchResult').innerHTML =\n 'No delegation information';\n} else {\n document.getElementById('searchResultContainer').style.display = 'flex';\n document.getElementById('searchResult').className =\n 'form-control-plaintext alert alert-success';\n document.getElementById('searchResult').innerHTML = 'Active Delegations';\n}\n\n\n//expiring delegations function\nif (delegationdata[0] == null) {\n console.log('No delegation information');\n document.getElementById('searchResultContainer').style.display = 'flex';\n document.getElementById('searchResult').className =\n 'form-control-plaintext alert alert-danger';\n document.getElementById('searchResult').innerHTML =\n 'No delegation information';\n} else {\n document.getElementById('searchResultContainer').style.display = 'flex';\n document.getElementById('searchResult').className =\n 'form-control-plaintext alert alert-success';\n document.getElementById('searchResult').innerHTML = 'Expiring Delegations';\n}\n\n\nThe result from the query is an array of objects. The results are displayed in a simple list.\n\nThe active delegations functions returns the following values and are displayed on the UI as per below.\n\n\n delegator - The user that made the delegation\n delegatee - The user that the delegations has been made to\n vesting_shares - The amount of VESTS that has been delegated\n min_delegation_time - The time from which the delegation will be active\n\n\n//active delegations function\ndelegationdata.forEach(newObj => {\n name = newObj.delegatee;\n shares = newObj.vesting_shares;\n document.getElementById('delegationList').innerHTML +=\n delegator + ' delegated ' + shares + ' to ' + name + '<br>';\n});\n\n\nThe expiring delegations function returns the following values and are displayed on the UI as per below.\n\n\n vesting_shares - The amount of VESTS that is pending expiration\n expiration - The date at which the delegation will expire and the VESTS will be available again\n\n\n//expiring delegations function\ndelegationdata.forEach(newObj => {\n shares = newObj.vesting_shares;\n date = expiration;\n document.getElementById('delegationList').innerHTML +=\n shares + ' will be released at ' + date + '<br>';\n});\n\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/27_get_delegations_by_user\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-get-follower-and-following-list": { + "id": "tutorials-javascript-get-follower-and-following-list", + "title": "JS: Get Follower And Following List", + "category": "tutorials-javascript", + "description": "_Get the followers of a user/author & the authors that user is following._", + "type": "", + "url": "/tutorials-javascript/get_follower_and_following_list", + "content": "Full, runnable src of Get Follower And Following List can be downloaded as part of the JS tutorials repository.\n\n\nThis tutorial will take you through the process of calling both the follower and following functions from the STEEM API.\n\nIntro\n\nWe 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:\n\n\n username - The specific user for which the follower(ing) list will be retrieved.\n startFollower(ing) - The starting letter(s) or name for the search query.\n followType - This value is set to blog and includes all users following or being followed by the user.\n limit - The maximum number of lines to be returned by the query.\n\n\nA simple HTML interface is used to capture the required information after which the function is executed.\n\nSteps\n\n\n Configure connection Configuration of dsteem to communicate with the Steem blockchain\n Input variables Collecting the required inputs via an HTML UI\n Get followers/following Get the followers or users being followed\n Display Display the array of results on the UI\n\n\n1. Configure connection\n\nAs 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//define network parameters\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n//connect to a steem node, production in this case\nconst client = new dsteem.Client('https://api.steemit.com');\n\n\nAbove, we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint.\n\n2. Input variables\n\nThe 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.\n\nThe parameter values are allocated as seen below once the user clicks on the “Get Followers” or “Get Following” button.\nThe 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.\n\n//Followers function\nwindow.submitFollower = async () => {\n //clear list\n document.getElementById('followList').innerHTML = '';\n\n //get user name\n const username = document.getElementById('username').value;\n //get starting letters / word\n const startFollow = document.getElementById('startFollow').value;\n //get limit\n var limit = document.getElementById('limit').value;\n\n\n3. Get followers/following\n\nA list of followers or users being followed is called from the database with the follow_api available in the SteemJS library.\n\n//get list of followers\n//getFollowers(following, startFollower, followType, limit)\n let followlist = await client.call('follow_api', 'get_followers', [\n username,\n startFollow,\n 'blog',\n limit,\n ]);\n\n document.getElementById('followResultContainer').style.display = 'flex';\n document.getElementById('followResult').className = 'form-control-plaintext alert alert-success';\n document.getElementById('followResult').innerHTML = 'Followers';\n\n\n//get list of authors you are following\n//getFollowing(follower, startFollowing, followType, limit)\n let followlist = await client.call('follow_api', 'get_following', [\n username,\n startFollow,\n 'blog',\n limit,\n ]);\n\n document.getElementById('followResultContainer').style.display = 'flex';\n document.getElementById('followResult').className = 'form-control-plaintext alert alert-success';\n document.getElementById('followResult').innerHTML = 'Following';\n\n\n\n4. Display\n\nThe 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.\n\nfollowlist.forEach(newObj => {\n name = newObj.follower;\n document.getElementById('followList').innerHTML += name + '<br>';\n console.log(name);\n});\n\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/19_get_follower_and_following_list\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-get-post-comments": { + "id": "tutorials-javascript-get-post-comments", + "title": "JS: Get Post Comments", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you would know how to get comments made by others on any post._", + "type": "", + "url": "/tutorials-javascript/get_post_comments", + "content": "Full, runnable src of Get Post Comments can be downloaded as part of the JS tutorials repository.\n\n\nThe 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.\n\nWe will also explain the most commonly used fields from the response object as well as parse body of each comment.\n\nIntro\n\nEach 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.\n\nSteps\n\n\n Fetching posts Getting trending posts\n Post comments Open post and fetch comments\n Query result Result of the query\n\n\n1. Fetching post\n\nAs 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.\n\n2. Post comments\n\nOn 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.\n\nclient.database.call('get_content_replies', [author, permlink]).then(result => {\n const comments = [];\n for (var i = 0; i < result.length; i++) {\n comments.push(\n `<div class=\"list-group-item list-group-item-action flex-column align-items-start\">\\\n <div class=\"d-flex w-100 justify-content-between\">\\\n <h5 class=\"mb-1\">@${result[i].author}</h5>\\\n <small class=\"text-muted\">${new Date(\n result[i].created\n ).toString()}</small>\\\n </div>\\\n <p class=\"mb-1\">${md.render(result[i].body)}</p>\\\n <small class=\"text-muted\">&#9650; ${result[i].net_votes}</small>\\\n </div>`\n );\n }\n\n document.getElementById('postComments').style.display = 'block';\n document.getElementById('postComments').innerHTML = comments.join('');\n});\n\n\nWe 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.\n\ndocument.getElementById('postList').style.display = 'block';\ndocument.getElementById('postBody').style.display = 'none';\ndocument.getElementById('postComments').style.display = 'none';\n\n\nThe “go back” function simply hides and shows the post list.\n\n3. Query result\n\nThe result is returned from the post content as a JSON object with the following properties:\n\n[\n {\n \"id\": 37338948,\n \"author\": \"demo\",\n \"permlink\": \"re-join-team-steemit-at-tokenfest-20180500t181413163z\",\n \"category\": \"steemit\",\n \"parent_author\": \"steemit\",\n \"parent_permlink\": \"join-team-steemit-at-tokenfest\",\n \"title\": \"\",\n \"body\": \"Thank you for sharing\",\n \"json_metadata\":\n \"{\\\"tags\\\":[\\\"steemit\\\"],\\\"app\\\":\\\"steemit/0.1\\\",\\\"format\\\":\\\"markdown\\\"}\",\n \"last_update\": \"2018-03-07T23:22:54\",\n \"created\": \"2018-05-00T20:56:36\",\n \"active\": \"2018-05-06T01:40:21\",\n \"last_payout\": \"1970-01-01T00:00:00\",\n \"depth\": 1,\n \"children\": 1,\n \"net_rshares\": \"11453442114933\",\n \"abs_rshares\": \"11454054795840\",\n \"vote_rshares\": \"11454054795840\",\n \"children_abs_rshares\": \"13568695606090\",\n \"cashout_time\": \"2018-05-07T20:56:36\",\n \"max_cashout_time\": \"1969-12-31T23:59:59\",\n \"total_vote_weight\": 3462435,\n \"reward_weight\": 10000,\n \"total_payout_value\": \"0.000 SBD\",\n \"curator_payout_value\": \"0.000 SBD\",\n \"author_rewards\": 0,\n \"net_votes\": 77,\n \"root_comment\": 37338948,\n \"max_accepted_payout\": \"0.000 SBD\",\n \"percent_steem_dollars\": 10000,\n \"allow_replies\": true,\n \"allow_votes\": true,\n \"allow_curation_rewards\": true,\n \"beneficiaries\": [],\n \"url\":\n \"/steemit/@steemitblog/join-team-steemit-at-tokenfest#@demo/re-join-team-steemit-at-tokenfest-20180500t181413163z\",\n \"root_title\": \"Join Team Steemit at TokenFest!\",\n \"pending_payout_value\": \"0.436 SBD\",\n \"total_pending_payout_value\": \"0.000 STEEM\",\n \"active_votes\": [\n {\n \"voter\": \"steemitblog\",\n \"weight\": 0,\n \"rshares\": \"1870813909383\",\n \"percent\": 10000,\n \"reputation\": \"128210130644387\",\n \"time\": \"2018-03-07T20:56:36\"\n },\n {\n \"voter\": \"kevinwong\",\n \"weight\": 526653,\n \"rshares\": \"2208942520687\",\n \"percent\": 5000,\n \"reputation\": \"374133832002581\",\n \"time\": \"2018-03-08T04:27:00\"\n }\n ],\n \"replies\": [],\n \"author_reputation\": \"128210130644387\",\n \"promoted\": \"0.000 SBD\",\n \"body_length\": 0,\n \"reblogged_by\": []\n },\n {\n \"id\": 37338987,\n \"etc.\": \"etc\"\n }\n]\n\n\nFrom this result, you have access to comments made on selected post.\n\nTo Run the tutorial\n\n\n clone this repo\n cd tutorials/07_get_post_comments\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-get-post-details": { + "id": "tutorials-javascript-get-post-details", + "title": "JS: Get Post Details", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you would know how to get post details and use them appropriately._", + "type": "", + "url": "/tutorials-javascript/get_post_details", + "content": "Full, runnable src of Get Post Details can be downloaded as part of the JS tutorials repository.\n\n\nThe 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.\n\nWe will also explain the most commonly used fields from the response object as well as parse body of the post.\n\nIntro\n\nAccounts 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.\n\nSteps\n\n\n Fetching posts Trending posts list\n Post content Extract content of the selected post\n Query result Returned data\n\n\n1. Fetching posts\n\nAs 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.\n\nvar query = {\n tag: '', // This tag is used to filter the results by a specific post tag.\n limit: 5, // This allows us to limit the total to 5 items.\n 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.\n};\n\n\n2. Post content\n\nOn 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.\n\nclient.database.call('get_content', [author, permlink]).then(result => {\n const md = new Remarkable({ html: true, linkify: true });\n\n const body = md.render(result.body);\n\n const content = `<div class='pull-right'><button onclick=goback()>Close</button></div><br><h2>${\n result.title\n }</h2><br>${body}<br>`;\n\n document.getElementById('postList').style.display = 'none';\n document.getElementById('postBody').style.display = 'block';\n document.getElementById('postBody').innerHTML = content;\n});\n\n\nSteem 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.\n\ndocument.getElementById('postList').style.display = 'block';\ndocument.getElementById('postBody').style.display = 'none';\n\n\nThe “go back” function simply hides and shows the post list.\n\n3. Query result\n\nThe result is returned from the post content as a JSON object with the following properties:\n\n{\n \"id\": 37338948,\n \"author\": \"steemitblog\",\n \"permlink\": \"join-team-steemit-at-tokenfest\",\n \"category\": \"steemit\",\n \"parent_author\": \"\",\n \"parent_permlink\": \"steemit\",\n \"title\": \"Join Team Steemit at TokenFest!\",\n \"body\":\n \"<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*\",\n \"json_metadata\":\n \"{\\\"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\\\"}\",\n \"last_update\": \"2018-03-07T23:22:54\",\n \"created\": \"2018-03-07T20:56:36\",\n \"active\": \"2018-03-13T01:40:21\",\n \"last_payout\": \"1970-01-01T00:00:00\",\n \"depth\": 0,\n \"children\": 29,\n \"net_rshares\": \"11453442114933\",\n \"abs_rshares\": \"11454054795840\",\n \"vote_rshares\": \"11454054795840\",\n \"children_abs_rshares\": \"13568695606090\",\n \"cashout_time\": \"2018-03-14T20:56:36\",\n \"max_cashout_time\": \"1969-12-31T23:59:59\",\n \"total_vote_weight\": 3462435,\n \"reward_weight\": 10000,\n \"total_payout_value\": \"0.000 SBD\",\n \"curator_payout_value\": \"0.000 SBD\",\n \"author_rewards\": 0,\n \"net_votes\": 77,\n \"root_comment\": 37338948,\n \"max_accepted_payout\": \"0.000 SBD\",\n \"percent_steem_dollars\": 10000,\n \"allow_replies\": true,\n \"allow_votes\": true,\n \"allow_curation_rewards\": true,\n \"beneficiaries\": [],\n \"url\": \"/steemit/@steemitblog/join-team-steemit-at-tokenfest\",\n \"root_title\": \"Join Team Steemit at TokenFest!\",\n \"pending_payout_value\": \"46.436 SBD\",\n \"total_pending_payout_value\": \"0.000 STEEM\",\n \"active_votes\": [\n {\n \"voter\": \"steemitblog\",\n \"weight\": 0,\n \"rshares\": \"1870813909383\",\n \"percent\": 10000,\n \"reputation\": \"128210130644387\",\n \"time\": \"2018-03-07T20:56:36\"\n },\n {\n \"voter\": \"kevinwong\",\n \"weight\": 526653,\n \"rshares\": \"2208942520687\",\n \"percent\": 5000,\n \"reputation\": \"374133832002581\",\n \"time\": \"2018-03-08T04:27:00\"\n }\n ],\n \"replies\": [],\n \"author_reputation\": \"128210130644387\",\n \"promoted\": \"0.000 SBD\",\n \"body_length\": 754,\n \"reblogged_by\": []\n}\n\n\nFrom 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.\n\n\n id - Unique identifier that is mostly an implementation detail (best to ignore). To uniquely identify content, it’s best to use author/permlink.\n author - The author account name of the content.\n permlink - Permanent link of the content, must be unique in the scope of the author.\n category - The main category/tag this content belongs to.\n parent_author - Parent author, in case this content is a comment (reply).\n 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.\n title - Title of the content.\n body - Body of the content.\n json_metadata - JSON metadata that holds extra information about the content. Note: The format for this field is not guaranteed to be valid JSON.\n last_update - The date and time of the last update to this content.\n created - The date and time this content was created.\n active - The last time this content was “touched” by voting or reply.\n last_payout - Time of last payout.\n depth - Used to track max nested depth.\n children - Used to track the total number of children, grandchildren, etc. …\n net_rshares - Reward is proportional to liniar rshares, this is the sum of all votes (positive and negative reward sum)\n abs_rshares - This was used to track the total absolute weight of votes for the purpose of calculating cashout_time.\n vote_rshares - Total positive rshares from all votes. Used to calculate delta weights. Needed to handle vote changing and removal.\n children_abs_rshares - This was used to calculate cashout time of a discussion.\n cashout_time - 7 days from the created date.\n max_cashout_time - Unused.\n total_vote_weight - The total weight of voting rewards, used to calculate pro-rata share of curation payouts.\n reward_weight - Weight/percent of reward.\n total_payout_value - Tracks the total payout this content has received over time, measured in the debt asset.\n curator_payout_value - Tracks the curator payout this content has received over time, measured in the debt asset.\n author_rewards - Tracks the author payout this content has received over time, measured in the debt asset.\n net_votes - Net positive votes\n root_comment - ID of the original content.\n max_accepted_payout - Value of the maximum payout this content will receive.\n percent_steem_dollars - The percent of Steem Dollars to key, unkept amounts will be received as STEEM Power.\n allow_replies - Allows content to disable replies.\n allow_votes - Allows content to receive votes.\n allow_curation_rewards - Allows curators of this content receive rewards.\n 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.\n url - The end of the url to this content.\n root_title - Title of the original content (useful in replies).\n pending_payout_value - Pending payout amount if 7 days has not yet elapsed.\n total_pending_payout_value - Total pending payout amount if 7 days has not yet elapsed.\n active_votes - The entire voting list array, including upvotes, downvotes, and unvotes; used to calculate net_votes.\n replies - Unused.\n author_reputation - Author’s reputation.\n promoted - If post is promoted, how much has been spent on promotion.\n body_length - Total content length.\n reblogged_by - Unused.\n\n\nThat’s it!\n\nTo Run the tutorial\n\n\n clone this repo\n cd tutorials/05_get_post_details\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-get-posts": { + "id": "tutorials-javascript-get-posts", + "title": "JS: Get Posts", + "category": "tutorials-javascript", + "description": "Query for the most recent posts having a specific tag, using a Steem filter", + "type": "", + "url": "/tutorials-javascript/get_posts", + "content": "Full, runnable src of Get Posts can be downloaded as part of the JS tutorials repository.\n\n\nThis tutorial pulls a list of the posts from different tags or filters and displays them.\nTags and filters are different. It’s important to understand them.\n\nIntro\n\nTags & Filters are two different.\n\nA tag in Steem is much like a tag in Gmail, or Twitter. It’s a way to describe a\npost as being relevant to a particular topic. Posts may have up to five tags on them, but there are limits when\nquerying (more on this later).\n\nA filter in Steem is a kind of built-in ‘view’ or ordering of posts. You can use the following filters:\ntrending, hot, new, active, and promoted. You’ll get a feel for the subtleties of each as you create your\napplication.\n\nSteps\n\n\n UI - A brief description of the UI and inputting our query values\n Construct query - Assemble the information from the UI into our filter & query\n API call - Make the call to Steem\n Handle response - Accept the response in a promise callback, then render the results\n Example post object - An example post object from the response list\n\n\n1. UI \n\nThe source HTML for our UI can be found in public/index.html\n\nThere are three input components to the UI.\n\n\n \n Filters: where we select one of the five built in filter types.\n\n <select id=\"filters\" class=\"form-control\" >...\n \n \n Tag: where we type in a single, arbitrary tag. (The Steem blockchain does not support searching on multiple tags)\n\n <input id=\"tag\" class=\"form-control\"/>\n \n \n Get Posts: It’s a button. You click it, and we move on to assembling our post.\n<button class=\"btn btn-primary\" onclick=\"getPosts()\">Get Posts</button>\n \n\n\n\n\n2. Construct query \n\nThe filter and query are constructed within the async, globally available function getPosts\n\nThe limit property you see below limits the total number of posts we’ll get back to something\nmanagable. In this case, five.\n\nconst filter = document.getElementById('filters').value;\nconst query = {\n tag: document.getElementById('tag').value,\n limit: 5,\n};\n\n\n3. API call \n\nThe api call itself is fairly simple. We use getDiscussions.\nThe first argument, filter, is a simple string.\nThe second argument is our query object.\nLike most of dsteem’s api functions, getDiscussions returns a Promise.\n\nclient.database\n .getDiscussions(filter, query)\n .th..\n\n\n4. Handle response \n\nWhen the promise returned by getDiscussions completes successfully, the function we pass to .then()\niterates over the entries response, and constructs html from it.\n\n...ery)\n.then(result => {\n console.log(\"Response received:\", result);\n if (result) {\n var posts = [];\n result.forEach(post => {\n const json = JSON.parse(post.json_metadata);\n const image = json.image ? json.image[0] : '';\n const title = post.title;\n const author = post.author;\n const created = new Date(post.created).toDateString();\n posts.push(\n `<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>`\n );\n });\n\n document.getElementById('postList').innerHTML = posts.join('');\n } else {\n document.getElementById('postList').innerHTML = \"No result.\";\n }\n })\n\n\n5. Example post object \n\nThe result returned from the service is a JSON list. This is an example list with one entry.\n\n[\n {\n \"id\": 37338948,\n \"author\": \"steemitblog\",\n \"permlink\": \"join-team-steemit-at-tokenfest\",\n \"category\": \"steemit\",\n \"parent_author\": \"\",\n \"parent_permlink\": \"steemit\",\n \"title\": \"Join Team Steemit at TokenFest!\",\n \"body\":\n \"<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*\",\n \"json_metadata\":\n \"{\\\"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\\\"}\",\n \"last_update\": \"2018-03-07T23:22:54\",\n \"created\": \"2018-03-07T20:56:36\",\n \"active\": \"2018-03-13T01:40:21\",\n \"last_payout\": \"1970-01-01T00:00:00\",\n \"depth\": 0,\n \"children\": 29,\n \"net_rshares\": \"11453442114933\",\n \"abs_rshares\": \"11454054795840\",\n \"vote_rshares\": \"11454054795840\",\n \"children_abs_rshares\": \"13568695606090\",\n \"cashout_time\": \"2018-03-14T20:56:36\",\n \"max_cashout_time\": \"1969-12-31T23:59:59\",\n \"total_vote_weight\": 3462435,\n \"reward_weight\": 10000,\n \"total_payout_value\": \"0.000 SBD\",\n \"curator_payout_value\": \"0.000 SBD\",\n \"author_rewards\": 0,\n \"net_votes\": 77,\n \"root_comment\": 37338948,\n \"max_accepted_payout\": \"0.000 SBD\",\n \"percent_steem_dollars\": 10000,\n \"allow_replies\": true,\n \"allow_votes\": true,\n \"allow_curation_rewards\": true,\n \"beneficiaries\": [],\n \"url\": \"/steemit/@steemitblog/join-team-steemit-at-tokenfest\",\n \"root_title\": \"Join Team Steemit at TokenFest!\",\n \"pending_payout_value\": \"46.436 SBD\",\n \"total_pending_payout_value\": \"0.000 STEEM\",\n \"active_votes\": [\n {\n \"voter\": \"steemitblog\",\n \"weight\": 0,\n \"rshares\": \"1870813909383\",\n \"percent\": 10000,\n \"reputation\": \"128210130644387\",\n \"time\": \"2018-03-07T20:56:36\"\n },\n {\n \"voter\": \"kevinwong\",\n \"weight\": 526653,\n \"rshares\": \"2208942520687\",\n \"percent\": 5000,\n \"reputation\": \"374133832002581\",\n \"time\": \"2018-03-08T04:27:00\"\n }\n ],\n \"replies\": [],\n \"author_reputation\": \"128210130644387\",\n \"promoted\": \"0.000 SBD\",\n \"body_length\": 754,\n \"reblogged_by\": []\n }\n ...\n]\n\n\nAnd that’s all there is to getting top-level posts. See Get post comments for getting comments\n\nTo Run the tutorial\n\n\n clone this repo\n cd tutorials/04_get_posts\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-get-state-replacement-api": { + "id": "tutorials-javascript-get-state-replacement-api", + "title": "JS: Get State Replacement Api", + "category": "tutorials-javascript", + "description": "This is a list of replacement API calls for each of the different _routes_ available from the `getState` function.", + "type": "", + "url": "/tutorials-javascript/get_state_replacement_api", + "content": "Full, runnable src of Get State Replacement Api can be downloaded as part of the JS tutorials repository.\n\n\nIntro\n\nWith 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.\n\nIncluded 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.\n\nThe call routes that will be covered are for:\n\n\n accounts\n content\n feed_price\n props\n tags\n tag_idx\n witness_schedule\n witnesses\n\n\nCurrent getState() result:\n\n{\n \"current_route\": \"\",\n \"props\": {\n \"head_block_number\": 0,\n \"head_block_id\": \"0000000000000000000000000000000000000000\",\n \"time\": \"1970-01-01T00:00:00\",\n \"current_witness\": \"\",\n \"total_pow\": \"18446744073709551615\",\n \"num_pow_witnesses\": 0,\n \"virtual_supply\": \"0.000 STEEM\",\n \"current_supply\": \"0.000 STEEM\",\n \"confidential_supply\": \"0.000 STEEM\",\n \"current_sbd_supply\": \"0.000 STEEM\",\n \"confidential_sbd_supply\": \"0.000 STEEM\",\n \"total_vesting_fund_steem\": \"0.000 STEEM\",\n \"total_vesting_shares\": \"0.000 STEEM\",\n \"total_reward_fund_steem\": \"0.000 STEEM\",\n \"total_reward_shares2\": \"0\",\n \"pending_rewarded_vesting_shares\": \"0.000 STEEM\",\n \"pending_rewarded_vesting_steem\": \"0.000 STEEM\",\n \"sbd_interest_rate\": 0,\n \"sbd_print_rate\": 10000,\n \"maximum_block_size\": 0,\n \"current_aslot\": 0,\n \"recent_slots_filled\": \"0\",\n \"participation_count\": 0,\n \"last_irreversible_block_num\": 0,\n \"vote_power_reserve_rate\": 40,\n \"average_block_size\": 0,\n \"current_reserve_ratio\": 1,\n \"max_virtual_bandwidth\": \"0\"\n },\n \"tag_idx\": {\"trending\": []},\n \"tags\": {},\n \"content\": {},\n \"accounts\": {},\n \"witnesses\": {},\n \"discussion_idx\": {},\n \"witness_schedule\": {\n \"id\": 0,\n \"current_virtual_time\": \"0\",\n \"next_shuffle_block_num\": 1,\n \"current_shuffled_witnesses\": [],\n \"num_scheduled_witnesses\": 1,\n \"top19_weight\": 1,\n \"timeshare_weight\": 5,\n \"miner_weight\": 1,\n \"witness_pay_normalization_factor\": 25,\n \"median_props\": {\n \"account_creation_fee\": \"0.000 STEEM\",\n \"maximum_block_size\": 131072,\n \"sbd_interest_rate\": 1000\n },\n \"majority_version\": \"0.0.0\",\n \"max_voted_witnesses\": 19,\n \"max_miner_witnesses\": 1,\n \"max_runner_witnesses\": 1,\n \"hardfork_required_witnesses\": 17\n },\n \"feed_price\": {\"base\": \"0.000 STEEM\", \"quote\": \"0.000 STEEM\"},\n \"error\": \"\"\n}\n\n\nUse cases and data sets\n\nRoute: getState(‘accounts’)\n\n\n \n Purpose: Returns a list of account objects for the top 20 trending post authors or a single account if specified.\n \n \n Replacement API call:\n \n\n\ndatabaseAPI.getAccounts(['username'])\n\n\nIn 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.\n\n\n Expected result:\n\n\n{\n \"active\": {\n \"weight_threshold\": 1,\n \"account_auths\": [],\n \"key_auths\": []\n },\n \"average_bandwidth\": 0,\n \"average_market_bandwidth\": 0,\n \"balance\": \"0.000 STEEM\",\n \"can_vote\": true,\n \"comment_count\": 0,\n \"created\": \"2016-03-26T08:26:21\",\n \"curation_rewards\": 396530808,\n \"delegated_vesting_shares\": \"505881.492379 VESTS\",\n \"guest_bloggers\": [],\n \"id\": 340,\n \"json_metadata\": {\"profile\":{\"name\":,\"profile_image\":}},\n \"last_account_recovery\": \"1970-01-01T00:00:00\",\n \"last_account_update\": \"2018-08-30T01:48:15\",\n \"last_bandwidth_update\": \"1970-01-01T00:00:00\",\n \"last_market_bandwidth_update\": \"1970-01-01T00:00:00\",\n \"last_owner_update\": \"2017-11-22T03:58:09\",\n \"last_post\": \"2018-09-26T18:32:30\",\n \"last_root_post\": \"2018-09-26T16:07:51\",\n \"last_vote_time\": \"2018-09-26T16:23:09\",\n \"lifetime_bandwidth\": 0,\n \"lifetime_market_bandwidth\": 0,\n \"lifetime_vote_count\": 0,\n \"market_history\": [],\n \"memo_key\": \"\",\n \"mined\": true,\n \"name\": \"\",\n \"next_vesting_withdrawal\": \"1969-12-31T23:59:59\",\n \"other_history\": [],\n \"owner\": {\n \"weight_threshold\": 1,\n \"account_auths\": [],\n \"key_auths\": []\n },\n \"pending_claimed_accounts\": 0,\n \"post_bandwidth\": 10000,\n \"post_count\": 6289,\n \"post_history\": [],\n \"posting\": {\n \"weight_threshold\": 1,\n \"account_auths\": [],\n \"key_auths\": []\n },\n \"posting_rewards\": 30925563,\n \"proxied_vsf_votes\": [\"1466563679903716\", \"754759334883\", 0, 0],\n \"proxy\": \"\",\n \"received_vesting_shares\": \"0.000000 VESTS\",\n \"recovery_account\": \"steem\",\n \"reputation\": \"\",\n \"reset_account\": \"null\",\n \"reward_sbd_balance\": \"0.000 SBD\",\n \"reward_steem_balance\": \"0.000 STEEM\",\n \"reward_vesting_balance\": \"967.889424 VESTS\",\n \"reward_vesting_steem\": \"0.479 STEEM\",\n \"savings_balance\": \"0.000 STEEM\",\n \"savings_sbd_balance\": \"0.000 SBD\",\n \"savings_sbd_last_interest_payment\": \"1970-01-01T00:00:00\",\n \"savings_sbd_seconds\": \"0\",\n \"savings_sbd_seconds_last_update\": \"1970-01-01T00:00:00\",\n \"savings_withdraw_requests\": 0,\n \"sbd_balance\": \"0.000 SBD\",\n \"sbd_last_interest_payment\": \"2018-09-08T13:46:15\",\n \"sbd_seconds\": \"79984344\",\n \"sbd_seconds_last_update\": \"2018-09-26T17:36:15\",\n \"tags_usage\": [],\n \"to_withdraw\": 0,\n \"transfer_history\": [],\n \"vesting_balance\": \"0.000 STEEM\",\n \"vesting_shares\": \"26772189.757016 VESTS\",\n \"vesting_withdraw_rate\": \"0.000000 VESTS\",\n \"vote_history\": [],\n \"voting_manabar\": {\"current_mana\": \"5514091390534\", \"last_update_time\": 1537978989},\n \"voting_power\": 2099,\n \"withdraw_routes\": 0,\n \"withdrawn\": 0,\n \"witness_votes\": [],\n \"witnesses_voted_for\": 24\n}\n\n\nRoute: getState(‘content’)\n\n\n \n Purpose: The content in getState calls the top 20 trending posts\n \n \n Replacement API call:\n \n\n\ndatabaseAPI.call('get_discussions_by_trending',[{limit:20}])\n\n\nWhile 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.\n\n\n Expected result:\n\n\n{\n \"abs_rshares\": \"60411661082705\",\n \"active\": \"2018-09-26T19:47:15\",\n \"active_votes\": [],\n \"allow_curation_rewards\": true,\n \"allow_replies\": true,\n \"allow_votes\": true,\n \"author\": \"therealwolf\",\n \"author_reputation\": \"100096076084764\",\n \"author_rewards\": 0,\n \"beneficiaries\": [],\n \"body\": \"......\",\n \"body_length\": 4577,\n \"cashout_time\": \"2018-10-02T13:52:24\",\n \"category\": \"witness-update\",\n \"children\": 7,\n \"children_abs_rshares\": \"60493226759117\",\n \"created\": \"2018-09-25T13:52:24\",\n \"curator_payout_value\": \"0.000 SBD\",\n \"depth\": 0,\n \"id\": 63318715,\n \"json_metadata\": {\"tags\":[]},\n \"last_payout\": \"1970-01-01T00:00:00\",\n \"last_update\": \"2018-09-26T19:17:33\",\n \"max_accepted_payout\": \"100000.000 SBD\",\n \"max_cashout_time\": \"1969-12-31T23:59:59\",\n \"net_rshares\": \"60411661082705\",\n \"net_votes\": 179,\n \"parent_author\": \"\",\n \"parent_permlink\": \"witness-update\",\n \"pending_payout_value\": \"80.490 SBD\",\n \"percent_steem_dollars\": 10000,\n \"permlink\": \"witness-essentials-hf20-ready\",\n \"promoted\": \"0.000 SBD\",\n \"reblogged_by\": [],\n \"replies\": [],\n \"reward_weight\": 10000,\n \"root_author\": \"therealwolf\",\n \"root_permlink\": \"witness-essentials-hf20-ready\",\n \"root_title\": \"Witness Essentials: HF20 Ready\",\n \"title\": \"Witness Essentials: HF20 Ready\",\n \"total_payout_value\": \"0.000 SBD\",\n \"total_pending_payout_value\": \"0.000 STEEM\",\n \"total_vote_weight\": 7795119,\n \"url\": \"/witness-update/@therealwolf/witness-essentials-hf20-ready\",\n \"vote_rshares\": \"60411661082705\"\n}\n\n\nRoute: getState(‘feed_price’)\n\n\n \n 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.\n \n \n Replacement API call:\n \n\n\ndatabaseAPI.getCurrentMedianHistoryPrice()\n\n\nThis provides the same data as getState but is executed much faster due to the limited amount of information provided by this function.\n\n\n Expected result:\n\n\n{\n \"base\": {\"amount\": 0.887, \"symbol\": \"SBD\"},\n \"quote\": {\"amount\": 1, \"symbol\": \"STEEM\"}\n}\n\n\nRoute: getState(‘props’)\n\n\n \n 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.\n \n \n Replacement API call:\n \n\n\n//all block info\ndatabaseAPI.getDynamicGlobalProperties()\n//head block number only\nblockchainAPI.getCurrentBlockNum()\n//simple head block info\ndatabaseAPI.getBlock(HeadBlockNum)\n\n\ngetDynamicGlobalProperties() 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.\n\n\n Expected result:\n\n\n{\n \"average_block_size\":122,\n \"confidential_sbd_supply\":\"0.000 SBD\",\n \"confidential_supply\":\"0.000 STEEM\",\n \"current_aslot\":26372251,\n \"current_reserve_ratio\":200000000,\n \"current_sbd_supply\":\"14921682.900 SBD\",\n \"current_supply\":\"277501868.004 STEEM\",\n \"current_witness\":\"ausbitbank\",\n \"delegation_return_period\":432000,\n \"head_block_id\":\"0190f89c584661d6ffc78e17395df17ea5653197\",\n \"head_block_number\":26278044,\n \"last_irreversible_block_num\":26278024,\n \"max_virtual_bandwidth\":\"264241152000000000000\",\n \"maximum_block_size\":65536,\n \"num_pow_witnesses\":172,\n \"participation_count\":126,\n \"pending_rewarded_vesting_shares\":\"483834672.069834 VESTS\",\n \"pending_rewarded_vesting_steem\":\"237227.812 STEEM\",\n \"recent_slots_filled\":\"340282366911034938426725082362930003967\",\n \"reverse_auction_seconds\":900,\n \"sbd_interest_rate\":0,\n \"sbd_print_rate\":10000,\n \"sbd_start_percent\":900,\n \"sbd_stop_percent\":1000,\n \"time\":\"2018-09-26T08:52:33\",\n \"total_pow\":514415,\n \"total_reward_fund_steem\":\"0.000 STEEM\",\n \"total_reward_shares2\":\"0\",\n \"total_vesting_fund_steem\":\"196777383.890 STEEM\",\n \"total_vesting_shares\":\"397621943253.336916 VESTS\",\n \"virtual_supply\":\"294324509.379 STEEM\",\n \"vote_power_reserve_rate\":10\n}\n\n\nRoute: getState(‘tags’)\n\n\n \n Purpose: Calls a list of trending tags with detailed information on each tag. The list is displayed alphabetically.\n \n \n Replacement API call:\n \n\n\ndatabaseAPI.call('get_trending_tags',[startingValue, limit])\n\n\nThe 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.\n\n\n Expected result:\n\n\n{\n \"comments\": 31203776,\n \"name\": \"life\",\n \"net_votes\": 54671586,\n \"top_posts\": 4996200,\n \"total_payouts\": \"61584243.124 SBD\",\n \"trending\": \"114450355665\"\n}\n\n\nRoute: getState(‘tag_idx’)\n\n\n \n Purpose: Provides a list of names (index) of the current tags (according to trending) available on the blockchain with no additional information.\n \n \n Replacement API call:\n \n\n\ndatabaseAPI.call('get_trending_tags',[startingValue, limit])\n\n\nThis 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.\n\n\n Expected result:\n\n\n{\n \"life\"\n \"photography\"\n \"kr\"\n \"steemit\"\n \"bitcoin\"\n}\n\n\nRoute: getState(‘witness_schedule’)\n\n\n \n 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.\n \n \n Replacement API call:\n \n\n\n//full info\ndatabaseAPI.call('get_witness_schedule',[])\n//median props only\ndatabaseAPI.getChainProperties()\n\n\nIf required you can also call the median_props values as standalone via the second function listed above.\n\n\n Expected result:\n\n\n{\n \"account_subsidy_rd\": {\n \"resource_unit\": 10000,\n \"budget_per_time_unit\": 797,\n \"pool_eq\": 157691079,\n \"max_pool_size\": 157691079,\n \"decay_params\": {},\n },\n \"account_subsidy_witness_rd\": {\n \"resource_unit\": 10000,\n \"budget_per_time_unit\": 996,\n \"pool_eq\": 9384019,\n \"max_pool_size\": 9384019,\n \"decay_params\": {},\n },\n \"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\"],\n \"current_virtual_time\": \"376982753287696133965407589\",\n \"elected_weight\": 1,\n \"hardfork_required_witnesses\": 17,\n \"id\": 0,\n \"majority_version\": \"0.20.3\",\n \"max_miner_witnesses\": 0,\n \"max_runner_witnesses\": 1,\n \"max_voted_witnesses\": 20,\n \"median_props\": {\n \"account_creation_fee\": \"3.000 STEEM\",\n \"maximum_block_size\": 65536,\n \"sbd_interest_rate\": 0,\n \"account_subsidy_budget\": 797,\n \"account_subsidy_decay\": 347321\n },\n \"min_witness_account_subsidy_decay\": 0,\n \"miner_weight\": 1,\n \"next_shuffle_block_num\": 26313756,\n \"num_scheduled_witnesses\": 21,\n \"timeshare_weight\": 5,\n \"witness_pay_normalization_factor\": 25\n}\n\n\nRoute: getState(‘witnesses’)\n\n\n \n Purpose: Calls a list of active witnesses with extended details, listed alphabetically\n \n \n Replacement API call:\n \n\n\ndatabaseAPI.call('get_witnesses_by_vote',['',limit])\n\n\nThis 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.\n\n\n Expected result:\n\n\n{\n \"available_witness_account_subsidies\": 9138354,\n \"created\": \"1970-01-01T00:00:00\",\n \"hardfork_time_vote\": \"2018-09-25T15:00:00\",\n \"hardfork_version_vote\": \"0.20.0\",\n \"id\": 9493,\n \"last_aslot\": 26387405,\n \"last_confirmed_block_num\": 26293189,\n \"last_sbd_exchange_update\": \"2018-09-26T19:54:36\",\n \"last_work\": \"0000000048bf77f525731f28db7c1aa9ad853a475ccc78e71ea952a7782e5459\",\n \"owner\": \"gtg\",\n \"pow_worker\": 0,\n \"props\": {\n \"account_creation_fee\": \"3.000 STEEM\",\n \"maximum_block_size\": 65536,\n \"sbd_interest_rate\": 0,\n \"account_subsidy_budget\": 797,\n \"account_subsidy_decay\": 347321\n },\n \"running_version\": \"0.20.3\",\n \"sbd_exchange_rate\": {\"base\": \"0.893 SBD\", \"quote\": \"1.000 STEEM\"},\n \"signing_key\": \"STM5T98tp8jZRbs7zzyCg74o2siqBw2SXxoYaE1MCuwuCPeQwKrju\",\n \"total_missed\": 535,\n \"url\": \"https://steemit.com/witness-category/@gtg/witness-gtg\",\n \"virtual_last_update\": \"376717145948220892034052885\",\n \"virtual_position\": \"240558419146717570415939163840356145056\",\n \"virtual_scheduled_time\": \"376718433464807443533288610\",\n \"votes\": \"77454495589313361\"\n}\n\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/34_get_state_replacement_api\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-get-voters-list-on-post": { + "id": "tutorials-javascript-get-voters-list-on-post", + "title": "JS: Get Voters List On Post", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you would know how to get voters list on any content._", + "type": "", + "url": "/tutorials-javascript/get_voters_list_on_post", + "content": "Full, runnable src of Get Voters List On Post can be downloaded as part of the JS tutorials repository.\n\n\nThe 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.\n\nWe will also explain the most commonly used fields from the response object.\n\nIntro\n\nEach 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.\n\nSteps\n\n\n Fetching posts Get trending post list\n Voter information Voters information on selected post\n Query result Example of result from query\n\n\n1. Fetching posts\n\nAs 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.\n\nvar query = {\n tag: '', // This tag is used to filter the results by a specific post tag.\n limit: 5, // This allows us to limit the total to 5 items.\n 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.\n};\n\n\n2. Voter information\n\nOn 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.\n\nclient.database.call('get_active_votes', [author, permlink]).then(result => {\n console.log('votes', result, JSON.stringify(result));\n\n var voters = [];\n voters.push(\n `<div class='pull-right'><button onclick=goback()>Close</button></div><br>`\n );\n result.forEach(voter => {\n const name = voter.voter;\n const time = new Date(voter.time).toDateString();\n voters.push(`${name} (${time})`);\n });\n\n document.getElementById('postList').style.display = 'none';\n document.getElementById('postBody').style.display = 'block';\n document.getElementById('postBody').innerHTML = voters.join('<li>');\n});\n\n\ndocument.getElementById('postList').style.display = 'block';\ndocument.getElementById('postBody').style.display = 'none';\n\n\nThe “go back” function simply hides and shows the post list.\n\n3. Query result\n\nThe result is returned from the post content as a JSON object with the following properties:\n\n[\n {\n \"voter\": \"gekko\",\n \"weight\": 157,\n \"rshares\": 2626899959,\n \"percent\": 10000,\n \"reputation\": \"1185517433922\",\n \"time\": \"2018-05-08T07:16:09\"\n },\n {\n \"voter\": \"embat\",\n \"weight\": 154,\n \"rshares\": 2578364521,\n \"percent\": 10000,\n \"reputation\": \"161340267374\",\n \"time\": \"2018-05-08T07:38:24\"\n }\n]\n\n\nFrom 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.\n\n\n voter - The author account name of the vote.\n weight - Weight of the voting power.\n rshares - Reward shares.\n percent - Percent of vote.\n reputation - The reputation of the account that voted.\n time - Time the vote was submitted.\n\n\nTo Run the tutorial\n\n\n clone this repo\n cd tutorials/06_get_voters_list_on_post\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-getting-started": { + "id": "tutorials-javascript-getting-started", + "title": "JS: Getting Started", + "category": "tutorials-javascript", + "description": "Prepare your development environment to use Javascript with the Steem blockchain.", + "type": "", + "url": "/tutorials-javascript/getting_started", + "content": "Full, runnable src of Getting Started can be downloaded as part of the JS tutorials repository.\n\n\nFor Javascript tutorials, we will use the opensource library dsteem.\n\nNode.js\n\nTo get the most out of these tutorials, you should be familiar with Node.js, ES6 aka es2015, the DOM, and modern Javascript programming practices.\nYou can still learn a lot of these if they aren’t in your base skill-set; it’ll be much easier if they are.\n\nYour Dev Environment\n\nThese tutorials require Node.js 8.7+. Yarn is nice, but not required. Runnable versions of the tutorials are located in this github repo.\nIf you haven’t chosen an editor, you can use Atom, Sublime, Intellij, Vi, etc.\n\nIf you want to keep multiple versions of Node on your system try Node Version Manager.\n\nRunning a typical Tutorial\n\nLet’s say you wanted to run the very first tutorial, 01_blog_feed. Here’s how you’d do it:\n\n\n \n From Bash:\n\n git clone https://github.com/steemit/devportal-tutorials-js.git\n\ncd devportal-tutorials-js/tutorials/01_blog_feed\nnpm i\nnpm run dev-server\n \n \n \n open http://localhost:3000/ in your web browser\n \n\n\n### Github\n\nIf you'd rather clone projects in a windowed environment rather than the terminal, consider [Github Desktop](https://desktop.github.com/)." + } + + + + + + + , + + "tutorials-javascript-grant-active-permission": { + "id": "tutorials-javascript-grant-active-permission", + "title": "JS: Grant Active Permission", + "category": "tutorials-javascript", + "description": "_How to grant and revoke active permission to another user._", + "type": "", + "url": "/tutorials-javascript/grant_active_permission", + "content": "Full, runnable src of Grant Active Permission can be downloaded as part of the JS tutorials repository.\n\n\nThis 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.\n\nProviding 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.\n\nOne 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.\n\nActive 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.\n\nthis article has more detail around active authorities\n\nIntro\n\nThis 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:\n\n\n account - The username of the main account\n active - Optional parameter to denote changes to the active authority type. This is the parameter that we will be changing in this tutorial\n jsonMetadata - This is a string value obtained from the current account info\n memoKey - This is the public memoKey of the user\n owner - Optional parameter to denote changes to the owner authority type\n posting - Optional parameter to denote changes to the posting authority type\n privateKey - The private active key of the user\n\n\nThe only other information required is the username of the account that the active permission is being granted to.\n\nThe tutorial is set up with three individual functions for each of the required operations - checking permission status, granting permission and revoking permission.\n\nSteps\n\n\n Configure connection Configuration of dsteem to communicate with a Steem blockchain\n Input variables Collecting the required inputs via an HTML UI.\n Database query Sending a query to the blockchain for the active permissions (status)\n Object creation Create the array and subsequent data object for the broadcast operation\n Broadcast operation Broadcasting the changes to the blockchain\n\n\n1. Configure connection\n\nAs 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:\n\nimport { Client, PrivateKey } from 'dsteem';\nimport { Testnet as NetConfig } from '../../configuration'; //A Steem Testnet. Replace 'Testnet' with 'Mainnet' to connect to the main Steem blockchain.\n\nlet opts = { ...NetConfig.net };\n\n//connect to a steem node, testnet in this case\nconst client = new Client(NetConfig.url, opts);\n\n\nAbove, 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.\n\n2. Input variables\n\nThe 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.\n\nwindow.onload = async () => {\n const account = NetConfig.accounts[0];\n const accountI = NetConfig.accounts[1];\n document.getElementById('username').value = account.address;\n document.getElementById('privateKey').value = account.privActive;\n document.getElementById('newAccount').value = accountI.address;\n};\n\n\nAll of the functions use the same input variables. Once the function is activated via the UI the variables are allocated as seen below.\n\n//get username\nconst username = document.getElementById('username').value;\n//get private active key\nconst privateKey = PrivateKey.fromString(\n document.getElementById('privateKey').value\n);\n//get account to provide active auth\nconst newAccount = document.getElementById('newAccount').value;\n\n\n3. Database query\n\nThe 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.\n\n//query database for active array\nvar _data = new Array\n_data = await client.database.getAccounts([username]);\nconst activeAuth = _data[0].active;\n\n//check for username duplication\nconst checkAuth = _data[0].active.account_auths;\nvar arrayindex = -1;\nvar checktext = \" does not yet have active permission\"\nfor (var i = 0,len = checkAuth.length; i<len; i++) {\n if (checkAuth[i][0]==newAccount) {\n arrayindex = i\n var checktext = \" already has active permission\"\n }\n}\n\n\nThe result of this status query is then displayed on the UI along with the array on the console as a check.\n\ndocument.getElementById('permCheckContainer').style.display = 'flex';\ndocument.getElementById('permCheck').className = 'form-control-plaintext alert alert-success';\ndocument.getElementById('permCheck').innerHTML = newAccount + checktext;\nconsole.log(checkAuth);\n\n\n4. Object creation\n\nThe 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.\n\n//add account permission\nactiveAuth.account_auths.push([\n newAccount,\n parseInt(activeAuth.weight_threshold)\n]);\nactiveAuth.account_auths.sort();\n\n//revoke permission\nactiveAuth.account_auths.splice(arrayindex, 1);\n\n\nWhen 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.\nAfter 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.\n\n//object creation\nconst accObj = {\n account: username,\n json_metadata: _data[0].json_metadata,\n memo_key: _data[0].memo_key,\n active: activeAuth,\n}\n\n\n5. Broadcast operation\n\nWith 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.\n\n//account update broadcast\nclient.broadcast.updateAccount(accObj, privateKey).then(\n function(result) {\n console.log(\n 'included in block: ' + result.block_num,\n 'expired: ' + result.expired\n );\n document.getElementById('permCheckContainer').style.display = 'flex';\n document.getElementById('permCheck').className = 'form-control-plaintext alert alert-success';\n document.getElementById('permCheck').innerHTML = \"permission has been revoked for \" + newAccount;\n },\n function(error) {\n console.error(error);\n document.getElementById('permCheckContainer').style.display = 'flex';\n document.getElementById('permCheck').className = 'form-control-plaintext alert alert-danger';\n document.getElementById('permCheck').innerHTML = error.jse_shortmsg;\n }\n);\n\n\nThe 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.\n\nsteemlogin 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.\nhttps://steemlogin.com/revoke/@username\nThis is similar to the steemlogin links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://steemlogin.com/sign\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/31_grant_active_permission\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-grant-posting-permission": { + "id": "tutorials-javascript-grant-posting-permission", + "title": "JS: Grant Posting Permission", + "category": "tutorials-javascript", + "description": "_How to grant and revoke posting permission to another user._", + "type": "", + "url": "/tutorials-javascript/grant_posting_permission", + "content": "Full, runnable src of Grant Posting Permission can be downloaded as part of the JS tutorials repository.\n\n\nThis 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.\n\nProviding 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.\n\nIntro\n\nThis 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:\n\n\n account - The username of the main account\n active - Optional parameter to denote changes to the active authority type\n jsonMetadata - This is a string value obtained from the current account info\n memoKey - This is the public memoKey of the user\n owner - Optional parameter to denote changes to the owner authority type\n posting - Optional parameter to denote changes to the posting authority type. This is the parameter that we will be changing in this tutorial\n privateKey - The private active key of the user\n\n\nThe only other information required is the username of the account that the posting permission is being granted to.\n\nThe tutorial is set up with three individual functions for each of the required operations - checking permission status, granting permission and revoking permission.\n\nSteps\n\n\n Configure connection Configuration of dsteem to communicate with a Steem blockchain\n Input variables Collecting the required inputs via an HTML UI.\n Database query Sending a query to the blockchain for the posting permissions (status)\n Object creation Create the array and subsequent data object for the broadcast operation\n Broadcast operation Broadcasting the changes to the blockchain\n\n\n1. Configure connection\n\nAs 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:\n\nconst dsteem = require('dsteem');\n//define network parameters\nlet opts = {};\nopts.addressPrefix = 'STX';\nopts.chainId =\n '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673';\n//connect to a steem node, testnet in this case\nconst client = new dsteem.Client('https://testnet.steem.vc', opts);\n\n\nAbove, 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.\n\n2. Input variables\n\nThe 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.\n\nAll of the functions use the same input variables. Once the function is activated via the UI the variables are allocated as seen below.\n\n//get username\nconst username = document.getElementById('username').value;\n//get private active key\nconst privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('privateKey').value\n);\n//get account to provide posting auth\nconst newAccount = document.getElementById('newAccount').value;\n\n\n3. Database query\n\nThe 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.\n\n //query database for posting array\n _data = new Array\n _data = await client.database.getAccounts([username]);\n const postingAuth = _data[0].posting;\n\n //check for username duplication\n const checkAuth = _data[0].posting.account_auths;\n var arrayindex = -1;\n var checktext = \" does not yet have posting permission\"\n for (var i = 0,len = checkAuth.length; i<len; i++) {\n if (checkAuth[i][0]==newAccount) {\n arrayindex = i\n var checktext = \" already has posting permission\"\n }\n }\n\n\nThe result of this status query is then displayed on the UI along with the array on the console as a check.\n\ndocument.getElementById('permCheckContainer').style.display = 'flex';\ndocument.getElementById('permCheck').className =\n 'form-control-plaintext alert alert-success';\ndocument.getElementById('permCheck').innerHTML = newAccount + checktext;\nconsole.log(checkAuth);\n\n\n4. Object creation\n\nThe 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.\n\n//add account permission\npostingAuth.account_auths.push([\n newAccount,\n parseInt(postingAuth.weight_threshold),\n]);\npostingAuth.account_auths.sort();\n\n//revoke permission\npostingAuth.account_auths.splice(arrayindex, 1);\n\n\nWhen 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.\nAfter 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.\n\n//object creation\nconst accObj = {\n account: username,\n json_metadata: _data[0].json_metadata,\n memo_key: _data[0].memo_key,\n posting: postingAuth,\n};\n\n\n5. Broadcast operation\n\nWith 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.\n\n//account update broadcast\nclient.broadcast.updateAccount(accObj, privateKey).then(\n function(result) {\n console.log(\n 'included in block: ' + result.block_num,\n 'expired: ' + result.expired\n );\n document.getElementById('permCheckContainer').style.display = 'flex';\n document.getElementById('permCheck').className =\n 'form-control-plaintext alert alert-success';\n document.getElementById('permCheck').innerHTML =\n 'posting permission has been granted to ' + newAccount;\n },\n function(error) {\n console.error(error);\n document.getElementById('permCheckContainer').style.display = 'flex';\n document.getElementById('permCheck').className =\n 'form-control-plaintext alert alert-danger';\n document.getElementById('permCheck').innerHTML = error.jse_shortmsg;\n }\n);\n\n\nThe 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”.\n\nsteemlogin 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.\nhttps://steemlogin.com/revoke/@username\nThis is similar to the steemlogin links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://steemlogin.com/sign\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/28_grant_posting_permission\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-power-down": { + "id": "tutorials-javascript-power-down", + "title": "JS: Power Down", + "category": "tutorials-javascript", + "description": "_Perform a power down on all or part of an account's VESTS using either Steemlogin or client-side signing._", + "type": "", + "url": "/tutorials-javascript/power_down", + "content": "Full, runnable src of Power Down can be downloaded as part of the JS tutorials repository.\n\n\nThis tutorial runs on the main Steem blockchain. Therefore, any accounts used here will affect real funds on the live network. Use with caution.\n\nIntro\n\nThis 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.\n\nSteps\n\n\n App setup Setup dsteem to use the proper connection and network.\n Search account Get account details after input has account name\n Calculate and Fill form Calculate available vesting shares and fill the form with details\n Power down Power down VESTS with Steemlogin or client-side signing.\n\n\n1. App setup \n\nBelow, 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to production server\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n//connect to server which is connected to the network/production\nconst client = new dsteem.Client('https://api.steemit.com');\n\n\n2. Search account \n\nAfter 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:\n\n const accSearch = document.getElementById('username').value;\n const _account = await client.database.call('get_accounts', [[accSearch]]);\n console.log(`_account:`, _account);\n\n\n3. Calculate and Fill form \n\nOnce 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:\n\n\n if account is already powering down\n how much is currently powering down\n how much has been delegated (because active delegation locks those funds from being powered down)\n\n\nAvailable balance will be in the avail variable.\n\nFor the convenience of the user, we will convert available VESTS to STEEM with getDynamicGlobalProperties function and fill the form fields accordingly.\n\n const name = _account[0].name;\n const avail = parseFloat(_account[0].vesting_shares) - (parseFloat(_account[0].to_withdraw) - parseFloat(_account[0].withdrawn)) / 1e6 - parseFloat(_account[0].delegated_vesting_shares);\n\n const props = await client.database.getDynamicGlobalProperties();\n const vestSteem = parseFloat(parseFloat(props.total_vesting_fund_steem) *\n (parseFloat(avail) / parseFloat(props.total_vesting_shares)),6);\n\n const balance = `Available Vests for ${name}: ${avail} VESTS ~ ${vestSteem} STEEM POWER<br/><br/>`;\n document.getElementById('accBalance').innerHTML = balance;\n document.getElementById('steem').value = avail+' VESTS';\n\n\nOnce form is filled with the maximum available VESTS balance, we can choose the amount of VESTS to power down.\n\n4. Power down \n\nWe have two options on how to Power down: Steemlogin and client-side signing. By default we generate a Steemlogin 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.\n\nIn 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.\n\nBelow, 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.\n\nwindow.submitTx = async () => {\n const privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('wif').value\n );\n const op = [\n 'withdraw_vesting',\n {\n account: document.getElementById('username').value,\n vesting_shares: document.getElementById('steem').value,\n },\n ];\n client.broadcast.sendOperations([op], privateKey).then(\n function(result) {\n document.getElementById('result').style.display = 'block';\n document.getElementById(\n 'result'\n ).innerHTML = `<br/><p>Included in block: ${\n result.block_num\n }</p><br/><br/>`;\n },\n function(error) {\n console.error(error);\n }\n );\n};\n\n\nThat’s it!\n\nTo run this tutorial\n\n\n git clone https://github.com/steemit/devportal-tutorials-js.git\n cd devportal-tutorials-js/tutorials/23_power_down\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-power-up-steem": { + "id": "tutorials-javascript-power-up-steem", + "title": "JS: Power Up Steem", + "category": "tutorials-javascript", + "description": "_Power up an account's Steem using either Steemlogin or a client-side signing._", + "type": "", + "url": "/tutorials-javascript/power_up_steem", + "content": "Full, runnable src of Power Up Steem can be downloaded as part of the JS tutorials repository.\n\n\nThis tutorial runs on the main Steem blockchain. And accounts queried are real users with liquid STEEM balances.\n\nIntro\n\nThis 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.\n\nSteps\n\n\n App setup Setup dsteem to use the proper connection and network.\n Search account Get account details after input has account name\n Fill form Fill form with account reward balances\n Power up Power up STEEM with Steemlogin or Client-side signing.\n\n\n1. App setup \n\nBelow 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to production server\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n//connect to server which is connected to the network/production\nconst client = new dsteem.Client('https://api.steemit.com');\n\n\n2. Search account \n\nAfter 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:\n\n const accSearch = document.getElementById('username').value;\n const _account = await client.database.call('get_accounts', [[accSearch]]);\n console.log(`_account:`, _account);\n\n\n3. Fill form \n\nAfter we fetched account data, we will fill form with STEEM balance and show current balance details.\n\nconst name = _account[0].name;\nconst steem_balance = _account[0].balance;\nconst balance = `Available Steem balance for ${name}: ${steem_balance}<br/>`;\ndocument.getElementById('accBalance').innerHTML = balance;\ndocument.getElementById('steem').value = steem_balance;\nconst receiver = document.getElementById('receiver').value;\n\n\n4. Power up \n\nWe have 2 options on how to Power up. Steemlogin and Client-side signing options. By default we generate Steemlogin 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.\n\nIn order to enable client signing, we will generate operation and also show Active Private key (wif) field to sign transaction right there client side.\nBelow 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.\n\nwindow.submitTx = async () => {\n const privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('wif').value\n );\n const op = [\n 'transfer_to_vesting',\n {\n from: document.getElementById('username').value,\n to: document.getElementById('receiver').value,\n amount: document.getElementById('steem').value,\n },\n ];\n client.broadcast.sendOperations([op], privateKey).then(\n function(result) {\n document.getElementById('result').style.display = 'block';\n document.getElementById(\n 'result'\n ).innerHTML = `<br/><p>Included in block: ${\n result.block_num\n }</p><br/><br/>`;\n },\n function(error) {\n console.error(error);\n }\n );\n};\n\n\nThat’s it!\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/22_power_up_steem\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-reblogging-post": { + "id": "tutorials-javascript-reblogging-post", + "title": "JS: Reblogging Post", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you should know how to reblog (resteem) a blog from steem_", + "type": "", + "url": "/tutorials-javascript/reblogging_post", + "content": "Full, runnable src of Reblogging Post can be downloaded as part of the JS tutorials repository.\n\n\nThis 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.\n\nIntro\n\nWe 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:\n\n\n The account name that is doing the reblog\n The private posting key of the account that is doing the reblog (this is not your main key)\n The author of the post that is being reblogged\n The title of the post that is being reblogged\n\n\nA 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.\n\nThis tutorial makes use of the This function is taken from the tutorial Blog Feed to get a list of trending posts.\n\nSteps\n\n\n Configure connection Configuration of dsteem to use the proper connection and network.\n Collecting information Generating relevant posting information with an HTML interface.\n Broadcasting the reblog Assigning variables and executing the reblog.\n\n\n1. Configure connection**\n\nBelow 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.\nThere 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:\n\nconst dsteem = require('dsteem');\n\n//define network parameters\nlet opts = {};\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n//connect to a Steem node. This is currently setup on production, but we recommend using a testnet like https://testnet.steem.vc\nconst client = new dsteem.Client('https://api.steemit.com', opts);\n\n\n2. Collecting information\n\nNext we have the submitPost function that collects the required fields for the reblog process via an HTML interface\nafter wich we assign them to variables for use later.\n\n//this function will execute when the HTML form is submitted\nwindow.submitPost = async () => {\n //get private key\n const privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('postingKey').value\n );\n //get account name\n const myAccount = document.getElementById('username').value;\n //get blog author\n const theAuthor = document.getElementById('theAuthor').value;\n //get blog permLink\n const thePermLink = document.getElementById('thePermLink').value;\n\n\n3. Broadcasting the reblog\n\nFinally we create two variables to simply the client.broadcast function line and broadcast the reblog instruction.\n\nconst jsonOp = JSON.stringify([\n 'reblog',\n {\n account: myAccount,\n author: theAuthor,\n permlink: thePermLink,\n },\n]);\n\nconst data = {\n id: 'follow',\n json: jsonOp,\n required_auths: [],\n required_posting_auths: [myAccount],\n};\n\nclient.broadcast.json(data, privateKey).then(\n function(result) {\n console.log('client broadcast result: ', result);\n },\n function(error) {\n console.error(error);\n }\n);\n\n\nThere are also two console functions an a ui output under Resteem Results defined in order to track if the reblog\nas successful or not. If the broadcast succeeds the console.log will show the following:\n\nclient broadcast result:\n\n{\n id: \"f10d69ac521cf34b0f5d18d938e68c89e77bb31d\",\n block_num: 22886453,\n trx_num: 35,\n expired: false\n}\n\n\nThis indicates the block number at which the broadcast was sent as well as the transaction ID for the reblog.\n\nIf the reblog fails the console.log will present a long line of error code:\n\n{\n name: \"RPCError\",\n jse_shortmsg: \"blog_itr == blog_comment_idx.end(): Account has already reblogged this post\",\n jse_info: {\n ode: 10,\n name: \"assert_exception\",\n message: \"Assert Exception\",\n stack: Array(6)\n },\n message: \"blog_itr == blog_comment_idx.end(): Account has already reblogged this post\",\n stack: \"RPCError: blog_itr == blog_comment_idx.end(): Acco…lled (http://localhost:3000/bundle.js:440:690874)\"\n}\n\n\nThere 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.\n\nIt 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\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/14_reblogging_post\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-search-accounts": { + "id": "tutorials-javascript-search-accounts", + "title": "JS: Search Accounts", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you should know how to call a list of user names from the steem blockchain_", + "type": "", + "url": "/tutorials-javascript/search_accounts", + "content": "Full, runnable src of Search Accounts can be downloaded as part of the JS tutorials repository.\n\n\nThis 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.\n\nIntro\n\nWe 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:\n\n\n The max number of user names that needs to be displayed by the search\n The string representing the first characters of the user name you are searching for\n\n\nA 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.\n\nSteps\n\n\n Configure connection Configuration of dsteem to use the proper connection and network.\n Collecting input variables Assigning and collecting the necessary variables\n Blockchain query Finding the data on the blockchain based on the inputs\n Output Displaying query results\n\n\n1. Configure connection\n\nBelow 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to production server\nopts.addressPrefix = 'STM';\nopts.chainId =\n\t'0000000000000000000000000000000000000000000000000000000000000000';\n//connect to server which is connected to the network/production\nconst client = new dsteem.Client('https://api.steemit.com');\n\n\n2. Collecting input variables\n\nNext 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.\n\nconst max = 10;\nwindow.submitAcc = async () => {\n const accSearch = document.getElementById(\"username\").value;\n\n\n3. Blockchain query\n\nThe 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.\n\nconst _accounts = await client.database.call('lookup_accounts',[accSearch, max]);\n console.log(`_accounts:`, _accounts);\n\n\n4. Output\n\nFinally we create a list from the “_accounts” array generated in step 3.\n\ndocument.getElementById('accList').innerHTML = _accounts.join('<br>');\n}\n\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/15_search_accounts\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-search-tags": { + "id": "tutorials-javascript-search-tags", + "title": "JS: Search Tags", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you should know how to run a search for trending tags_", + "type": "", + "url": "/tutorials-javascript/search_tags", + "content": "Full, runnable src of Search Tags can be downloaded as part of the JS tutorials repository.\n\n\nThis tutorial runs on the main Steem blockchain.\n\nIntro\n\nThis 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.\n\nsteps\n\n\n Configure connection Configuration of dsteem to use the proper connection and network.\n Search input Collecting the relevant search criteria\n Run Search Running the search on the blockchain\n Output Displaying the results of the search query\n\n\n1. Configure connection \n\nBelow 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to production server\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n//connect to server which is connected to the network/production\nconst client = new dsteem.Client('https://api.steemit.com');\n\n\n2. Search input \n\nCollecting 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:\n\nconst max = 10;\nwindow.submitTag = async () => {\n const tagSearch = document.getElementById(\"tagName\").value;\n\n\n3. Run Search \n\nIn order to access the blockchain to run the search a call function is used with the search field and maximum list items as parameters.\n\nconst _tags = await client.database.call('get_trending_tags',[tagSearch, max]);\n\n\nThe result of the search is an array of tags along with their respective vital data like comments, payouts, etc.\n\n4. Output \n\nDue 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.\n\nconsole.log('tags: ', _tags);\nvar posts = [];\n_tags.forEach(post => {\n posts.push(\n `<div class=\"list-group-item\"><h5 class=\"list-group-item-heading\">${\n post.name\n }</h5></div>`\n );\n});\n//disply list of tags with line breaks\ndocument.getElementById('tagList').innerHTML = posts.join('<br>');\n\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/16_search_tags\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-set-withdraw-route": { + "id": "tutorials-javascript-set-withdraw-route", + "title": "JS: Set Withdraw Route", + "category": "tutorials-javascript", + "description": "_Set routes to an account's power downs or withdraws._", + "type": "", + "url": "/tutorials-javascript/set_withdraw_route", + "content": "Full, runnable src of Set Withdraw Route can be downloaded as part of the JS tutorials repository.\n\n\nWe will learn how to allocate a percentage for withdrawal to other accounts using Steemlogin 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.\n\nIntro\n\nThis 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.\n\nSteps\n\n\n App setup Setup dsteem to use the proper connection and network.\n Get account routes Get account’s current routes\n Fill form Fill form with appropriate data\n Set withdraw route Set route with Steemlogin or client-side signing\n\n\n1. App setup \n\nBelow, 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to production server\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n//connect to server which is connected to the network/production\nconst client = new dsteem.Client('https://api.steemit.com');\n\n\n2. Get account routes \n\nAfter 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:\n\n const accSearch = document.getElementById('username').value;\n\n const _account = await client.database.call('get_withdraw_routes', [accSearch]);\n console.log(`_account:`, _account);\n\n\n3. Fill form \n\nAfter 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.\n\nlet info = '';\nlet sum = 0;\nif (_account.length > 0) {\n for (var i = 0; i < _account.length; i++) {\n info += `${_account[i].to_account} - ${_account[i].percent / 100}%<br>`;\n sum += _account[i].percent / 100;\n }\n} else {\n info += `No route is available!<br>`;\n}\ninfo += `You can set ${100 - sum}% remaining part to other accounts!`;\ndocument.getElementById('accInfo').innerHTML = info;\n\n\nPrevious routes can be overwritten by changing and submitting a new transaction to the same account.\n\nWe also generate a Steemlogin signing link.\n\nwindow.openSC = async () => {\n const link = `https://steemlogin.com/sign/set-withdraw-vesting-route?from_account=${\n document.getElementById('username').value\n }&percent=${document.getElementById('steem').value * 100}&to_account=${\n document.getElementById('account').value\n }&auto_vest=${document.getElementById('percent').checked}`;\n window.open(link);\n};\n\n\n4. Set withdraw route \n\nWe have two options on how to Power down: Steemlogin 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:\n\nwindow.submitTx = async () => {\n const privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('wif').value\n );\n const op = [\n 'set_withdraw_vesting_route',\n {\n from_account: document.getElementById('username').value,\n to_account: document.getElementById('account').value,\n percent: document.getElementById('steem').value * 100,\n auto_vest: document.getElementById('percent').checked,\n },\n ];\n client.broadcast.sendOperations([op], privateKey).then(\n function(result) {\n document.getElementById('result').style.display = 'block';\n document.getElementById(\n 'result'\n ).innerHTML = `<br/><p>Included in block: ${\n result.block_num\n }</p><br/><br/>`;\n },\n function(error) {\n console.error(error);\n }\n );\n};\n\n\nThat’s it!\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/26_set_withdraw_route\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-steemlogin": { + "id": "tutorials-javascript-steemlogin", + "title": "JS: Steemlogin", + "category": "tutorials-javascript", + "description": "_Understand the basics of using Steemlogin with your Steem application._", + "type": "", + "url": "/tutorials-javascript/steemlogin", + "content": "Full, runnable src of Steemlogin can be downloaded as part of the JS tutorials repository.\n\n\nIn this tutorial we will setup Steemlogin for demo application and step by step show the process of setting up dedicated account for your app to use Steemlogin Dashboard and setup backend of your application to use Steemlogin authorization properly.\n\nIntro\n\nThe application in this tutorial asks the user to grant an access to demo-app and get token from Steemlogin. Once permission is granted, demo-app can get details of user via an api call that requires access token.\nPurpose is to allow any application request permission from user and perform action via access token.\n\nSome other calls that require an access token (or login) are:\n\n\n Vote\n Comment\n Post\n Follow\n Reblog\n\n\nLearn more about Steemlogin operations here\n\nSteps\n\n\n Steemlogin Dashboard Create account for application and set up dashboard\n Initialize Steemlogin Initialize SDK in your application code\n Login URL Form login url for user\n Request token Request token with login url\n Set token Set or save token for future requests\n Get user data Get user details with token\n Logout Logout user and clear token\n\n\n1. Steemlogin Dashboard\n\nsteemlogin is unified authentification system built on top of Steem built in collaboration of Busy.org and Steemit Inc.\nLayer to ensure easy access and setup for all application developers as well as secure way for users to interact with Steem apps.\n\nSetting up Steemlogin in your app is straight-forward process and never been this easy.\n\nHere are the steps that helps you to setup new app:\n\n1a. Visit Steemlogin Dashboard and login with your Steem credentials\n\n\n\n1b. You will see Applications and Developers section, in Developers section click on My Apps\n\n\n\n\n\n1c. Create New App using Steemlogin, which will help you create new Steem account for your application. Let’s call it demo-app for this tutorial purpose.\n\n\n\nAccount creation fee will be deducted from your balance, make sure you have enough funds to complete account creation.\n\nNext step is to login with account which has enough balance to pay for account creation fee.\n\n\n\n1d. Give your app name, description, icon image link, website (if available) and Redirect URI(s)\n\n\n\nApplication name and description should give users clear understanding what permissions it requires and what is the purpose of the app.\n\nApp Icon field should be publicly accessible and available link to your logo or icon.\n\nWebsite field is homepage for the application if exist.\n\nRedirect 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 Steemlogin 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.\nThis is typical backend web development, we hope you know how to set up your backend/app to handle callback URLs.\n\n\n Disclaimer: All images/screenshots of user interface may change as Steemlogin evolves\n\n\n2. Initialize Steemlogin\n\nOnce you have setup account for new application, you can setup application with Steemlogin authentification and API processes.\nTo do that, you will need to install sc2-sdk nodejs package with npm i sc2-sdk.\nWithin application you can initialize Steemlogin\n\n\n 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\n\n\nNow that sc2-sdk is initialized we can start authentication and perform simple operations with Steemlogin.\n\n3. Login URL\n\n\n 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.\n\n\n4. Request token\n\n\n 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\n\n\n5. Set token\n\n\n 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.\n\n\n\n After getting access_token, we can set token for future Steemlogin API requests.\n\n\n6. Get user data\n\n\n Users info can be checked with me which will return object\naccount - 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.\n\n\n7. Logout\n\n\n In order to logout, you can use revokeToken function from sc2-sdk.\n\n\nThat’s all there is to it.\n\nTo Run the tutorial\n\n\n clone this repo\n cd tutorials/02_steemlogin\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-stream-blockchain-transactions": { + "id": "tutorials-javascript-stream-blockchain-transactions", + "title": "JS: Stream Blockchain Transactions", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you should know how to stream transactions and blocks from Steem blockchain._", + "type": "", + "url": "/tutorials-javascript/stream_blockchain_transactions", + "content": "Full, runnable src of Stream Blockchain Transactions can be downloaded as part of the JS tutorials repository.\n\n\nThis 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.\n\nIntro\n\nTutorial 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.\n\nWe 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.\n\nSteps\n\n\n App setup Configure proper settings for dsteem\n Stream blocks Stream blocks\n Display result Show results in proper UI\n\n\n1. App setup\n\nAs 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:\n\nconst dsteem = require('dsteem');\n\nlet opts = {};\n\n//connect to production server\nopts.addressPrefix = 'STM';\nopts.chainId =\n '0000000000000000000000000000000000000000000000000000000000000000';\n\n//connect to server which is connected to the network/production\nconst client = new dsteem.Client('https://api.steemit.com');\n\n\nAbove, 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.\n\n2. Stream blocks\n\nNext, we have a main function which fires at on-load and starts streaming blocks from network.\n\nstream = client.blockchain.getBlockStream();\nstream\n .on('data', function(block) {\n //console.log(block);\n blocks.unshift(\n `<div class=\"list-group-item\"><h5 class=\"list-group-item-heading\">Block id: ${\n block.block_id\n }</h5><p>Transactions in this block: ${\n block.transactions.length\n } <br>Witness: ${\n block.witness\n }</p><p class=\"list-group-item-text text-right text-nowrap\">Timestamp: ${\n block.timestamp\n }</p></div>`\n );\n document.getElementById('blockList').innerHTML = blocks.join('');\n })\n .on('end', function() {\n // done\n console.log('END');\n });\n\n\nWe have also defined Pause and Resume functions for relevant buttons to pause/resume stream at any moment.\n\n//pause stream\nwindow.pauseStream = async () => {\n state = stream.pause();\n};\n\n//resume stream\nwindow.resumeStream = async () => {\n state = state.resume();\n};\n\n\n3. Display result\n\nIn above scection, following line of code populates object with the data coming from Stream:\n\nblocks.unshift(\n `<div class=\"list-group-item\"><h5 class=\"list-group-item-heading\">Block id: ${\n block.block_id\n }</h5><p>Transactions in this block: ${\n block.transactions.length\n } <br>Witness: ${\n block.witness\n }</p><p class=\"list-group-item-text text-right text-nowrap\">Timestamp: ${\n block.timestamp\n }</p></div>`\n);\n\n\nExample of output:\n\n{\n block_id: \"015d34f12bced299cec068500fdbf3070016160c\",\n extensions:[],\n previous:\"015d34f021e85b437c9fcb8cf47d9e258a1ad7e4\",\n signing_key:\"STM5zNNjMyCKbhcPgo5ca7jq9UBGVzpq6yoaHw1R2dKaZdxhcuwuW\",\n timestamp:\"2018-05-30T14:27:36\",\n transaction_ids:\n [\"0e7ce7445884c44346da4dafdef99ea7fda60bd0\", \"194f404d3dab66459421792045625334f7465da1\"],\n transaction_merkle_root:\"bc39f1fb9edbb02200d1ab0e68d3dbc4afc62aca\",\n transactions:[{…}, {…}],\n witness:\"good-karma\",\n witness_signature:\"2005f2d5f9d4000ca2ba76db5e555982e3ca47d6f6516ea1bacb316545b478d6617987afd71b5bf0b3f231fdc140453f9043b8ea981220cecf44118d50eedbe870\"\n}\n\n\nThat’s it!\n\nTo Run the tutorial\n\n\n clone this repo\n cd tutorials/13_stream_blockchain_transactions\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-submit-comment-reply": { + "id": "tutorials-javascript-submit-comment-reply", + "title": "JS: Submit Comment Reply", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you should know how to post a simple comment to Steem._", + "type": "", + "url": "/tutorials-javascript/submit_comment_reply", + "content": "Full, runnable src of Submit Comment Reply can be downloaded as part of the JS tutorials repository.\n\n\nThis tutorial will take you through the process of preparing and posting comment using the broadcast.comment operation.\nBeing able to post a comment is critical to most social applications built on Steem.\n\nIntro\n\nWe 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.\n\nSteps\n\n\n App setup Import dsteem into app.js and prepare it to communicate with a Steem blockchain\n Choose parent post Choose a parent post on which to comment. Parse the author and permlink from it.\n Add content Add body content to your comment\n Get comment data Collect values from the UI\n Create comment permlink Create a permlink for your comment\n Build comment object Assemble the information into a valid comment object\n Post comment Send the new comment to the blockchain & render the result.\n\n\n1. App setup\n\nAs 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to community testnet\nopts.addressPrefix = 'STX';\nopts.chainId =\n '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673';\n//connect to server which is connected to the network/testnet\nconst client = new dsteem.Client('https://testnet.steem.vc', opts);\n\n\nAbove, we have dsteem pointing to the test network with the proper chainId, addressPrefix, and endpoint.\nBecause this tutorial modifies the blockchain, we will use a testnet and a predefined account to demonstrate comment publishing.\n\n2. Choose parent post\n\nWe need to choose a parent post and parse out the parent author and parent permlink.\nBelow is a url that uses an instance of condenser pointed at our testnet.\n\nhttp://condenser.steem.vc/qbvxoy72qfc/@demo/dsf0yxlox2d\n\n\nIn this case. dsf0yxlox2d will be our parent permlink and @demo will be the the parent author.\n\n3. Add content\n\nWe’ve added the parent post info and Some amazing content in our UI via the keyboard.\n\n\n4. Get Comment Data\n\nIn the submitComment function, (runs when “Submit comment!” is clicked)\nWe gather information from the UI.\n\n//get private key\nconst privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('postingKey').value\n);\n//get account name\nconst account = document.getElementById('username').value;\n//get body\nconst body = document.getElementById('body').value;\n//get parent author permalink\nconst parent_author = document.getElementById('parent_author').value;\n//get parent author permalink\nconst parent_permlink = document.getElementById('parent_permlink').value;\n\n\n5. Create comment permlink\n\nEvery post needs a unique permalink.\nBecause comments don’t typically have a title, we recommend using a random number for ours.\n\nNote: 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.\n\n//generate random permanent link for post\nconst permlink = Math.random()\n .toString(36)\n .substring(2);\n\n\n6. Build comment object\n\nWe take the information we gathered from the UI and put it into a well structured comment object.\n\nconst comment = {\n author: account,\n title: '',\n body: body,\n parent_author: parent_author,\n parent_permlink: parent_permlink,\n permlink: permlink,\n json_metadata: '',\n};\n\n\n7. Post comment\n\nWe post the comment to the blockchain and render the resulting block number if successful,\nor output an error to the console if there’s a failure.\n\nconsole.log('comment broadcast object', comment);\nclient.broadcast.comment(comment, privateKey).then(\n function(result) {\n console.log('comment broadcast result', result);\n document.getElementById(\n 'postLink'\n ).innerHTML = `<br/><p>Included in block: ${\n result.block_num\n }</p><br/><br/><a href=\"http://condenser.steem.vc/@${parent_author}/${parent_permlink}\">Check post here</a>`;\n },\n function(error) {\n console.error(error);\n }\n);\n\n\nA successful comment will output something like the following to the console:\n\n\nThat’s all there is to it.\n\nThe 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\n\nTo Run the tutorial\n\n\n clone this repo\n cd tutorials/11_submit_comment_reply\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-submit-post": { + "id": "tutorials-javascript-submit-post", + "title": "JS: Submit Post", + "category": "tutorials-javascript", + "description": "_By the end of this tutorial you should know how to prepare comments for Steem and then submit using the broadcast.comment function._", + "type": "", + "url": "/tutorials-javascript/submit_post", + "content": "Full, runnable src of Submit Post can be downloaded as part of the JS tutorials repository.\n\n\nThis 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.\n\nIntro\n\nWe 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.\n\nSteps\n\n\n App setup Configuration of dsteem to use the proper connection and network.\n Fetch Steem Post or Comment data Defining information variables with the submitpost function.\n Format and Broadcast Formatting the comments and submitting to the blockchain.\n\n\n1. App setup\n\nBelow 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.\nThere 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:\n\nconst dsteem = require('dsteem');\nlet opts = {};\n//connect to community testnet\nopts.addressPrefix = 'STX';\nopts.chainId =\n '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673';\n//connect to server which is connected to the network/testnet\nconst client = new dsteem.Client('https://testnet.steem.vc', opts);\n\n\n2. Fetch Steem Post or Comment data\n\nNext, we have the submitPost function which executes when the Submit post button is clicked.\n\n//get private key\nconst privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('postingKey').value\n);\n//get account name\nconst account = document.getElementById('username').value;\n//get title\nconst title = document.getElementById('title').value;\n//get body\nconst body = document.getElementById('body').value;\n//get tags and convert to array list\nconst tags = document.getElementById('tags').value;\nconst taglist = tags.split(' ');\n//make simple json metadata including only tags\nconst json_metadata = JSON.stringify({ tags: taglist });\n//generate random permanent link for post\nconst permlink = Math.random()\n .toString(36)\n .substring(2);\n\n\nThe 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.\n\n3. Format and Broadcast\n\nThe next step is to pass all of these elements in 2. to the client.broadcast.comment function.\n\n//broadcast post to the testnet\nclient.broadcast\n .comment(\n {\n author: account,\n body: body,\n json_metadata: json_metadata,\n parent_author: '',\n parent_permlink: taglist[0],\n permlink: permlink,\n title: title,\n },\n privateKey\n )\n .then(\n function(result) {\n document.getElementById('title').value = '';\n document.getElementById('body').value = '';\n document.getElementById('tags').value = '';\n document.getElementById('postLink').style.display = 'block';\n document.getElementById(\n 'postLink'\n ).innerHTML = `<br/><p>Included in block: ${\n result.block_num\n }</p><br/><br/><a href=\"http://condenser.steem.vc/${\n taglist[0]\n }/@${account}/${permlink}\">Check post here</a>`;\n },\n function(error) {\n console.error(error);\n }\n );\n\n\nNote 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.\n\nAfter 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.\n\nThe 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\n\nTo Run the tutorial\n\n\n clone this repo\n cd tutorials/10_submit_post\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-transfer-steem-and-sbd": { + "id": "tutorials-javascript-transfer-steem-and-sbd", + "title": "JS: Transfer Steem And Sbd", + "category": "tutorials-javascript", + "description": "_Transfer both STEEM and SBD from one account to another._", + "type": "", + "url": "/tutorials-javascript/transfer_steem_and_sbd", + "content": "Full, runnable src of Transfer Steem And Sbd can be downloaded as part of the JS tutorials repository.\n\n\nThis 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.\n\nThere is also an alternative method to transfer from one account to another using a hot signing link that can be generated via Steemlogin. 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.\n\nIntro\n\nWe 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:\n\n\n Username - The username of the account making the transfer (from account)\n Privatekey - This is the private active key of the sender\n Recipient - The account that is receiving the STEEM or SBD (to account)\n Memo - This is a text field which can be used for a comment on the transfer or it can be left empty\n 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\n 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\n\n\nIt is noteworthy that Steem Power (VESTS) cannot be transferred with this operation.\n\nSteps\n\n\n Configure connection Configuration of dsteem to communicate with a Steem blockchain\n Input variables Collecting the required inputs via an HTML UI\n Object creation Creating an object to use in the broadcast operation\n Broadcast Broadcasting the transfer to the blockchain\n\n\n1. Configure connection\n\nAs 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:\n\nconst dsteem = require('dsteem');\n//define network parameters\nlet opts = {};\nopts.addressPrefix = 'STX';\nopts.chainId =\n '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673';\n//connect to a steem node, testnet in this case\nconst client = new dsteem.Client('https://testnet.steem.vc', opts);\n\n\nAbove, we have dsteem pointing to the test network with the proper chainId, addressPrefix, and endpoint.\nBecause this tutorial modifies the blockchain, we will use a testnet and predefined accounts to demonstrate the transfer process.\n\n2. Input variables\n\nThe 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.\n\nThe parameter values are allocated as seen below, once the user clicks on the “Transfer” button.\n\nwindow.submitTransfer = async () => {\n //get all values from the UI\n //get account name of sender\n const username = document.getElementById('username').value;\n //get private active key\n const privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('privateKey').value\n );\n //get recipient\n const recipient = document.getElementById('recipient').value;\n //get comments\n const comments = document.getElementById('comments').value;\n //get transfer amount\n const quantity = document.getElementById('quantity').value;\n //get transfer type\n const type = document.getElementById('type').value;\n\n\n3. Object creation\n\nIn 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.\n\nconst transfer = quantity.concat(' ', type);\n\n//create transfer object\nconst transf = new Object();\ntransf.from = username;\ntransf.to = recipient;\ntransf.amount = transfer;\ntransf.memo = comments;\n\n\n4. Broadcast\n\nWe 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.\n\nclient.broadcast.transfer(transf, privateKey).then(\n function(result) {\n console.log(\n 'included in block: ' + result.block_num,\n 'expired: ' + result.expired\n );\n document.getElementById('transferResultContainer').style.display =\n 'flex';\n document.getElementById('transferResult').className =\n 'form-control-plaintext alert alert-success';\n document.getElementById('transferResult').innerHTML = 'Success';\n },\n function(error) {\n console.error(error);\n document.getElementById('transferResultContainer').style.display =\n 'flex';\n document.getElementById('transferResult').className =\n 'form-control-plaintext alert alert-danger';\n document.getElementById('transferResult').innerHTML =\n error.jse_shortmsg;\n }\n);\n\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/20_transfer_STEEM_and_SBD\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-vote-on-content": { + "id": "tutorials-javascript-vote-on-content", + "title": "JS: Vote On Content", + "category": "tutorials-javascript", + "description": "_Create a weighted up or down vote on a comment/post._", + "type": "", + "url": "/tutorials-javascript/vote_on_content", + "content": "Full, runnable src of Vote On Content can be downloaded as part of the JS tutorials repository.\n\n\nThis tutorial will take you through the process of preparing and submitting a vote using the broadcast operation.\nBecause this tutorial essentially produces spam, it will be pointed at a Steem testnet. The testnet is an open resource,\nso the default account and posting key in this tutorial may have been changed by another developer learning the ropes.\nIf that happens, you’ll want to create a new account on the testnet and use that account’s credentials instead.\n\nTo learn more about the testnet, including an easy way to create a play account, visit https://testnet.steem.vc/\n\nIntro\n\nWe are using the broadcast.vote function provided by the dsteem library to send the transaction through to the\nnetwork. On the Steem platform, posts and comments are all internally stored as a comment object, differentiated by\nwhether or not a parent_author exists. When there is no parent_author, then it’s a post, when there is, it’s a\ncomment. Voting is done on either of the two based on the author and permlink of the comment. There are 5 parameters\nrequired for the voting operation:\n\n\n Username - The username of the account making the vote (the voter)\n Privatekey - This is the private posting key of the voter\n Author - The author of the comment/post that the voter is voting on\n Permlink - The unique identifier of the comment/post of the author\n Weight - This is the weight that the vote will carry. The value ranges from -10000 (100% flag) to 10000 (100% upvote)\n\n\nDue 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\n\nSteps\n\n\n Configure connection Configuration of dsteem to communicate with a Steem blockchain\n Create new post Creating a new post on the testnet\n Input variables Collecting the required inputs via an HTML UI\n Broadcast Creating an object and broadcasting the vote to the blockchain\n\n\n1. Configure connection\n\nAs 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:\n\nimport { Client, PrivateKey } from 'dsteem';\nimport { Testnet as NetConfig } from '../../configuration'; //A Steem Testnet. Replace 'Testnet' with 'Mainnet' to connect to the main Steem blockchain.\n\nlet opts = { ...NetConfig.net };\n\n//connect to a steem node, testnet in this case\nconst client = new Client(NetConfig.url, opts);\n\n\nAbove, 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.\n\nwindow.onload = () => {\n const account = NetConfig.accounts[0];\n document.getElementById('username').value = account.address;\n document.getElementById('postingKey').value = account.privPosting;\n};\n\n\n2. Create new post\n\nA 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.\n\n//refer to \"10_submit_post\" in the tutorials folder for creating a post on steemit\n//create post function\nwindow.createPost = async () => {\n //get private key\n const privateKey = createPrivateKey();\n //get account name\n const account = document.getElementById('username').value;\n //for content\n const time = new Date().getTime();\n //get title\n const title = `developers.steem.io - JS-T:17 ${time}`;\n //get body\n 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)\n \n ${time}`;\n //get tags and convert to array list\n const tags = 'blog';\n const taglist = tags.split(' ');\n //make simple json metadata including only tags\n const json_metadata = JSON.stringify({ tags: taglist });\n //generate random permanent link for post\n const permlink = Math.random()\n .toString(36)\n .substring(2);\n\n client.broadcast\n .comment(\n {\n author: account,\n body: body,\n json_metadata: json_metadata,\n parent_author: '',\n parent_permlink: tags,\n permlink: permlink,\n title: title,\n },\n privateKey\n )\n .then(\n function(result) {\n document.getElementById('permlink').innerHTML = permlink;\n document.getElementById(\n 'postLink'\n ).innerHTML = `Included in block: <a href=\"http://condenser.steem.vc/${\n taglist[0]\n }/@${account}/${permlink}\" target=\"_blank\">${\n result.block_num\n }</a>`;\n document.getElementById('postResult').style.display = 'flex';\n document.getElementById('permlink').value = permlink;\n },\n function(error) {\n console.error(error);\n }\n );\n};\n\n\nYou may have noted the mystery function createPrivateKey(). It’s a convenience function that allows us to give the\nuser some meaningful UI feedback if they put in a bad posting key. The important part of it is\nreturn dsteem.PrivateKey.fromString(<somestring>) but its full glory can be seen in the snippet below\n\nconst createPrivateKey = function() {\n try {\n return dsteem.PrivateKey.fromString(\n document.getElementById('postingKey').value\n );\n } catch (e) {\n const resultEl = document.getElementById('result');\n resultEl.className = 'form-control-plaintext alert alert-danger';\n resultEl.innerHTML = e.message + ' - See console for full error.';\n throw e;\n }\n};\n\n\n3. Input variables\n\nThe 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.\n\nThe parameter values are allocated as seen below, once the user clicks on the “Submit” button.\n\nwindow.submitVote = async () => {\n //we'll make use of resultEl in multiple child scopes. This is generally good practice.\n const resultEl = document.getElementById('result');\n resultEl.innerHTML = 'pending...';\n\n //get all values from the UI//\n //get account name of voter\n const voter = document.getElementById('username').value;\n //get private posting key\n const privateKey = createPrivateKey();\n //get author of post/comment to vote\n const author = document.getElementById('author').value;\n //get post permalink to vote\n const permlink = document.getElementById('permlink').value;\n //get weight of vote\n const weight = parseInt(\n document.getElementById('currentWeight').innerHTML,\n 10\n );\n ....\n\n\nThe 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.\n\n4. Broadcast\n\nWe create a vote object with the input variables before we can broadcast to the blockchain.\n\nconst vote = {\n voter,\n author,\n permlink,\n weight, //needs to be an integer for the vote function\n};\n\n\nAfter 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.\n\nclient.broadcast.vote(vote, privateKey).then(\n function(result) {\n console.log('success:', result);\n resultEl.className = 'form-control-plaintext alert alert-success';\n resultEl.innerHTML = 'Success! See console for full response.';\n },\n function(error) {\n console.log('error:', error);\n resultEl.className = 'form-control-plaintext alert alert-danger';\n resultEl.innerHTML =\n error.jse_shortmsg + ' - See console for full response.';\n }\n );\n\nwindow.onload = () => {\n var voteWeightSlider = document.getElementById('voteWeight');\n var currentWeightDiv = document.getElementById('currentWeight');\n currentWeightDiv.innerHTML = voteWeightSlider.value;\n voteWeightSlider.oninput = function() {\n currentWeightDiv.innerHTML = this.value;\n };\n\n\nMore information on how to use the broadcast operation and options surrounding the operation can be found on the Steem Devportal\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/17_vote_on_content\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + , + + "tutorials-javascript-witness-listing-and-voting": { + "id": "tutorials-javascript-witness-listing-and-voting", + "title": "JS: Witness Listing And Voting", + "category": "tutorials-javascript", + "description": "_Create a list of available witnesses as well as vote for and remove your vote for a witness._", + "type": "", + "url": "/tutorials-javascript/witness_listing_and_voting", + "content": "Full, runnable src of Witness Listing And Voting can be downloaded as part of the JS tutorials repository.\n\n\nThis 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.\n\nThere is also an alternative method to vote for a witness using a hot signing link that can be generated via Steemlogin. 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.\n\nIntro\n\nWe 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:\n\n\n limit - Used in creating the witness list. Denotes the maximum number of witnesses to display\n voter - This is the account making the vote\n privatekey - The private active key of the voter account\n witness - The name of the witness being voted for\n approve - This is a boolean value determining whether the voting opration is to vote for, or to remove a vote\n\n\nSteps\n\n\n Configure connection Configuration of dsteem to communicate with a Steem blockchain\n Create witness list Displaying a list of active witnesses\n Input variables Collecting the required inputs via an HTML UI\n Voting status Confirming the current vote status for the selected witness\n Broadcast Creating an object and broadcasting the vote to the blockchain\n\n\n1. Configure connection\n\nAs 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:\n\nimport { Client, PrivateKey } from 'dsteem';\nimport { Testnet as NetConfig } from '../../configuration'; //A Steem Testnet. Replace 'Testnet' with 'Mainnet' to connect to the main Steem blockchain.\n\nlet opts = { ...NetConfig.net };\n//connect to a steem node, testnet in this case\nconst client = new Client(NetConfig.url, opts);\n\n\nAbove, 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.\n\nwindow.onload = async () => {\n const account = NetConfig.accounts[0];\n document.getElementById('username').value = account.address;\n document.getElementById('activeKey').value = account.privActive;\n};\n\n\n2. Create witness list\n\nWe 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.\n\nwindow.createList = async () => {\n //get list limit\n const limit = document.getElementById('limit').value;\n\n const witnessdata = await client.database.getState('witnesses');\n var witnesses = [];\n\n for (const witness in witnessdata.witnesses) {\n console.log('witness', witness);\n witnesses.push(\n `<li><a href=\"#\" onclick=\"document.getElementById('witness').value = '${witness}';\">${witness}</a></li>`\n );\n }\n console.log('witnesses', witnesses);\n document.getElementById('witnessList').innerHTML = witnesses.join('');\n document.getElementById('witnessListContainer').style.display = 'flex';\n};\n\n\n3. Input variables\n\nThe 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.\n\nThe parameter values are allocated as seen below, once the user clicks on the “Submit Vote” button.\n\nwindow.submitVote = async () => {\n //get all values from the UI\n //get account name of voter\n const voter = document.getElementById('username').value;\n //get private active key\n const privateKey = dsteem.PrivateKey.fromString(\n document.getElementById('activeKey').value\n );\n //get witness name\n const witness = document.getElementById('witness').value;\n\n\n4. Voting status\n\nThe 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.\n\n //check if witness is already voted for\n _data = new Array\n _data = await client.database.getAccounts([voter]);\n const witnessvotes = _data[0][\"witness_votes\"];\n const approve = witnessvotes.includes(witness);\n if (approve) {\n checkresult = \"Witness has already been voted for, would you like to remove vote?\"\n votecheck = \"Vote removed\"\n } else {\n checkresult = \"Witness has not yet been voted for, would you like to vote?\"\n votecheck = \"Vote added\"\n }\n\n document.getElementById('voteCheckContainer').style.display = 'flex';\n document.getElementById('voteCheck').className = 'form-control-plaintext alert alert-success';\n document.getElementById('voteCheck').innerHTML = checkresult;\n\n document.getElementById(\"submitYesBtn\").style.visibility = \"visible\";\n document.getElementById(\"submitNoBtn\").style.visibility = \"visible\";\n\n\n5. Broadcast\n\nWhen 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.\n\nwindow.submitYes = async () => {\n //create vote object\n const vote = [\n 'account_witness_vote',\n { account: voter, witness: witness, approve: !approve },\n ];\n\n\nThe 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.\n\nAfter 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.\n\n//broadcast the vote\nclient.broadcast.sendOperations([vote], privateKey).then(\n function(result) {\n console.log(\n 'included in block: ' + result.block_num,\n 'expired: ' + result.expired\n );\n document.getElementById('voteCheckContainer').style.display = 'flex';\n document.getElementById('voteCheck').className =\n 'form-control-plaintext alert alert-success';\n document.getElementById('voteCheck').innerHTML = votecheck;\n },\n function(error) {\n console.error(error);\n document.getElementById('voteCheckContainer').style.display = 'flex';\n document.getElementById('voteCheck').className =\n 'form-control-plaintext alert alert-danger';\n document.getElementById('voteCheck').innerHTML = error.jse_shortmsg;\n }\n);\ndocument.getElementById('submitYesBtn').style.visibility = 'hidden';\ndocument.getElementById('submitNoBtn').style.visibility = 'hidden';\n\n\nShould the user choose to stop the process the following function is executed.\n\nwindow.submitNo = async () => {\n document.getElementById('voteCheckContainer').style.display = 'flex';\n document.getElementById('voteCheck').className =\n 'form-control-plaintext alert alert-success';\n document.getElementById('voteCheck').innerHTML =\n 'Vote process has ben cancelled';\n document.getElementById('submitYesBtn').style.visibility = 'hidden';\n document.getElementById('submitNoBtn').style.visibility = 'hidden';\n};\n\n\nThe 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.\n\nTo run this tutorial\n\n\n clone this repo\n cd tutorials/22_witness_listing_and_voting\n npm i\n npm run dev-server or npm run start\n After a few moments, the server should be running at http://localhost:3000/" + } + + + + + + + + + , + + "tutorials-python-account-recovery": { + "id": "tutorials-python-account-recovery", + "title": "PY: Account Recovery", + "category": "tutorials-python", + "description": "How to recover an account using Python.", + "type": "", + "url": "/tutorials-python/account_recovery", + "content": "Full, runnable src of Account Recovery can be downloaded as part of the PY tutorials repository.\n\n\nIn this tutorial we show you how to request account recovery for a user and also recover that account on the Steem blockchain using the beem-python library.\n\nThe recovery system is used to recover hacked accounts. In the event that you lose your password, your account is lost forever. You must know at least one old password that was used on your account within 30 days. This recovery process can only be executed once an hour. Stolen Account Recovery gives the rightful account owner 30 days to recover their account from the moment the thief changed their owner key.\n\nIntro\n\nThere are two parties involved in recovering an account. The user that requires their account to be recovered, and the recovery account (or trustee) which is the account that created the username on the blockchain. For anyone creating their account through the main Steemit webiste, their recovery account would be Steemit. If however your account was created for you by another user, that user is the one that would have to initialize your account recovery. The recovery account can be changed however to whichever user you require.\n\nFor this tutorial we are using the beem-python library which contains the required functions to execute this recovery process. There are two main sections to this process. Firstly, there is the request_account_recovery function where the owner is verified and the intent for account recovery is transmitted to the blockchain. The second part is the actual recover_account process. Along with this we also create a complete set of new account keys (posting, active, owner and memo) in order for the account to function properly. If these keys are not generated you will receive an error when trying to log in with your new password: This password is bound to your account's owner key and can not be used to login to this site. However, you can use it to update your password to obtain a more secure set of keys\n\nThis tutorial runs on the live network so special care needs to be taken when running it.\n\nThe request_account_recovery function has the following parameters:\n\n\n account to recover - The account name that wishes to be recovered\n recovery account - The trustee account / account owner that will recover the account\n new owner authority - The new owner PUBLIC key of the account to be recovered\n extensions - empty array\n\n\nThe recover_account function has the following parameters:\n\n\n account_to_recover - The account name that wishes to be recovered\n new_owner_authority - The new owner PUBLIC key of the account to be recovered\n recent_owner_authority - The OLD owner PUBLIC key of the account to be recovered\n extensions - empty array\n\n\nSteps\n\n\n App setup - Library install and import. Input user info and connection to production\n Owner key creation - Creation of new and old owner keys\n Recovery request operation and transmission - creation of data object, operation and transmission of recovery request function\n Account recovery and new account keys data objects - creation of new account keys and objects for account update and recovery\n Account recovery commit - transmit account recovery to blockchain\n Account update commit - transmit account key update to blockchain\n\n\n1. App setup and connection \n\nIn this tutorial we use 1 packages:\n\n\n beem - beem-python library and interaction with Blockchain\n\n\nWe import the libraries for the application.\n\nimport beembase\nfrom beem.account import Account\nfrom beem import Steem\nfrom beem.transactionbuilder import TransactionBuilder\nfrom beemgraphenebase.account import PasswordKey\nfrom beembase.objects import Permission\n\n\nThere are 5 inputs required. The account name to be recovered along with the old and new passwords. We also require the account name and private active key of the recovery account (account owner / trustee). For the first step in the process we initialize the steem class with the private key from the recovery account. The values are supplied via the terminal/console.\n\n#capture user information\nusername = input('account to be recovered: ')\nold_password = input('recent password for account: ')\nnew_password = input('new password for account: ')\n\nrecovery_account = input('account owner (recovery account): ')\nrecovery_account_private_key = input('account owner private ACTIVE key: ')\n\n#connect to production server with active key\ns = Steem(node=['https://api.steemit.com'], keys=[recovery_account_private_key])\n\n\nThe new password for the account to be recovered must be at least 32 characters long.\n\n2. Owner key creation \n\nBoth new and old owner keys are generated from the passwords supplied in the first step. For a more in depth look at creating keys please refer to this tutorial on changing your password and keys.\n\n#create new account owner keys\nnew_account_owner_private_key = PasswordKey(username, new_password, role='owner').get_private_key()\nnew_account_owner_private_key_string = str(new_account_owner_private_key)\nnew_account_owner_public_key = str(new_account_owner_private_key.pubkey)\n\n#create old account owner keys\nold_account_owner_private_key = PasswordKey(username, old_password, role='owner').get_private_key()\nold_account_owner_private_key_string = str(old_account_owner_private_key)\nold_account_owner_public_key = str(old_account_owner_private_key.pubkey)\n\n\nThe Steem blockchain knows the history of your account, and every owner key that has ever been used for it. When you enter your recent password, it uses that to generate an owner key that can match up to a previous owner public key on the account. Without that password and owner key, the recovery account can’t do anything to recover your account.\n\n3. Recovery request operation and transmission \n\nThe new_owner_authority containing the new public key is formatted in order to be used in the request_account_recovery operation. Once the data object has been created, the operation is transmitted to the blockchain to confirm that the account in question is going to be recovered.\n\nnew_owner_authority = {\n \"key_auths\": [\n [new_account_owner_public_key, 1]\n ],\n \"account_auths\": [],\n \"weight_threshold\": 1\n}\n\n#recovery request data object creation\nrequest_op_data = {\n 'account_to_recover': username,\n 'recovery_account': recovery_account,\n 'new_owner_authority': new_owner_authority,\n 'extensions': []\n}\n\n#recovery request operation creation\nrequest_op = beembase.operations.Request_account_recovery(**request_op_data)\n\nprint('request_op_data')\nprint(request_op_data)\n\n#recovery request broadcast\nrequest_result = s.finalizeOp(request_op, recovery_account, \"active\")\n\nprint('request_result')\nprint(request_result)\n\n\n4. Account recovery and new account keys data objects \n\nThe old owner key is formatted and the object for the account recovery function is created with the required parameters.\n\nrecent_owner_authority = {\n \"key_auths\": [\n [old_account_owner_public_key, 1]\n ],\n \"account_auths\": [],\n \"weight_threshold\": 1\n}\n\nop_recover_account_data = {\n 'account_to_recover': username,\n 'new_owner_authority': new_owner_authority,\n 'recent_owner_authority': recent_owner_authority,\n 'extensions': []\n}\n\n\nThe object for the account key update operation is created with the relevant keys created in the correct format within the object.\n\nop_account_update_data = {\n \"account\": username,\n \"active\": {\n \"key_auths\": [\n [str(PasswordKey(username, new_password, role='active').get_private_key().pubkey), 1]\n ],\n \"account_auths\": [],\n \"weight_threshold\": 1\n },\n \"posting\": {\n \"key_auths\": [\n [str(PasswordKey(username, new_password, role='posting').get_private_key().pubkey), 1]\n ],\n \"account_auths\": [],\n \"weight_threshold\": 1\n },\n \"memo_key\": str(PasswordKey(username, new_password, role='memo').get_private_key().pubkey),\n \"json_metadata\": \"\"\n}\n\n\n5. Account recovery commit \n\nThe steem class is initialised once more but with the required WIF for this specific section. This is necessary when different keys are required at various steps. The recover_account function is transmitted to the blockchain via the TransactionBuilder operation in order to append the new private keys. The operation is then broadcast.\n\ns = Steem(node=['https://api.steemit.com'], keys=[recovery_account_private_key])\n\nop_recover_account = beembase.operations.Recover_account(**op_recover_account_data)\n\nprint('op_recover_account')\nprint(op_recover_account)\n\ntb = TransactionBuilder()\ntb.appendOps([op_recover_account])\ntb.appendWif(str(old_account_owner_private_key))\ntb.appendWif(str(new_account_owner_private_key))\ntb.sign()\n\nresult = tb.broadcast()\nprint('result')\nprint(result)\n\n\n6. Account update commit \n\nThe same basic process is followed as in the previous step. For this step however we require the new owner private key which is initialised in the steem class. The TransactionBuilder operation is used once more for the transmission to the blockchain.\n\ns = Steem(node=['https://api.steemit.com'], keys=[new_account_owner_private_key])\n\nop_account_update = beembase.operations.Account_update(**op_account_update_data)\n\nprint('op_account_update')\nprint(op_account_update)\n\ntb = TransactionBuilder()\ntb.appendOps([op_account_update])\ntb.appendWif(str(new_account_owner_private_key))\ntb.sign()\n\nresult = tb.broadcast()\n\nprint('result')\nprint(result)\n\n\nAnd that’s it!\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/35_account_recovery\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-account-reputation": { + "id": "tutorials-python-account-reputation", + "title": "PY: Account Reputation", + "category": "tutorials-python", + "description": "Would you like to know how to interpret account reputation to more human readable format, then this tutorial is for you.", + "type": "", + "url": "/tutorials-python/account_reputation", + "content": "Full, runnable src of Account Reputation can be downloaded as part of the PY tutorials repository.\n\n\nIntro\n\nAccount reputation is long integer string which requires special function or formula to convert in more human readable format. We will define that function in this tutorial and show how to fetch and interpret reputation.\n\nSteps\n\n\n App setup - Library install and import\n Account list - List of predefined accouns to select from\n Reputation interpret - Reputation converting function\n Print output - Print results in output\n\n\n1. App setup \n\nIn this tutorial we will use 4 packages, pick - helps us to select filter interactively. steem - steem-python library, interaction with Blockchain. pprint - print results in better format and math to perform some math calculations.\n\nFirst we import all libraries and initialize Steem class\n\n import pprint\n import math\n from pick import pick\n\n # initialize Steem class\n from steem import Steem\n\n s = Steem()\n\n\n2. Account list \n\nNext we will show predefined account list to select and setup pick properly.\n\n title = 'Please choose account: '\n options = [\"steemitblog\",\"esteemapp\",\"busy.org\",\"demo\"]\n\n # get index and selected filter name\n option, index = pick(options, title)\n\n # option is printed as reference\n pprint.pprint(\"Selected: \"+option)\n\n\nThis will show us list of accounts to select in terminal/command prompt. And after selection we will fetch account details from Blockchain with get_accounts function.\n\n user = s.get_accounts([option])\n\n\n3. Reputation interpret \n\nNext we will define reputation interpreter:\n\ndef rep_log10(rep):\n \"\"\"Convert raw steemd rep into a UI-ready value centered at 25.\"\"\"\n def log10(string):\n leading_digits = int(string[0:4])\n log = math.log10(leading_digits) + 0.00000001\n num = len(string) - 1\n return num + (log - int(log))\n\n rep = str(rep)\n if rep == \"0\":\n return 25\n\n sign = -1 if rep[0] == '-' else 1\n if sign < 0:\n rep = rep[1:]\n\n out = log10(rep)\n out = max(out - 9, 0) * sign # @ -9, $1 earned is approx magnitude 1\n out = (out * 9) + 25 # 9 points per magnitude. center at 25\n return round(out, 2)\n\n\nAbove function will cover all edge cases, for example, if account is new their reputation is 0 hence, default starting reputation will be 25. If reputation negative that’s also considered.\n\n4. Print output \n\nAfter we have fetched account details from Blockchain, all we have to do is to use defined function above to interpret account’s reputation field into meaningful number.\n\n # print specified account's reputation\n pprint.pprint(rep_log10(user[0]['reputation']))\n\n\nThat’s it. We have successfully interpreted reputation.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/20_account_reputation\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see output in terminal/command prompt screen." + } + + + + + + + , + + "tutorials-python-claim-rewards": { + "id": "tutorials-python-claim-rewards", + "title": "PY: Claim Rewards", + "category": "tutorials-python", + "description": "How to claim rewards using Python.", + "type": "", + "url": "/tutorials-python/claim_rewards", + "content": "Full, runnable src of Claim Rewards can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIntro\n\nThe 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:\n\n\n reward steem - The amount of STEEM to claim\n reward sbd - The amount of SBD to claim\n reward vests - The amount of VESTS (STEEM POWER) to claim\n account - The source account for the claim\n\n\nSteps\n\n\n App setup - Library install and import. Connection to testnet\n User information and steem node - Input user information and connection to Steem node\n Check reward balance - Check current rewards balances of user account\n Claim commit - Input amount of rewards to claim and commit to blockchain\n Balance update - Check new rewards balances after completed claim\n\n\n1. App setup \n\nIn this tutorial we use 2 packages:\n\n\n steem - steem-python library and interaction with Blockchain\n pick - helps select the query type interactively\n\n\nWe import the libraries and connect to the testnet.\n\nimport steembase\nimport steem\nfrom pick import pick\nfrom steem.amount import Amount\n\nsteembase.chains.known_chains['STEEM'] = {\n 'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',\n 'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'\n}\n\n\nBecause this tutorial alters the blockchain we connect to a testnet so we don’t create spam on the production server.\n\n2. User information and steem node \n\nWe 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.\n\n#capture user information\nusername = input('Enter username: ') #demo account: cdemo\nwif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3\n\n#connect node\nclient = steem.Steem(nodes=['https://testnet.steem.vc'],keys=[wif])\n\n\n3. Check reward balance \n\nWe 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.\n\n#get account reward balances\nuserinfo = client.get_account(username)\n\nif(userinfo is None) :\n print('Oops. Looks like user ' + username + ' doesn\\'t exist on this chain!')\n exit()\n\nreward_steem = userinfo['reward_steem_balance']\nreward_sbd = userinfo['reward_sbd_balance']\nreward_sp = userinfo['reward_vesting_steem']\nreward_vests = userinfo['reward_vesting_balance']\n\nprint('Reward Balances:' + '\\n' + \n 'STEEM: ' + reward_steem + '\\n' + \n 'SBD: ' + reward_sbd + '\\n' + \n 'STEEM POWER: ' + reward_sp + '\\n' +\n 'VESTS: ' + reward_vests\n )\n\ninput('\\n' + 'Press enter to continue to claim selection')\n\n\n4. Claim commit \n\nAn 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!\n\n#choice of claim\ntitle = 'Please choose claim type: '\noptions = ['ALL', 'SELECTED', 'CANCEL']\noption, index = pick(options, title)\n\n\nWhen 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.\n\n#commit claim based on selection\nif option == 'ALL':\n if Amount(reward_steem).amount + Amount(reward_sbd).amount + Amount(reward_vests).amount == 0:\n print('\\n' + 'No rewards to claim')\n exit()\n else:\n client.claim_reward_balance(reward_steem, reward_sbd, reward_vests, username)\n print('\\n' + 'All reward balances have been claimed. New reward balances are:' + '\\n')\nelse:\n if option == 'CANCEL':\n print('\\n' + 'Operation cancelled')\n exit()\n else:\n claim_steem = input('\\n' + 'Please enter the amount of STEEM to claim: ') + ' STEEM'\n claim_sbd = input('Please enter the amount of SBD to claim: ') + ' SBD'\n claim_vests = input('Please enter the amount of VESTS to claim: ') + ' VESTS'\n if Amount(claim_steem).amount + Amount(claim_sbd).amount + Amount(claim_vests).amount == 0:\n print('\\n' + 'Zero values entered, no claim to submit')\n exit()\n else:\n if claim_steem > reward_steem or claim_sbd > reward_sbd or claim_vests > reward_vests:\n print('\\n' + 'Requested claim value higher than available rewards')\n exit()\n else:\n client.claim_reward_balance(claim_steem, claim_sbd, claim_vests, username)\n print('\\n' + 'Claim has been processed. New reward balances are:' + '\\n')\n\n\n\nWhen 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.\n\n5. Balance update \n\nAs a final check we run the account query again to get updated values for the available rewards balances.\n\n#get updated account reward balances\ninput(\"Press enter for new account balances\")\n\nuserinfo = client.get_account(username)\n\nreward_steem = userinfo['reward_steem_balance']\nreward_sbd = userinfo['reward_sbd_balance']\nreward_sp = userinfo['reward_vesting_steem']\nreward_vests = userinfo['reward_vesting_balance']\n\nprint('STEEM: ' + reward_steem + '\\n' + \n 'SBD: ' + reward_sbd + '\\n' + \n 'STEEM POWER: ' + reward_sp + '\\n' +\n 'VESTS: ' + reward_vests\n )\n\n\nWe 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.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/23_claim_rewards\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-convert-sbd-to-steem": { + "id": "tutorials-python-convert-sbd-to-steem", + "title": "PY: Convert Sbd To Steem", + "category": "tutorials-python", + "description": "How to convert your SBD to STEEM using Python.", + "type": "", + "url": "/tutorials-python/convert_sbd_to_steem", + "content": "Full, runnable src of Convert Sbd To Steem can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIt 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.\n\nThere 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\n\nsteemlogin 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.\nhttps://steemlogin.com/sign/convert?owner=username&requestid=1234567&amount=0.000%20SBD\nThis is similar to the steemlogin links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://steemlogin.com/sign\nThis article has more information on using steemlogin\n\nIntro\n\nThe 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:\n\n\n amount - The amount of SBD that will be converted\n account - The specified user account for the conversion\n request-id - An identifier for tracking the conversion. This parameter is optional\n\n\nSteps\n\n\n App setup - Library install and import. Connection to testnet\n User information and steem node - Input user information and connection to Steem node\n Check balance - Check current STEEM and SBD balance of user account\n Conversion amount and commit - Input of SBD amount to convert and commit to blockchain\n\n\n1. App setup \n\nIn this tutorial we only use 1 package:\n\n\n steem - steem-python library and interaction with Blockchain\n\n\nWe import the libraries and connect to the testnet.\n\nimport steembase\nimport steem\n\nsteembase.chains.known_chains['STEEM'] = {\n 'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',\n 'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'\n}\n\n\nBecause this tutorial alters the blockchain we connect to the testnet so we don’t create spam on the production server.\n\n2. User information and steem node \n\nWe 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.\n\n#capture user information\nusername = input('Enter username: ') #demo account: demo01\nwif = input('Enter private ACTIVE key: ') #demo account: 5HxTntgeoLm4trnTz94YBsY6MpAap1qRVXEKsU5n1v2du1gAgVH\n\n#connect node and private active key\nclient = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])\n\n\n3. Check balance \n\nIn order to give the user enough information to make the conversion we check the current balance of the account using the get_account function.\n\n#get account balance for STEEM and SBD\nuserinfo = client.get_account(username)\ntotal_steem = userinfo['balance']\ntotal_sbd = userinfo['sbd_balance']\n\nprint('CURRENT ACCOUNT BALANCE:' + '\\n' + total_steem + '\\n' + total_sbd + '\\n')\n\n\nThe result of the query is displayed in the console/terminal.\n\n4. Conversion amount and commit \n\nThe 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.\n\n#get recipient name\nconvert_amount = input('Enter the amount of SBD to convert to STEEM: ')\n\n\nThis 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.\n\n#parameters: amount, account, request_id\nclient.convert(float(convert_amount), username)\n\nprint('\\n' + convert_amount + ' SBD has been converted to STEEM')\n\n\nIf no errors are encountered a simple confirmation is printed on the UI.\n\nAs 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.\n\n#get remaining account balance for STEEM and SBD\nuserinfo = client.get_account(username)\ntotal_steem = userinfo['balance']\ntotal_sbd = userinfo['sbd_balance']\n\nprint('\\n' + 'REMAINING ACCOUNT BALANCE:' + '\\n' + total_steem + '\\n' + total_sbd)\n\n\nThe STEEM balance will not yet have been updated as it takes 3.5 days to settle. The SBD will however show the new balance.\n\nWe 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.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/32_convert_sbd_to_steem\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-delegate-power": { + "id": "tutorials-python-delegate-power", + "title": "PY: Delegate Power", + "category": "tutorials-python", + "description": "How to delegate or remove delegation of STEEM POWER to another user using Python.", + "type": "", + "url": "/tutorials-python/delegate_power", + "content": "Full, runnable src of Delegate Power can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIntro\n\nThe 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:\n\n\n to_account - The account we are delegating shares to (delegatee)\n vesting_shares - The amount of VESTS to delegate. This is required to be a string value\n account - The source user account for the delegation (delegator)\n\n\nSteps\n\n\n App setup - Library install and import. Connection to testnet\n User information and steem node - Input user information and connection to Steem node\n Check balance - Check current VESTS balance of user account\n Delegation amount and commit - Input delegation amount and commit to blockchain\n\n\n1. App setup \n\nIn this tutorial we use 3 packages:\n\n\n steem - steem-python library and interaction with Blockchain\n pick - helps select the query type interactively\n pprint - print results in better format\n\n\nWe import the libraries and connect to the testnet.\n\nimport steembase\nimport steem\nfrom pick import pick\nimport pprint\nfrom steem.amount import Amount\n\nsteembase.chains.known_chains['STEEM'] = {\n 'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',\n 'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'\n}\n\n\nBecause this tutorial alters the blockchain we connect to a testnet so we don’t create spam on the production server.\n\n2. User information and steem node \n\nWe 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.\n\n#capture user information\nusername = input('Enter username: ') #demo account: cdemo\nwif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3\n\n#connect node and private active key\nclient = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])\n\n#check valid user\nuserinfo = client.get_account(username)\nif(userinfo is None) :\n print('Oops. Looks like user ' + username + ' doesn\\'t exist on this chain!')\n exit()\n\n\n3. Check balance \n\nIn 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.\n\n#display active delegations (refer to tutorial #29_get_delegations_by_user)\ndelegations = client.get_vesting_delegations(username, '', 100)\nif len(delegations) == 0:\n\tprint('No active delegations')\nelse:\n\tpprint.pprint(delegations)\n\n#available VESTS\navail_vests = (Amount(userinfo['vesting_shares']).amount - \n ((userinfo['to_withdraw']-userinfo['withdrawn'])/1000000)-\n Amount(userinfo['delegated_vesting_shares']).amount)\nprint('\\n' + 'Available VESTS : ' + str(avail_vests))\n\ninput('Press enter to continue' + '\\n')\n\n\nThe result of the query is displayed in the console/terminal.\n\n4. Delegation amount and commit \n\nBoth 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.\n\n#choice of action\ntitle = ('Please choose action')\noptions = ['DELEGATE POWER', 'UN-DELEGATE POWER', 'CANCEL']\noption, index = pick(options, title)\n\nif (option == 'CANCEL') :\n print('operation cancelled')\n exit()\n\n#get account to authorise and check if valid\ndelegatee = input('Please enter the account name to ADD / REMOVE delegation: ')\ndelegatee_userinfo = client.get_account(delegatee)\nif(delegatee_userinfo is None) :\n print('Oops. Looks like user ' + delegatee + ' doesn\\'t exist on this chain!')\n exit()\n\n\nAny 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!\n\nif (option == 'DELEGATE POWER') :\n vesting_value = input('Please enter the amount of VESTS to delegate: ')\n vesting_shares = (str(vesting_value) + ' VESTS')\n client.delegate_vesting_shares(to_account=delegatee, vesting_shares=vesting_shares, account=username)\n print('\\n' + str(vesting_shares) + ' have been successfully been delegated to ' + delegatee)\nelse :\n vesting_shares = '0 VESTS'\n client.delegate_vesting_shares(to_account=delegatee, vesting_shares=vesting_shares, account=username)\n print('Delegated VESTS have been successfully removed from ' + delegatee)\n\n\nA confirmation of the transaction is displayed on the UI.\n\nWe 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.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/27_delegate_power\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-edit-content-patching": { + "id": "tutorials-python-edit-content-patching", + "title": "PY: Edit Content Patching", + "category": "tutorials-python", + "description": "How to edit post content with diff_match_patch using Python.", + "type": "", + "url": "/tutorials-python/edit_content_patching", + "content": "Full, runnable src of Edit Content Patching can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIntro\n\nBeing 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.\n\ndiff_main - This compares two text fields to find the differences.\ndiff_cleanupSemantic - This reduces the number of edits by eliminating semantically trivial equalities.\ndiff_levenshtein - Computes the Levenshtein distance: the number of inserted, deleted or substituted characters\npatch_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.\npatch_apply - This applies the created patch to the original text field.\n\nSteps\n\n\n App setup - Library install and import. Connection to testnet\n User information and steem node - Input user information and connection to Steem node\n Post to update - Input and retrieve post information\n Patching - Create the patch to update the post\n New post commit - Commit the post to the blockchain\n\n\n1. App setup \n\nIn this tutorial we use 2 packages:\n\n\n steem - steem-python library and interaction with Blockchain\n diff_match_patch - used to compute the difference between two text fields to create a patch\n\n\nWe import the libraries and connect to the testnet.\n\nimport steembase\nimport steem\nfrom diff_match_patch import diff_match_patch\n\nsteembase.chains.known_chains['STEEM'] = {\n 'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',\n 'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'\n}\n\n\nBecause this tutorial alters the blockchain we connect to a testnet so we don’t create spam on the production server.\n\n2. User information and steem node \n\nWe 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.\n\n#capture user information\nusername = input('Enter username: ') #demo account: cdemo\nwif = input('Enter private POSTING key: ') #demo account: 5JEZ1EiUjFKfsKP32b15Y7jybjvHQPhnvCYZ9BW62H1LDUnMvHz\n\n#connect node and private active key\nclient = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])\n\n\n3. Post to update \n\nThe 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.\n\n#check valid username\nuserinfo = client.get_account(username)\nif(userinfo is None) :\n print('Oops. Looks like user ' + username + ' doesn\\'t exist on this chain!')\n exit()\n\npost_author = input('Please enter the AUTHOR of the post you want to edit: ')\npost_permlink = input('Please enter the PERMLINK of the post you want to edit: ')\n\n#get details of selected post\ndetails = client.get_content(post_author, post_permlink)\n\nprint('\\n' + 'Title: ' + details['title'])\no_body = details['body']\nprint('Body:' + '\\n' + o_body + '\\n')\n\nn_body = input('Please enter new post content:' + '\\n')\n\n\nThe user also inputs the updated text in the console/terminal. This will then give us the two text fields to compare.\n\n4. Patching \n\nThe module is initiated and the new post text is checked for validity.\n\n#initialise the diff match patch module\ndmp = diff_match_patch()\n\n#Check for null input\nif (n_body == '') :\n print('\\n' + 'No new post body supplied. Operation aborted')\n exit()\nelse :\n # Check for equality\n if (o_body == n_body) :\n print('\\n' + 'No changes made to post body. Operation aborted')\n exit()\n\n\nThe 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.\n\n#check for differences in the text field\ndiff = dmp.diff_main(o_body, n_body)\n#Reduce the number of edits by eliminating semantically trivial equalities.\ndmp.diff_cleanupSemantic(diff)\n#check patch length\nif (dmp.diff_levenshtein(diff) < len(o_body)) :\n #create patch\n patch = dmp.patch_make(o_body, diff)\n #create new text based on patch\n patch_body = dmp.patch_apply(patch, o_body)\n new_body = patch_body[0]\nelse :\n new_body = n_body\n\n\n5. New post commit \n\nThe 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.\n\n#commit post to blockchain with all old values and new body text\nclient.commit.post(title=details['title'], body=new_body, author=details['author'], permlink=details['permlink'],\n json_metadata=details['json_metadata'], reply_identifier=(details['parent_author'] + '/' + details['parent_permlink']))\n\nprint('\\n' + 'Content of the post has been successfully updated')\n\n\nA simple confirmation is displayed on the screen for a successful commit.\n\nWe 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.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/12_edit_content_patching\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-follow-a-user": { + "id": "tutorials-python-follow-a-user", + "title": "PY: Follow A User", + "category": "tutorials-python", + "description": "How to follow or unfollow an author using Python.", + "type": "", + "url": "/tutorials-python/follow_a_user", + "content": "Full, runnable src of Follow A User can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIntro\n\nThe 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:\n\n\n follow/unfollow - The name of the author that will be followed/unfollowed\n 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\n account - The name of the account that is executing the follow/unfollow\n\n\nSteps\n\n\n App setup - Library install and import. Connection to testnet\n User information and steem node - Input user information and connection to Steem node\n Check author status - Validity check on requested autor to follow\n Follow status - Check whether specified author is already followed\n Follow/Unfollow commit - Follow/unfollow commit to the blockchain\n\n\n1. App setup \n\nIn this tutorial we use 3 packages:\n\n\n steem - steem-python library and interaction with Blockchain\n pick - helps select the query type interactively\n\n\nWe import the libraries and connect to the testnet.\n\nimport steembase\nimport steem\nfrom pick import pick\n\nsteembase.chains.known_chains['STEEM'] = {\n 'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',\n 'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'\n}\n\n\nBecause this tutorial alters the blockchain we connect to the testnet so we don’t create spam on the production server.\n\n2. User information and steem node\n\nWe 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.\n\n#capture user information\nusername = input('Please enter your username: ')\npostingkey = input('Please enter your private posting key: ')\n\n#connect node and private posting key, demo account being used: cdemo, posting key: 5JEZ1EiUjFKfsKP32b15Y7jybjvHQPhnvCYZ9BW62H1LDUnMvHz\ns = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[postingkey])\n\n\n3. Check author status\n\nTo 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.\n\n#capture variables\nauthor = input('Author to follow: ')\n\n#check author status\nresult = s.get_account(author)\n\n\nOnce the author name is confirmed to be valid we can move on to check the follow status of that author.\n\n4. Follow status\n\nIf 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.\n\n#result from previous step\nif result :\n\t#check for author name in the current following list\n\tfollow = s.get_following(username, author, 'blog', 1)\n\tif len(follow) > 0 and follow[0]['following'] == author :\n\t\ttitle = \"Author is already being followed, please choose action\"\n\telse:\n\t\ttitle = \"Author has not yet been followed, please choose action\"\nelse:\n\tprint('Author does not exist')\n\texit()\n\n\nThe 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.\n\n#get index and selected action\noptions = ['Follow', 'Unfollow', 'Exit']\noption, index = pick(options, title)\n\n\nOnce we know what the user wants to do, we can move on to the actual commit to the blockchain.\n\n5. Follow/Unfollow commit\n\nOnce the user has selected which action to take we user another if statement to execute that selection.\n\nif option == 'Follow' :\n\ts.commit.follow(author, ['blog'], username)\n\tprint(author + ' is now being followed')\nelse:\n\tif option == 'Unfollow' :\n\t\ts.commit.unfollow(author, ['blog'], username)\n\t\tprint(author + ' has now been unfollowed')\n\telse:\n\t\tprint('Action Cancelled')\n\n\nA simple confirmation of the chosen action is printed on the screen.\n\nYou can also check on the testportal for a list of the authors being followed by the demo account.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/18_follow_a_user\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-get-account-comments": { + "id": "tutorials-python-get-account-comments", + "title": "PY: Get Account Comments", + "category": "tutorials-python", + "description": "Fetch list of comments made by account on posts or comments.", + "type": "", + "url": "/tutorials-python/get_account_comments", + "content": "Full, runnable src of Get Account Comments can be downloaded as part of the PY tutorials repository.\n\n\nIn this tutorial will explain and show you how to access the Steem blockchain using the steem-python library to fetch list of posts to randomize account list and get replies of selected account.\n\nIntro\n\nSteem python library has built-in function to get comments list made by specific account. Since we don’t have predefined account list, we will fetch newly created posts and show their authors for selection and give option to choose one account to get its comments. get_discussions_by_comments function fetches list of comments made by account. Note that get_discussions_by_created filter is used for fetching 5 posts and after selection of its author tutorial uses author of the post to fetch that account’s comments.\n\nSteps\n\n\n App setup - Library install and import\n Post list - List of posts to select from created filter\n Comments list - Get comments list made by selected account\n Print output - Print results in output\n\n\n1. App setup \n\nIn 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.\n\nFirst we import all three library and initialize Steem class\n\n import pprint\n from pick import pick\n # initialize Steem class\n from steem import Steem\n\n s = Steem()\n\n\n2. Post list \n\nNext we will fetch and make list of accounts and setup pick properly.\n\n query = {\n \"limit\":5, #number of posts\n \"tag\":\"\" #tag of posts\n }\n #author list from created post list to randomize account list\n posts = s.get_discussions_by_created(query)\n\n title = 'Please choose account: '\n options = []\n #accounts list\n for post in posts:\n options.append(post[\"author\"])\n\n # get index and selected account name\n option, index = pick(options, title)\n\n\nThis will show us list of accounts to select in terminal/command prompt. And after selection we will get account name as a option variable.\n\n3. Comments list \n\nNext we will form another query to get comments list of account\n\n query2 = {\n \"limit\":5, #number of comments\n \"start_author\":option #selected user\n }\n\n # get comments of selected account\n comments = s.get_discussions_by_comments(query2)\n\n\nNote that start_author variable in query should be account name so that get_discussions_by_comments can provide us corrent information.\n\n4. Print output \n\nNext, we will print result, comments of selected account and details of each comment.\n\n # print comment details for selected account\n pprint.pprint(comments)\n pprint.pprint(\"Selected: \"+option)\n\n\nThe example of result returned from the service is a JSON object with the following properties:\n\n[{'abs_rshares': 0,\n 'active': '2018-06-21T06:48:57',\n 'active_votes': [],\n 'allow_curation_rewards': True,\n 'allow_replies': True,\n 'allow_votes': True,\n 'author': 'rakibmaruf24',\n 'author_reputation': '115387353393',\n 'author_rewards': 0,\n 'beneficiaries': [],\n 'body': \"That extra push will take you Back- That's my opinion .\",\n 'body_length': 55,\n 'cashout_time': '2018-06-28T06:48:57',\n 'category': 'life',\n 'children': 0,\n 'children_abs_rshares': 0,\n 'created': '2018-06-21T06:48:57',\n 'curator_payout_value': '0.000 SBD',\n 'depth': 1,\n 'id': 53788647,\n 'json_metadata': '{\"tags\":[\"life\"],\"app\":\"steemit/0.1\"}',\n 'last_payout': '1970-01-01T00:00:00',\n 'last_update': '2018-06-21T06:48:57',\n 'max_accepted_payout': '1000000.000 SBD',\n 'max_cashout_time': '1969-12-31T23:59:59',\n 'net_rshares': 0,\n 'net_votes': 0,\n 'parent_author': 'blazing',\n 'parent_permlink': 'that-extra-push-will-take-you-forward',\n 'pending_payout_value': '0.000 SBD',\n 'percent_steem_dollars': 10000,\n 'permlink': 're-blazing-that-extra-push-will-take-you-forward-20180621t064855012z',\n 'promoted': '0.000 SBD',\n 'reblogged_by': [],\n 'replies': [],\n 'reward_weight': 10000,\n 'root_author': 'blazing',\n 'root_permlink': 'that-extra-push-will-take-you-forward',\n 'root_title': 'That extra push will take you forward ',\n 'title': '',\n 'total_payout_value': '0.000 SBD',\n 'total_pending_payout_value': '0.000 STEEM',\n 'total_vote_weight': 0,\n 'url': '/life/@blazing/that-extra-push-will-take-you-forward#@rakibmaruf24/re-blazing-that-extra-push-will-take-you-forward-20180621t064855012z',\n 'vote_rshares': 0},\n {'abs_rshares': 0,\n 'active': '2018-06-01T18:36:06',\n 'active_votes': [{'percent': 200,\n 'reputation': '26818436016691',\n 'rshares': '16086534528',\n 'time': '2018-06-01T21:42:09',\n 'voter': 'gamer00',\n 'weight': 65289},\n {'percent': 800,\n 'reputation': '7605717819625',\n 'rshares': '7561308944',\n 'time': '2018-06-01T18:44:51',\n 'voter': 'markkujantunen',\n 'weight': 90456}],\n 'allow_curation_rewards': True,\n 'allow_replies': True,\n 'allow_votes': True,\n 'author': 'rakibmaruf24',\n 'author_reputation': '115387353393',\n 'author_rewards': 29,\n 'beneficiaries': [],\n 'body': \"How did it worked ? I don't understand about this brother.\",\n 'body_length': 58,\n 'cashout_time': '1969-12-31T23:59:59',\n 'category': 'finland',\n 'children': 1,\n 'children_abs_rshares': 0,\n 'created': '2018-06-01T17:56:15',\n 'curator_payout_value': '0.018 SBD',\n 'depth': 1,\n 'id': 51280699,\n 'json_metadata': '{\"tags\":[\"finland\"],\"app\":\"steemit/0.1\"}',\n 'last_payout': '2018-06-08T17:56:15',\n 'last_update': '2018-06-01T17:56:15',\n 'max_accepted_payout': '1000000.000 SBD',\n 'max_cashout_time': '1969-12-31T23:59:59',\n 'net_rshares': 0,\n 'net_votes': 2,\n 'parent_author': 'markkujantunen',\n 'parent_permlink': 'mein-kampf-gegen-den-loewenzahn-my-struggle-against-dandelions',\n 'pending_payout_value': '0.000 SBD',\n 'percent_steem_dollars': 10000,\n 'permlink': 're-markkujantunen-mein-kampf-gegen-den-loewenzahn-my-struggle-against-dandelions-20180601t175605072z',\n 'promoted': '0.000 SBD',\n 'reblogged_by': [],\n 'replies': [],\n 'reward_weight': 10000,\n 'root_author': 'markkujantunen',\n 'root_permlink': 'mein-kampf-gegen-den-loewenzahn-my-struggle-against-dandelions',\n 'root_title': 'Mein Kampf Gegen Den Löwenzahn/My Struggle Against The '\n 'Dandelion',\n 'title': '',\n 'total_payout_value': '0.067 SBD',\n 'total_pending_payout_value': '0.000 STEEM',\n 'total_vote_weight': 0,\n 'url': '/finland/@markkujantunen/mein-kampf-gegen-den-loewenzahn-my-struggle-against-dandelions#@rakibmaruf24/re-markkujantunen-mein-kampf-gegen-den-loewenzahn-my-struggle-against-dandelions-20180601t175605072z',\n 'vote_rshares': 0}\n]\n\n\nFrom this result you have access to everything associated to the comments of account including content of comment, timestamp, active_votes, etc., so that you can use in further development of your application with Python.\n\nThat’s it!\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/09_get_account_comments\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see output in terminal/command prompt screen." + } + + + + + + + , + + "tutorials-python-get-account-replies": { + "id": "tutorials-python-get-account-replies", + "title": "PY: Get Account Replies", + "category": "tutorials-python", + "description": "List of replies received by account to its content, post, comment.", + "type": "", + "url": "/tutorials-python/get_account_replies", + "content": "Full, runnable src of Get Account Replies can be downloaded as part of the PY tutorials repository.\n\n\nTutorial will explain and show you how to access the Steem blockchain using the steem-python library to fetch a list of comments made on a specific accounts content.\n\nIntro\n\nIn Steem there are built-in functions in the official library steem-python that we are going to use throughout all Python tutorials. For this one we are using the get_replies function.\n\nSteps\n\n\n App setup - Library install and import\n Post list - List of filters to select from\n Comment details - Form a query\n Print output - Print results in output\n\n\n1. App setup \n\nIn 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.\n\nFirst we import all three library and initialize Steem class\n\n import pprint\n from pick import pick\n # initialize Steem class\n from steem import Steem\n\n s = Steem()\n\n\n2. Post list \n\nNext we will fetch and make a list of posts and setup pick properly.\n\n query = {\n \"limit\":5, #number of posts\n \"tag\":\"\" #tag of posts\n }\n #post list for selected query\n #we are merely using this to display the most recent posters\n #the 'author' can easily be changed to any value within the 'get_replies' function\n\n posts = s.get_discussions_by_created(query)\n\n title = 'Please choose author: '\n options = []\n #posts list\n for post in posts:\n options.append(post[\"author\"]+'/'+post[\"permlink\"])\n # get index and selected filter name\n option, index = pick(options, title)\n # option is printed as reference\n pprint.pprint(\"Selected: \"+option)\n\n\nThis 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. We will also print the selection on screen for easy reference.\n\n3. Comment details \n\nNext we will allocate variables to make the function easier to use as well as provide a limit for the number of replies that we want to print. To retreive the replies we only need the author variable. This is then used in the get_replies function present in the steem library.\n\n # allocate variables\n _author = posts[index][\"author\"]\n _limit = 1\n\n # get replies for specific author\n details = s.get_replies(_author)\n\n\n4. Print output \n\nNext, we will print the details obtained from the function. Because we only want to print a limited number, we input the values in the form of an array.\n\n # print specified number of comments\n\n pprint.pprint(details[:_limit])\n\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/08_get_account_replies\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see output in terminal/command prompt screen." + } + + + + + + + , + + "tutorials-python-get-delegations-by-user": { + "id": "tutorials-python-get-delegations-by-user", + "title": "PY: Get Delegations By User", + "category": "tutorials-python", + "description": "How to get a list of active or expiring vesting delegations using Python.", + "type": "", + "url": "/tutorials-python/get_delegations_by_user", + "content": "Full, runnable src of Get Delegations By User can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIntro\n\nThe 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:\n\n\n account - The user account that the delegation list is being queried for\n 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\n limit - The maximum amount of delegations that will be returned by the query\n\n\nThe 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.\n\nSteps\n\n\n App setup - Library install and import. Connection to production\n User input - Input user and limit parameters\n Delegation lists - Selection of the type of list and blockchain query\n\n\n1. App setup \n\nIn this tutorial we use 2 package:\n\n\n steem - steem-python library and interaction with Blockchain\n pick - helps select the query type interactively\n\n\nWe import the libraries and connect to the production server.\n\nfrom pick import pick\nfrom steem import Steem\n\nimport pprint\n\nclient = Steem()\n\n\npprint is used to print the query results in an easier to read format\n\n2. User input \n\nThe 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.\n\n#capture username\nusername = input('Username: ')\n\n#check username\nresult = client.get_account(username)\nif not result:\n\tprint('Invalid username')\n\texit()\n\n#capture list limit\nlimit = input('Max number of vesting delegations to display: ')\n\n\n3. Delegation lists \n\nWe 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.\n\n#list type\ntitle = 'Please choose the type of list: '\noptions = ['Active Vesting Delegations', 'Expiring Vesting Delegations']\n\n#get index and selected list name\noption, index = pick(options, title)\nprint('\\n' + 'List of ' + option + ': ' + '\\n')\n\n\nBased on the result of the choice, the relevant blockchain query is executed and the result of the query displayed on the console/terminal.\n\nif option=='Active Vesting Delegations' :\n #active delegations\n\tdelegations = client.get_vesting_delegations(username, '', limit)\n\tif len(delegations) == 0:\n\t\tprint('No ' + option)\n\telse:\n\t\tpprint.pprint(delegations)\nelse:\n #expiring delegations\n\tdelegations = client.get_expiring_vesting_delegations(username, \"2018-01-01T00:00:00\", limit)\n\tif len(delegations) == 0:\n\t\tprint('No ' + option)\n\telse:\n\t\tpprint.pprint(delegations)\n\n\nFor 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.\n\nThat’s it!\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/29_get_delegations_by_user\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-get-follower-and-following-list": { + "id": "tutorials-python-get-follower-and-following-list", + "title": "PY: Get Follower And Following List", + "category": "tutorials-python", + "description": "Tutorial pulls a list of the followers or authors being followed from the blockchain then displays the result.", + "type": "", + "url": "/tutorials-python/get_follower_and_following_list", + "content": "Full, runnable src of Get Follower And Following List can be downloaded as part of the PY tutorials repository.\n\n\nThis 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.\n\nIntro\n\nWe 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:\n\n\n account - The specific user for which the follower(ing) list will be retrieved\n 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”\n 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.\n limit - The maximum number of lines that can be returned by the query\n\n\nSteps\n\n\n App setup - Library install and import\n Input variables - Collecting the required inputs via the UI\n Get followers/following Get the followers or users being followed\n Print output - Print results in output\n\n\n1. App setup \n\nIn this tutorial we use 2 packages, pick - helps us to select the query type interactively. steem - steem-python library, interaction with Blockchain.\n\nFirst we import both libraries and initialize Steem class\n\nfrom pick import pick\nfrom steem import Steem\n\ns = Steem()\n\n\n2. Input variables \n\nWe assign two of the variables via a simple input from the UI.\n\n#capture username\nusername = input(\"Username: \")\n\n#capture list limit\nlimit = input(\"Max number of followers(ing) to display: \")\n\n\nNext we make a list of the two list options available to the user, following or followers and setup pick.\n\n#list type\ntitle = 'Please choose the type of list: '\noptions = ['Follower', 'Following']\n\n#get index and selected list name\noption, index = pick(options, title)\nprint(\"List of \" + option)\n\n\nThis 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.\n\n3. Get followers/following \n\nNow 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.\n\nif option==\"Follower\" :\n follow = s.get_followers(username, '', 'blog', limit)\n # for follower in follow:\n # lists.append(follower[\"follower\"])\n # print(*lists, sep='\\n')\nelse:\n follow = s.get_following(username, '', 'blog', limit)\n # for following in follow:\n # lists.append(following[\"following\"])\n # print(*lists, sep='\\n')\n\n\nThe output is displayed using the same if statement and will be discussed in the next step.\n\n4. Print output \n\nNext, we will print the result.\n\nif option==\"Follower\" :\n # follow = s.get_followers(username, '', 'blog', limit)\n for follower in follow:\n lists.append(follower[\"follower\"])\n print(*lists, sep='\\n')\nelse:\n # follow = s.get_following(username, '', 'blog', limit)\n for following in follow:\n lists.append(following[\"following\"])\n print(*lists, sep='\\n')\n\n\nThe 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.\n\nWe also do a check for when the list is empty to display the proper message.\n\n#check if follower(ing) list is empty\nif len(lists) == 0:\n print(\"No \"+option+\" information available\")\n\n\nThis 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.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/19_get_follower_and_following_list\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see output in terminal/command prompt screen." + } + + + + + + + , + + "tutorials-python-get-post-comments": { + "id": "tutorials-python-get-post-comments", + "title": "PY: Get Post Comments", + "category": "tutorials-python", + "description": "Fetch comments made on each content or post using Python.", + "type": "", + "url": "/tutorials-python/get_post_comments", + "content": "Full, runnable src of Get Post Comments can be downloaded as part of the PY tutorials repository.\n\n\nThis 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.\n\nIntro\n\nSteem 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.\n\nSteps\n\n\n App setup - Library install and import\n Post list - List of posts to select from created filter\n Replies list - Get replies list for selected post\n Print output - Print results in output\n\n\n1. App setup \n\nIn 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.\n\nFirst we import all three library and initialize Steem class\n\n import pprint\n from pick import pick\n # initialize Steem class\n from steem import Steem\n\n s = Steem()\n\n\n2. Post list \n\nNext we will fetch and make list of posts and setup pick properly.\n\n query = {\n \"limit\":5, #number of posts\n \"tag\":\"\" #tag of posts\n }\n #post list for selected query\n posts = s.get_discussions_by_hot(query)\n\n title = 'Please choose post: '\n options = []\n #posts list options\n for post in posts:\n options.append(post[\"author\"]+'/'+post[\"permlink\"])\n # get index and selected filter name\n option, index = pick(options, title)\n\n\nThis 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.\n\n3. Replies list \n\nNext we will replies on selected post with get_content_replies.\n\n # get replies for given post\n replies = s.get_content_replies(posts[index][\"author\"],posts[index][\"permlink\"])\n\n\n4. Print output \n\nNext, we will print result, replies on selected post, selected post details and number of replies.\n\n # print post details for selected post\n pprint.pprint(replies)\n pprint.pprint(\"Selected: \"+option)\n pprint.pprint(\"Number of replies: \"+str(len(replies)))\n\n\nThe example of result returned from the service is a JSON object with the following properties:\n\n[{'abs_rshares': 0,\n 'active': '2018-06-15T10:43:36',\n 'active_votes': [],\n 'allow_curation_rewards': True,\n 'allow_replies': True,\n 'allow_votes': True,\n 'author': 'sarcasms',\n 'author_reputation': 1086863019,\n 'author_rewards': 0,\n 'beneficiaries': [],\n 'body': 'follow us for news, media, memes, sports updates and lots '\n 'more...',\n 'body_length': 0,\n 'cashout_time': '2018-06-22T10:43:36',\n 'category': 'fiction',\n 'children': 0,\n 'children_abs_rshares': 0,\n 'created': '2018-06-15T10:43:36',\n 'curator_payout_value': '0.000 SBD',\n 'depth': 1,\n 'id': 53110589,\n 'json_metadata': '{\"tags\":[\"fiction\"],\"users\":[\"sarcasms\"],\"app\":\"steemit/0.1\"}',\n 'last_payout': '1970-01-01T00:00:00',\n 'last_update': '2018-06-15T10:43:36',\n 'max_accepted_payout': '1000000.000 SBD',\n 'max_cashout_time': '1969-12-31T23:59:59',\n 'net_rshares': 0,\n 'net_votes': 0,\n 'parent_author': 'muratkbesiroglu',\n 'parent_permlink': 'short-sci-fi-story-the-android-that-sell-meaning',\n 'pending_payout_value': '0.000 SBD',\n 'percent_steem_dollars': 10000,\n 'permlink': 're-muratkbesiroglu-short-sci-fi-story-the-android-that-sell-meaning-20180615t104323737z',\n 'promoted': '0.000 SBD',\n 'reblogged_by': [],\n 'replies': [],\n 'reward_weight': 10000,\n 'root_author': 'muratkbesiroglu',\n 'root_permlink': 'short-sci-fi-story-the-android-that-sell-meaning',\n 'root_title': 'Short Sci-Fi Story: The Android That Sell Meaning',\n 'title': '',\n 'total_payout_value': '0.000 SBD',\n 'total_pending_payout_value': '0.000 STEEM',\n 'total_vote_weight': 0,\n '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',\n 'vote_rshares': 0},\n {'abs_rshares': 0,\n 'active': '2018-06-15T11:26:15',\n 'active_votes': [],\n 'allow_curation_rewards': True,\n 'allow_replies': True,\n 'allow_votes': True,\n 'author': 'vicky3585',\n 'author_reputation': 40338001,\n 'author_rewards': 0,\n 'beneficiaries': [],\n 'body': 'lovely story keep it up...',\n 'body_length': 0,\n 'cashout_time': '2018-06-22T11:26:15',\n 'category': 'fiction',\n 'children': 0,\n 'children_abs_rshares': 0,\n 'created': '2018-06-15T11:26:15',\n 'curator_payout_value': '0.000 SBD',\n 'depth': 1,\n 'id': 53114015,\n 'json_metadata': '{\"tags\":[\"fiction\"],\"app\":\"steemit/0.1\"}',\n 'last_payout': '1970-01-01T00:00:00',\n 'last_update': '2018-06-15T11:26:15',\n 'max_accepted_payout': '1000000.000 SBD',\n 'max_cashout_time': '1969-12-31T23:59:59',\n 'net_rshares': 0,\n 'net_votes': 0,\n 'parent_author': 'muratkbesiroglu',\n 'parent_permlink': 'short-sci-fi-story-the-android-that-sell-meaning',\n 'pending_payout_value': '0.000 SBD',\n 'percent_steem_dollars': 10000,\n 'permlink': 're-muratkbesiroglu-short-sci-fi-story-the-android-that-sell-meaning-20180615t112615204z',\n 'promoted': '0.000 SBD',\n 'reblogged_by': [],\n 'replies': [],\n 'reward_weight': 10000,\n 'root_author': 'muratkbesiroglu',\n 'root_permlink': 'short-sci-fi-story-the-android-that-sell-meaning',\n 'root_title': 'Short Sci-Fi Story: The Android That Sell Meaning',\n 'title': '',\n 'total_payout_value': '0.000 SBD',\n 'total_pending_payout_value': '0.000 STEEM',\n 'total_vote_weight': 0,\n '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',\n 'vote_rshares': 0}]\n'Selected: muratkbesiroglu/short-sci-fi-story-the-android-that-sell-meaning'\n'Number of replies: 18'\n\n\nFrom 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.\n\nThat’s it!\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/07_get_post_comments\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see output in terminal/command prompt screen." + } + + + + + + + , + + "tutorials-python-get-post-details": { + "id": "tutorials-python-get-post-details", + "title": "PY: Get Post Details", + "category": "tutorials-python", + "description": "Get post details from list of posts from the blockchain with `created` filter and tag then display selected post details.", + "type": "", + "url": "/tutorials-python/get_post_details", + "content": "Full, runnable src of Get Post Details can be downloaded as part of the PY tutorials repository.\n\n\nWe 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\n\nIntro\n\nSteem 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.\n\nSteps\n\n\n App setup - Library install and import\n Post list - List of posts to select from created filter\n Post details - Get post details for selected post\n Print output - Print results in output\n\n\n1. App setup \n\nIn 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.\n\nFirst we import all three library and initialize Steem class\n\n import pprint\n from pick import pick\n # initialize Steem class\n from steem import Steem\n\n s = Steem()\n\n\n2. Post list \n\nNext we will fetch and make list of posts and setup pick properly.\n\n query = {\n \"limit\":5, #number of posts\n \"tag\":\"\" #tag of posts\n }\n #post list for selected query\n posts = s.get_discussions_by_created(query)\n\n title = 'Please choose post: '\n options = []\n #posts list options\n for post in posts:\n options.append(post[\"author\"]+'/'+post[\"permlink\"])\n # get index and selected filter name\n option, index = pick(options, title)\n\n\nThis 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.\n\n3. Post details \n\nNext 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.\n\n\ndetails = s.get_content(posts[index][\"author\"],posts[index][\"permlink\"])\n\n\n4. Print output \n\nNext, we will print result, details of selected post.\n\n # print post details for selected post\n pprint.pprint(details)\n pprint.pprint(\"Selected: \"+option)\n\n\nThe example of result returned from the service is a JSON object with the following properties:\n\n{\n \"id\": 37338948,\n \"author\": \"steemitblog\",\n \"permlink\": \"join-team-steemit-at-tokenfest\",\n \"category\": \"steemit\",\n \"parent_author\": \"\",\n \"parent_permlink\": \"steemit\",\n \"title\": \"Join Team Steemit at TokenFest!\",\n \"body\":\n \"<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*\",\n \"json_metadata\":\n \"{\\\"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\\\"}\",\n \"last_update\": \"2018-03-07T23:22:54\",\n \"created\": \"2018-03-07T20:56:36\",\n \"active\": \"2018-03-13T01:40:21\",\n \"last_payout\": \"1970-01-01T00:00:00\",\n \"depth\": 0,\n \"children\": 29,\n \"net_rshares\": \"11453442114933\",\n \"abs_rshares\": \"11454054795840\",\n \"vote_rshares\": \"11454054795840\",\n \"children_abs_rshares\": \"13568695606090\",\n \"cashout_time\": \"2018-03-14T20:56:36\",\n \"max_cashout_time\": \"1969-12-31T23:59:59\",\n \"total_vote_weight\": 3462435,\n \"reward_weight\": 10000,\n \"total_payout_value\": \"0.000 SBD\",\n \"curator_payout_value\": \"0.000 SBD\",\n \"author_rewards\": 0,\n \"net_votes\": 77,\n \"root_comment\": 37338948,\n \"max_accepted_payout\": \"0.000 SBD\",\n \"percent_steem_dollars\": 10000,\n \"allow_replies\": true,\n \"allow_votes\": true,\n \"allow_curation_rewards\": true,\n \"beneficiaries\": [],\n \"url\": \"/steemit/@steemitblog/join-team-steemit-at-tokenfest\",\n \"root_title\": \"Join Team Steemit at TokenFest!\",\n \"pending_payout_value\": \"46.436 SBD\",\n \"total_pending_payout_value\": \"0.000 STEEM\",\n \"active_votes\": [\n {\n \"voter\": \"steemitblog\",\n \"weight\": 0,\n \"rshares\": \"1870813909383\",\n \"percent\": 10000,\n \"reputation\": \"128210130644387\",\n \"time\": \"2018-03-07T20:56:36\"\n },\n {\n \"voter\": \"kevinwong\",\n \"weight\": 526653,\n \"rshares\": \"2208942520687\",\n \"percent\": 5000,\n \"reputation\": \"374133832002581\",\n \"time\": \"2018-03-08T04:27:00\"\n }\n ],\n \"replies\": [],\n \"author_reputation\": \"128210130644387\",\n \"promoted\": \"0.000 SBD\",\n \"body_length\": 754,\n \"reblogged_by\": []\n}\n'Selected: steemitblog/join-team-steemit-at-tokenfest'\n\n\nFrom 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.\n\nThat’s it!\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/05_get_post_details\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see output in terminal/command prompt screen." + } + + + + + + + , + + "tutorials-python-get-posts": { + "id": "tutorials-python-get-posts", + "title": "PY: Get Posts", + "category": "tutorials-python", + "description": "Tutorial pulls a list of the posts from the blockchain with selected filter and tag then displays output.", + "type": "", + "url": "/tutorials-python/get_posts", + "content": "Full, runnable src of Get Posts can be downloaded as part of the PY tutorials repository.\n\n\nThis 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\n\nIntro\n\nIn 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.\n\nSteps\n\n\n App setup - Library install and import\n Filters list - List of filters to select from\n Query details - Form a query\n Print output - Print results in output\n\n\n1. App setup \n\nIn 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.\n\nFirst we import all three library and initialize Steem class\n\n import pprint\n from pick import pick\n # initialize Steem class\n from steem import Steem\n\n s = Steem()\n\n\n2. Filters list \n\nNext we will make list of filters and setup pick properly.\n\n title = 'Please choose filter: '\n #filters list\n options = ['trending', 'hot', 'active', 'created', 'promoted']\n # get index and selected filter name\n option, index = pick(options, title)\n\n\nThis 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.\n\n3. Query details \n\nNext we will form a query. In Steem,\n\n\n You can add a tag to filter the posts that you receive from the server\n You can also limit the amount of results you would like to receive from the query\n\n\nquery = {\n \"limit\":2, #number of posts\n \"tag\":\"\" #tag of posts\n }\n#post list for selected query\nposts = {0: s.get_discussions_by_trending(query),\n 1: s.get_discussions_by_hot(query),\n 2: s.get_discussions_by_active(query),\n 3: s.get_discussions_by_created(query),\n 4: s.get_discussions_by_promoted(query)\n}\n\n\nAbove code shows example of query and simple list of function that will fetch post list with user selected filter.\n\n4. Print output \n\nNext, we will print result, post list and selected filter name.\n\n # print post list for selected filter\n pprint.pprint(posts[index])\n pprint.pprint(\"Selected: \"+option)\n\n\nThe example of result returned from the service is a JSON object with the following properties:\n\n[\n {\n \"id\": 37338948,\n \"author\": \"steemitblog\",\n \"permlink\": \"join-team-steemit-at-tokenfest\",\n \"category\": \"steemit\",\n \"parent_author\": \"\",\n \"parent_permlink\": \"steemit\",\n \"title\": \"Join Team Steemit at TokenFest!\",\n \"body\":\n \"<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*\",\n \"json_metadata\":\n \"{\\\"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\\\"}\",\n \"last_update\": \"2018-03-07T23:22:54\",\n \"created\": \"2018-03-07T20:56:36\",\n \"active\": \"2018-03-13T01:40:21\",\n \"last_payout\": \"1970-01-01T00:00:00\",\n \"depth\": 0,\n \"children\": 29,\n \"net_rshares\": \"11453442114933\",\n \"abs_rshares\": \"11454054795840\",\n \"vote_rshares\": \"11454054795840\",\n \"children_abs_rshares\": \"13568695606090\",\n \"cashout_time\": \"2018-03-14T20:56:36\",\n \"max_cashout_time\": \"1969-12-31T23:59:59\",\n \"total_vote_weight\": 3462435,\n \"reward_weight\": 10000,\n \"total_payout_value\": \"0.000 SBD\",\n \"curator_payout_value\": \"0.000 SBD\",\n \"author_rewards\": 0,\n \"net_votes\": 77,\n \"root_comment\": 37338948,\n \"max_accepted_payout\": \"0.000 SBD\",\n \"percent_steem_dollars\": 10000,\n \"allow_replies\": true,\n \"allow_votes\": true,\n \"allow_curation_rewards\": true,\n \"beneficiaries\": [],\n \"url\": \"/steemit/@steemitblog/join-team-steemit-at-tokenfest\",\n \"root_title\": \"Join Team Steemit at TokenFest!\",\n \"pending_payout_value\": \"46.436 SBD\",\n \"total_pending_payout_value\": \"0.000 STEEM\",\n \"active_votes\": [\n {\n \"voter\": \"steemitblog\",\n \"weight\": 0,\n \"rshares\": \"1870813909383\",\n \"percent\": 10000,\n \"reputation\": \"128210130644387\",\n \"time\": \"2018-03-07T20:56:36\"\n },\n {\n \"voter\": \"kevinwong\",\n \"weight\": 526653,\n \"rshares\": \"2208942520687\",\n \"percent\": 5000,\n \"reputation\": \"374133832002581\",\n \"time\": \"2018-03-08T04:27:00\"\n }\n ],\n \"replies\": [],\n \"author_reputation\": \"128210130644387\",\n \"promoted\": \"0.000 SBD\",\n \"body_length\": 754,\n \"reblogged_by\": []\n },\n {\n\n }\n]\n'Selected: hot'\n\n\nFrom 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.\n\nThat’s it!\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/04_get_posts\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see output in terminal/command prompt screen." + } + + + + + + + , + + "tutorials-python-get-voters-list-on-post": { + "id": "tutorials-python-get-voters-list-on-post", + "title": "PY: Get Voters List On Post", + "category": "tutorials-python", + "description": "Voters list and detail of each vote on selected content.", + "type": "", + "url": "/tutorials-python/get_voters_list_on_post", + "content": "Full, runnable src of Get Voters List On Post can be downloaded as part of the PY tutorials repository.\n\n\nTutorial 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.\n\nIntro\n\nSteem 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.\n\nSteps\n\n\n App setup - Library install and import\n Post list - List of posts to select from created filter\n Voters list - Get voters list for selected post\n Print output - Print results in output\n\n\n1. App setup \n\nIn 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.\n\nFirst we import all three library and initialize Steem class\n\n import pprint\n from pick import pick\n # initialize Steem class\n from steem import Steem\n\n s = Steem()\n\n\n2. Post list \n\nNext we will fetch and make list of posts and setup pick properly.\n\n query = {\n \"limit\":5, #number of posts\n \"tag\":\"\" #tag of posts\n }\n #post list for selected query\n posts = s.get_discussions_by_active(query)\n\n title = 'Please choose post: '\n options = []\n #posts list options\n for post in posts:\n options.append(post[\"author\"]+'/'+post[\"permlink\"])\n # get index and selected filter name\n option, index = pick(options, title)\n\n\nThis 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.\n\n3. Voters list \n\nNext 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.\n\n\nvoters = s.get_active_votes(posts[index][\"author\"],posts[index][\"permlink\"])\n\n\n4. Print output \n\nNext, we will print result, details of selected post.\n\n # print voters list for selected post\n pprint.pprint(voters)\n pprint.pprint(\"Selected: \"+option)\n\n\nThe example of result returned from the service is a JSON object with the following properties:\n\n[{'percent': 100,\n 'reputation': '4675452335798',\n 'rshares': 174045922,\n 'time': '2018-06-13T05:27:06',\n 'voter': 'ubg',\n 'weight': 663},\n {'percent': 3000,\n 'reputation': 0,\n 'rshares': '52213408920',\n 'time': '2018-06-13T12:53:30',\n 'voter': 'warofcraft',\n 'weight': 99589},\n {'percent': 10000,\n 'reputation': '16976056264304',\n 'rshares': '41495494555',\n 'time': '2018-06-13T08:56:00',\n 'voter': 'jiahn',\n 'weight': 80257}\n]\n'Selected: steemitblog/join-team-steemit-at-tokenfest'\n\n\nFrom 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.\n\nThat’s it!\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/06_get_voters_list\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see output in terminal/command prompt screen." + } + + + + + + + , + + "tutorials-python-getting-started": { + "id": "tutorials-python-getting-started", + "title": "PY: Getting Started", + "category": "tutorials-python", + "description": "The official Steem library for Python is `steem-python`. It comes with a BIP38 encrypted wallet and a practical CLI utility called `steempy`.", + "type": "", + "url": "/tutorials-python/getting_started", + "content": "Full, runnable src of Getting Started can be downloaded as part of the PY tutorials repository.\n\n\nThe library was designed to allow Python developers to easily access the network as well as build utilities and applications.\n\nCurrently steem-python documentation is generated in the standard pydoc format.\n\nDocumentation is available at: Official steem-python Docs.\n\n\n\nDev requirements\n\nIn our Python tutorials we recommend developers to be familiar with following requirements/libraries.\n\n\n \n Python developer should be familiar with Python 3.x and above\n \n \n Medium knowledge of package manager pip/pip3 and/or pipenv is required, since our tutorials will be using package manager to get started quickly.\n \n \n 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.\n \n \n Python environment path should be set up properly so that terminal can access proper python library without conflicts.\n \n \n Additional and optional packages that we might use: setuptools, brew\n \n\n\nTo get started with Python, you can also check official Python installation and Python tutorial.\n\nTo get started with our Python tutorials, checkout our first tutorial here." + } + + + + + + + , + + "tutorials-python-grant-active-permission": { + "id": "tutorials-python-grant-active-permission", + "title": "PY: Grant Active Permission", + "category": "tutorials-python", + "description": "How to give another user active permission on your account using Python.", + "type": "", + "url": "/tutorials-python/grant_active_permission", + "content": "Full, runnable src of Grant Active Permission can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nProviding 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.\n\nOne 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.\n\nActive 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.\n\nthis article has more detail around active authorities\n\nIntro\n\nThe 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:\n\n\n foreign - The foreign account that will obtain access\n 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.\n permission - The actual permission to modify. This value must be either “posting”, “active” or “owner”\n account - The account to allow access to\n threshold - The threshold that needs to be reached by signatures to be able to interact\n\n\nThe disallow method uses the same parameters except for weight which is not required.\n\nThere 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.\n\nSteps\n\n\n App setup - Library install and import. Input user info and connection to production\n Username validation - Check validity of user and foreign account\n Check permission status - Check current permission status of foreign account\n Commit to blockchain - Commit transaction to blockchain\n\n\n1. App setup and connection \n\nIn this tutorial we use 2 packages:\n\n\n steem - steem-python library and interaction with Blockchain\n pick - helps select the query type interactively\n\n\nWe import the libraries for the application.\n\nimport steembase\nimport steem\nfrom pick import pick\n\n\nWe 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.\n\n#capture user information\nusername = input('Enter username: ')\nwif = input('Enter private ACTIVE key: ')\n\n#connect to production server with active key\nclient = steem.Steem(keys=[wif])\n\n\n2. Username validation \n\nBoth 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.\n\n#check valid user\nuserinfo = client.get_account(username)\nif(userinfo is None) :\n print('Oops. Looks like user ' + username + ' doesn\\'t exist on this chain!')\n exit()\n\n#get account to authorise and check if valid\nforeign_acc = input('Please enter the account name for ACTIVE authorisation: ')\nif (foreign_acc == username) :\n print('Cannot allow or disallow active permission to your own account')\n exit()\nforeign_userinfo = client.get_account(foreign_acc)\nif(foreign_userinfo is None) :\n print('Oops. Looks like user ' + foreign_acc + ' doesn\\'t exist on this chain!')\n exit()\n\n\n3. Check permission status \n\nIn 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.\n\n#check if foreign_account already has active auth\n_data = []\ntitle = ''\nfor i in range(len(userinfo['active']['account_auths'])) :\n _data.append(userinfo['active']['account_auths'][i])\n if (_data[i][0] == foreign_acc) :\n title = (foreign_acc + ' already has active permission. Please choose option from below list')\n options = ['DISALLOW', 'CANCEL']\n\nif (title == '') :\n title = (foreign_acc + ' does not yet active permission. Please choose option from below list')\n options = ['ALLOW', 'CANCEL']\n\n\n4. Commit to blockchain \n\nBased 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.\n\noption, index = pick(options, title)\n\nif (option == 'CANCEL') :\n print('operation cancelled')\n exit()\n\nif (option == 'ALLOW') :\n #allow(foreign, weight=None, permission='posting', account=None, threshold=None)\n client.allow(foreign=foreign_acc, weight=1, permission='active', account=username, threshold=1)\n print(foreign_acc + ' has been granted active permission')\nelse :\n #disallow(foreign, permission='posting', account=None, threshold=None)\n client.disallow(foreign=foreign_acc, permission='active', account=username, threshold=1)\n print('active permission for ' + foreign_acc + ' has been removed')\n\n\nAnd that’s it!\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/31_grant_active_permission\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-grant-posting-permission": { + "id": "tutorials-python-grant-posting-permission", + "title": "PY: Grant Posting Permission", + "category": "tutorials-python", + "description": "How to give another user posting permission on your account using Python.", + "type": "", + "url": "/tutorials-python/grant_posting_permission", + "content": "Full, runnable src of Grant Posting Permission can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nProviding 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.\n\nIntro\n\nThe 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:\n\n\n foreign - The foreign account that will obtain access\n 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.\n permission - The actual permission to modify. This value must be either “posting”, “active” or “owner”\n account - The account to allow access to\n threshold - The threshold that needs to be reached by signatures to be able to interact\n\n\nThe disallow method uses the same parameters except for weight which is not required.\n\nThere 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.\n\nSteps\n\n\n App setup - Library install and import. Input user info and connection to production\n Username validation - Check validity of user and foreign account\n Check permission status - Check current permission status of foreign account\n Commit to blockchain - Commit transaction to blockchain\n\n\n1. App setup and connection \n\nIn this tutorial we use 2 packages:\n\n\n steem - steem-python library and interaction with Blockchain\n pick - helps select the query type interactively\n\n\nWe import the libraries for the application.\n\nimport steembase\nimport steem\nfrom pick import pick\n\n\nWe 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.\n\n#capture user information\nusername = input('Enter username: ')\nwif = input('Enter private ACTIVE key: ')\n\n#connect to production server with active key\nclient = steem.Steem(keys=[wif])\n\n\n2. Username validation \n\nBoth 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.\n\n#check valid user\nuserinfo = client.get_account(username)\nif(userinfo is None) :\n print('Oops. Looks like user ' + username + ' doesn\\'t exist on this chain!')\n exit()\n\n#get account to authorise and check if valid\nforeign_acc = input('Please enter the account name for POSTING authorisation: ')\nif (foreign_acc == username) :\n print('Cannot allow or disallow posting permission to your own account')\n exit()\nforeign_userinfo = client.get_account(foreign_acc)\nif(foreign_userinfo is None) :\n print('Oops. Looks like user ' + foreign_acc + ' doesn\\'t exist on this chain!')\n exit()\n\n\n3. Check permission status \n\nIn 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.\n\n#check if foreign_account already has posting auth\n_data = []\ntitle = ''\nfor i in range(len(userinfo['posting']['account_auths'])) :\n _data.append(userinfo['posting']['account_auths'][i])\n if (_data[i][0] == foreign_acc) :\n title = (foreign_acc + ' already has posting permission. Please choose option from below list')\n options = ['DISALLOW', 'CANCEL']\n\nif (title == '') :\n title = (foreign_acc + ' does not yet posting permission. Please choose option from below list')\n options = ['ALLOW', 'CANCEL']\n\n\n4. Commit to blockchain \n\nBased 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.\n\noption, index = pick(options, title)\n\nif (option == 'CANCEL') :\n print('operation cancelled')\n exit()\n\nif (option == 'ALLOW') :\n #allow(foreign, weight=None, permission='posting', account=None, threshold=None)\n client.allow(foreign=foreign_acc, weight=1, permission='posting', account=username, threshold=1)\n print(foreign_acc + ' has been granted posting permission')\nelse :\n #disallow(foreign, permission='posting', account=None, threshold=None)\n client.disallow(foreign=foreign_acc, permission='posting', account=username, threshold=1)\n print('posting permission for ' + foreign_acc + ' has been removed')\n\n\nAnd that’s it!\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/30_grant_posting_permission\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-password-key-change": { + "id": "tutorials-python-password-key-change", + "title": "PY: Password Key Change", + "category": "tutorials-python", + "description": "How to change your accounts password and keys", + "type": "", + "url": "/tutorials-python/password_key_change", + "content": "Full, runnable src of Password Key Change can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIntro\n\nThe 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:\n\n\n account - The user account that we will be changing\n old_password - Your existing password for the account we are changing\n new_password - The new password we will be updating your account with\n\n\nCaution:\nThis functionality does not work on the TestNet so we will be modifying the live blockchain.\n\nSteps\n\n\n App setup - Library install and import. Connection to production\n User input - Input user and limit parameters\n Connect to the blockchain - Connect to the blockchain using the parameters collected from the user\n Configure new keys - Setup the new json object that will have the new keys derived from your new password\n Commit changes to blockchain - Commit the account update to the blockchain\n\n\n1. App setup \n\nIn this tutorial we use 2 package:\n\n\n steem - steem-python library and interaction with Blockchain\n steembase - library containing functions to manipulate private keys and passwords as well as commit the operation to the blockchain\n\n\nWe import the libraries and get parameters from the user.\n\nimport steem\nimport steembase\nfrom steembase.account import PasswordKey\nfrom steembase.account import PrivateKey\nfrom steembase import operations\n\n\n2. User input\n\nYou 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.\n\naccount = input('Account: ')\nold_password = input('Current password: ')\nnew_password = input('New password: ')\n\n\n3. Connect to the blockchain\n\nFrom the parameters that have been collected we will generate the private key for the account and connect to the Steem blockchain.\n\nold_owner_key = str(\n PasswordKey(account, old_password, \"owner\").get_private_key()\n)\n\nclient = steem.Steem(keys=[old_owner_key])\n\n\n4. Configure new keys\n\nWe 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.\n\nnew_public_keys = {}\n\nfor role in [\"owner\", \"active\", \"posting\", \"memo\"]:\n private_key = PasswordKey(account, new_password, role).get_private_key()\n new_public_keys[role] = str(private_key.pubkey)\n\nnew_data = {\n \"account\": account,\n \"json_metadata\": {},\n \"owner\": {\n \"key_auths\": [\n [new_public_keys[\"owner\"], 1]\n ],\n \"account_auths\": [],\n \"weight_threshold\": 1\n },\n \"active\": {\n \"key_auths\": [\n [new_public_keys[\"active\"], 1]\n ],\n \"account_auths\": [],\n \"weight_threshold\": 1\n },\n \"posting\": {\n \"key_auths\": [\n [new_public_keys[\"posting\"], 1]\n ],\n \"account_auths\": [],\n \"weight_threshold\": 1\n },\n \"memo_key\": new_public_keys[\"memo\"]\n}\n\nprint(\"New data:\")\nprint(new_data)\n\n\n5. Commit changes to blockchain \n\nThe operations.AccountUpdate(**new_data) creates the operation that will be committed to the blockchain using the new json object we have created.\n\nOnce we commit the changes to the blockchain using client.commit.finalizeOp the changes are committed and the password is updated.\n\nop = operations.AccountUpdate(**new_data)\n\nresult = client.commit.finalizeOp(op, account, \"owner\")\nprint(\"Result:\")\nprint(result)\n\n\nIf you update your password and attempt to update it again to quickly you will receive the following error.\n\nAssert Exception:_db.head_block_time() - account_auth.last_owner_update > STEEM_OWNER_UPDATE_LIMIT: Owner authority can only be updated once an hour.\n\n\nYou will need to wait at least an hour before attempting this again.\n\nThat’s it!\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/33_password_key_change\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-power-down": { + "id": "tutorials-python-power-down", + "title": "PY: Power Down", + "category": "tutorials-python", + "description": "How to power down (withdraw) your vesting shares using Python.", + "type": "", + "url": "/tutorials-python/power_down", + "content": "Full, runnable src of Power Down can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIntro\n\nThe 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:\n\n\n amount - The amount of VESTS that will be withdrawn. This must be of the float data type\n account - The specified user account for the transfer\n\n\nSteps\n\n\n App setup - Library install and import. Connection to testnet\n User information and steem node - Input user information and connection to Steem node\n Check balance - Check current vesting balance of user account\n Conversion amount and commit - Input of VESTS amount to convert and commit to blockchain\n\n\n1. App setup \n\nIn this tutorial we use 2 packages:\n\n\n steem - steem-python library and interaction with Blockchain\n pick - helps select the query type interactively\n\n\nWe import the libraries and connect to the testnet.\n\nimport steembase\nimport steem\nfrom pick import pick\nfrom steem.amount import Amount\n\nsteembase.chains.known_chains['STEEM'] = {\n 'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',\n 'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'\n}\n\n\nBecause this tutorial alters the blockchain we connect to the testnet so we don’t create spam on the production server.\n\n2. User information and steem node \n\nWe 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.\n\n#capture user information\nusername = input('Enter username: ') #demo account: cdemo\nwif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3\n\n#connect node and private active key\nclient = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])\n\n\n3. Check balance \n\nIn order to give the user enough information to make the conversion we check the current balance of the account using the get_account function.\n\n#get account balance for vesting shares\nuserinfo = client.get_account(username)\ndelegated_vests = userinfo['delegated_vesting_shares']\nvesting_shares = userinfo['vesting_shares']\nto_withdraw = float(userinfo['to_withdraw'])\nwithdrawn = float(userinfo['withdrawn'])\n\navailable_vests = (Amount(vesting_shares).amount - Amount(delegated_vests).amount - \n ((to_withdraw - withdrawn)/1000000))\n\nprint('VESTS currently powering down: ' + str(to_withdraw/1000000) + ' VESTS' +\n '\\n' + 'Available VESTS: ' + str(available_vests) + ' VESTS')\n\ninput('\\n' + 'Press enter to continue' + '\\n')\n\n\nThe 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.\n\n4. Conversion amount and commit \n\nThe user is given the option to withdraw all available vesting shares, a portion of the shares or to cancel the transaction completely.\n\n#choice of transfer\ntitle = 'Please choose an option: '\noptions = ['Power down ALL', 'Power down PORTION', 'Cancel Transaction']\noption, index = pick(options, title)\n\n\nBased 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.\n\n#parameters: amount, account\nif (option == 'Cancel Transaction') :\n print('transaction cancelled')\n exit()\nelse :\n if (option == 'Power down ALL') :\n if (available_vests == 0) :\n print('No change to withdraw amount')\n else :\n amount = to_withdraw/1000000 + available_vests\n client.withdraw_vesting(amount, username)\n print(str(amount) + ' VESTS now powering down')\n else :\n amount = float(input('Please enter the amount of VESTS you would like to power down: '))\n if (amount < (to_withdraw/1000000 + available_vests)) :\n client.withdraw_vesting(amount, username)\n print(str(amount) + ' VESTS now powering down')\n else :\n if (amount == to_withdraw/1000000) :\n print('No change to withdraw amount')\n else :\n print('insufficient funds available')\n\n\nThe result is displayed on the console/terminal.\n\nWe 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.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/25_power_down\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-power-up-steem": { + "id": "tutorials-python-power-up-steem", + "title": "PY: Power Up Steem", + "category": "tutorials-python", + "description": "How to power up your STEEM to STEEM POWER using Python.", + "type": "", + "url": "/tutorials-python/power_up_steem", + "content": "Full, runnable src of Power Up Steem can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIntro\n\nThe 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:\n\n\n amount - The amount of STEEM to power up. This must be of the float data type\n to - The account to where the STEEM will be powered up\n account - The source user account for the transfer\n\n\nSteps\n\n\n App setup - Library install and import. Connection to testnet\n User information and steem node - Input user information and connection to Steem node\n Check balance - Check current vesting balance of user account\n Conversion amount - Input power up amount and check valid transfer\n Commit to blockchain - Commit transaction to blockchain\n\n\n1. App setup \n\nIn this tutorial we use 2 packages:\n\n\n steem - steem-python library and interaction with Blockchain\n pick - helps select the query type interactively\n\n\nWe import the libraries and connect to the testnet.\n\nimport steembase\nimport steem\nfrom steem.amount import Amount\nfrom pick import pick\n\nsteembase.chains.known_chains['STEEM'] = {\n 'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',\n 'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'\n}\n\n\nBecause this tutorial alters the blockchain we connect to a testnet so we don’t create spam on the production server.\n\n2. User information and steem node \n\nWe 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.\n\n#capture user information\nusername = input('Enter username: ') #demo account: cdemo\nwif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3\n\n#connect node and private active key\nclient = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])\n\n\n3. Check balance \n\nIn order to give the user enough information to make the conversion we check the current balance of the account using the get_account function.\n\n#check valid user and get account balance\nuserinfo = client.get_account(username)\nif(userinfo is None) :\n print('Oops. Looks like user ' + username + ' doesn\\'t exist on this chain!')\n exit()\nbalance = userinfo['balance']\n\nprint('Available STEEM balance: ' + balance + '\\n')\n\ninput('Press any key to continue')\n\n\nThe results of the query are displayed in the console/terminal.\n\n4. Conversion amount \n\nBoth 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.\n\n#choice of account\ntitle = 'Please choose an option for an account to transfer to: '\noptions = ['SELF', 'OTHER']\noption, index = pick(options, title)\n\nif (option == 'OTHER') :\n #account to power up to\n to_account = input('Please enter the ACCOUNT to where the STEEM will be transferred: ')\n #check valid username\n result = client.get_account(to_account)\n if (not result) :\n print(to_account + ' doesn\\'t exist on this chain!')\n exit()\nelse :\n print('\\n' + 'Power up STEEM to own account' + '\\n')\n to_account = username\n\n#amount to power up\namount = float(input('Please enter the amount of STEEM to power up: '))\n\n\n5. Commit to blockchain \n\nNow 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.\n\n#parameters: amount, to, account\nif (amount == 0) :\n print('\\n' + 'No STEEM entered for powering up')\n exit()\nelse :\n if (amount > Amount(balance).amount) :\n print('\\n' + 'Insufficient funds available')\n exit()\n else :\n client.transfer_to_vesting(amount, to_account, username)\n print('\\n' + str(amount) + ' STEEM has been powered up successfully')\n\n\nThe result of the power up transfer is displayed on the console/terminal.\n\nAs an added check we also display the new STEEM balance of the user on the terminal/console\n\n#get new account balance\nuserinfo = client.get_account(username)\nbalance = userinfo['balance']\nprint('New STEEM balance: ' + balance)\n\n\nWe 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.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/24_power_up_steem\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-reblogging-post": { + "id": "tutorials-python-reblogging-post", + "title": "PY: Reblogging Post", + "category": "tutorials-python", + "description": "We will show how to reblog or resteem post using Python, with username and posting private key.", + "type": "", + "url": "/tutorials-python/reblogging_post", + "content": "Full, runnable src of Reblogging Post can be downloaded as part of the PY tutorials repository.\n\n\nTutorial will also explain and show you how to sign/broadcast transaction on Steem blockchain using the steem-python library.\n\nIntro\n\nSteem python library has built-in function to commit transaction and broadcast it to the network.\n\nSteps\n\n\n App setup - Library install and import\n Post list - List of posts to select from trending filter\n Enter user credentials - Enter user credentails to sign transaction\n\n\n1. App setup \n\nIn 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.\n\nFirst we import all three library and initialize Steem class\n\n import pprint\n from pick import pick\n # initialize Steem class\n from steem import Steem\n\n s = Steem()\n\n\n2. Post list \n\nNext we will fetch and make list of accounts and setup pick properly.\n\n query = {\n \"limit\":5, #number of posts\n \"tag\":\"\" #tag of posts\n }\n # post list from trending post list\n posts = s.get_discussions_by_trending(query)\n\n title = 'Please choose post to reblog: '\n options = []\n # post list\n for post in posts:\n options.append('@'+post[\"author\"]+'/'+post[\"permlink\"])\n\n\n\nThis will show us list of posts to select in terminal/command prompt. And after selection we will get formatted post as an option variable.\n\n3. Enter user credentials \n\nNext in order to sign transaction, application asks for username and posting private key to sign transaction and broadcast it.\n\n # get index and selected post\n option, index = pick(options, title)\n pprint.pprint(\"You selected: \"+option)\n\n account = input(\"Enter your username? \")\n wif = input(\"Enter your Posting private key? \")\n\n # commit or build transaction\n c = Commit(steem=Steem(keys=[wif]))\n\n # broadcast transaction\n c.resteem(option, account=account)\n\n\n\nThat’s it, if transaction is successful you shouldn’t see any error messages, otherwise you will be notified.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/14_reblogging_post\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see output in terminal/command prompt screen." + } + + + + + + + , + + "tutorials-python-search-accounts": { + "id": "tutorials-python-search-accounts", + "title": "PY: Search Accounts", + "category": "tutorials-python", + "description": "How to pull a list of the active user accounts or trending tags from the blockchain using Python.", + "type": "", + "url": "/tutorials-python/search_accounts", + "content": "Full, runnable src of Search Accounts can be downloaded as part of the PY tutorials repository.\n\n\nThis 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.\n\nIntro\n\nWe 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:\n\n\n 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\n limit - The maximum number of names/tags that the query retrieves\n\n\nSteps\n\n\n App setup - Library import and Steem class initialisation\n List selection - Selection of the type of list\n Get and display account names - Get a list of account names from the blockchain\n Get and display trending tags - Get a list of trending tags from the blockchain\n\n\n1. App setup\n\nIn this tutorial we use 2 packages, pick - helps us to select the query type interactively. steem - steem-python library for interaction with the Blockchain.\n\nFirst we import both libraries and initialize Steem class\n\nfrom steem import Steem\nfrom pick import pick\n\n\ns = Steem()\n\n\n2. List selection\n\nThe user is given the option of which list to create, active accounts or trending tags. We create this option list and setup pick.\n\n#choose list type\ntitle = 'Please select type of list:'\noptions = ['Active Account names', 'Trending tags']\n\n#get index and selected list name\noption, index = pick(options, title)\n\n\nThis will show the two options as a list to select in terminal/command prompt. From there we can determine which function to execute.\n\n3. Get and display account names\n\nOnce 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.\n\nif option=='Active Account names' :\n\t#capture starting account\n\taccount = input(\"Enter account name to start search from: \")\n\t#input list limit\n\tlimit = input(\"Enter max number of accounts to display: \")\n\tlists = s.lookup_accounts(account, limit)\n\tprint('\\n' + \"List of \" + option + '\\n')\n\tprint(*lists, sep='\\n')\n\n\nOnce the list is generated it is displayed on the UI with line separators along with a heading of what list it is.\n\n4. Get and display trending tags\n\nThe 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.\n\nelse :\n\t#capture starting tag\n\taftertag = input(\"Enter tag name to start search from: \")\n\t#capture list limit\n\tlimit = input(\"Enter max number of tags to display: \")\n\tlists = s.get_trending_tags(aftertag, limit)\n\tprint('\\n' + \"List of \" + option + '\\n')\n\tfor names in lists :\n\t\tprint(names[\"name\"])\n\n\nThe 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.\n\nThat’s it!.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/15_search_accounts\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see output in terminal/command prompt screen." + } + + + + + + + , + + "tutorials-python-search-tags": { + "id": "tutorials-python-search-tags", + "title": "PY: Search Tags", + "category": "tutorials-python", + "description": "How to pull a list of the trending tags from the blockchain using Python.", + "type": "", + "url": "/tutorials-python/search_tags", + "content": "Full, runnable src of Search Tags can be downloaded as part of the PY tutorials repository.\n\n\nPlease refer to 15_search_accounts which includes a tutorial for trending tags as well." + } + + + + + + + , + + "tutorials-python-stream-blockchain-transactions": { + "id": "tutorials-python-stream-blockchain-transactions", + "title": "PY: Stream Blockchain Transactions", + "category": "tutorials-python", + "description": "How to stream transactions on the live **Steem** blockchain", + "type": "", + "url": "/tutorials-python/stream_blockchain_transactions", + "content": "Full, runnable src of Stream Blockchain Transactions can be downloaded as part of the PY tutorials repository.\n\n\nIn this tutorial we show you how to stream transactions on the Steem blockchain using the blockchain class found within the steem-python library.\n\nIntro\n\nTutorial 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.\n\nWe 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.\n\nSteps\n\n\n App setup Configure imports and initialization of libraries\n Stream blocks Stream blocks\n Sample result Stream blocks\n\n\n1. App setup\n\nIn this tutorial we use 1 package:\n\nsteem - steem-python library and interaction with Blockchain\n\nfrom steem.blockain import Blockchain\n\nblockchain = Blockchain()\n\n\nAbove we create an instance of Blockchain which will give us the ability to stream the live transactions from the blockchain.\n\n2. Stream blocks\n\nNext we create an instance of stream and then loop through the steam as transactions are available and print them to the screen.\n\nstream = blockchain.stream()\n\nfor post in stream:\n\tprint(post)\n\n\n3. Sample result\n\n{\n \"curator\": \"idx\",\n \"reward\": \"4.042446 VESTS\",\n \"comment_author\": \"blackbunny\",\n \"comment_permlink\": \"6tfv5e\",\n \"_id\": \"5801d1c99ca7ecd1d4387ebd89d4edab08612b35\",\n \"type\": \"curation_reward\",\n \"timestamp\": \"2018-09-21T21:11:02.005Z\",\n \"block_num\": 26136919,\n \"trx_id\": \"0000000000000000000000000000000000000000\"\n}\n\n\nThat’s it!\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/13_stream_blockchain_transactions\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-submit-comment-reply": { + "id": "tutorials-python-submit-comment-reply", + "title": "PY: Submit Comment Reply", + "category": "tutorials-python", + "description": "How to submit a comment on a post to the Steem blockchain.", + "type": "", + "url": "/tutorials-python/submit_comment_reply", + "content": "Full, runnable src of Submit Comment Reply can be downloaded as part of the PY tutorials repository.\n\n\nThis 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.\n\nIntro\n\nThe 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:\n\n\n 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\n body - The body of the post\n author - The account that you are posting from\n permlink - A unique adentifier for the\n tags - Between 1 and 5 key words that defines the post\n reply_idendifier - Identifier of the parent post(used for comments)\n json_metadata - JSON meta objec that can be attached to the post\n comment_options - JSON options object that can be attached to the post to specify additional options like ‘max_payouts’, ‘allow_votes’, etc.\n community - Name of the community you are posting into\n beneficiaries - A list of beneficiaries for posting reward distribution.\n self_vote - Upvote the post as author right after posting\n\n\nWe 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.\n\nA 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.\n\nSteps\n\n\n App setup - Library install and import. Connection to Steem node\n Variable input and format - Input and creation of varialbes\n Initialize steem class - Initialize the steem class with the relevant node and private key\n Post submission and result - Committing of transaction to the blockchain\n\n\n1. App setup \n\nIn this tutorial we use 4 packages:\n\n\n random and string - used to create a random string used for the permlink\n steem - steem-python library and interaction with Blockchain\n steembase - used to connect to the testnet\n\n\nWe import the libraries and connect to the testnet.\n\nimport random\nimport string\nimport steembase\nimport steem\n\nsteembase.chains.known_chains['STEEM'] = {\n 'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',\n 'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'\n}\n\n\nBecause 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.\n\n2. Variable input and format\n\nThe 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.\n\n#capture variables\nparentAuthor = input('Parent author: ')\nparentPermlink = input('Parent permlink: ')\nauthor = input('Username: ')\nwif = input('Private posting key: ')\nbody = input('Comment Body: ')\n\n\nWe 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\n\n#combining parent values to create reply identifier\nreply_identifier = '/'.join([parentAuthor,parentPermlink])\n\n#random generator to create post permlink\npermlink = ''.join(random.choices(string.digits, k=10))\n\n\nThe 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.\n\n3. Initialize steem class\n\nWe 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.\n\n#connect node and private posting key\nclient = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])\n\n\n4. Post submission and result\n\nThe 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.\n\n#commit post to blockchain\nclient.commit.post(title='', body=body, author=author, permlink=permlink, reply_identifier=reply_identifier)\n\nprint(\"Comment created successfully\")\nprint(permlink)\n\n\nA 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.\n\nYou 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.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/11_submit_comment_reply\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-submit-post": { + "id": "tutorials-python-submit-post", + "title": "PY: Submit Post", + "category": "tutorials-python", + "description": "How to submit post on Steem blockchain using Python.", + "type": "", + "url": "/tutorials-python/submit_post", + "content": "Full, runnable src of Submit Post can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIntro\n\nThe 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:\n\n\n title - The title of the post\n body - The body of the post\n author - The account that you are posting from\n permlink - A unique adentifier for the\n tags - Between 1 and 5 key words that defines the post\n reply_idendifier - Identifier of the parent post(used for comments)\n json_metadata - JSON meta objec that can be attached to the post\n comment_options - JSON options object that can be attached to the post to specify additional options like ‘max_payouts’, ‘allow_votes’, etc.\n community - Name of the community you are posting into\n beneficiaries - A list of beneficiaries for posting reward distribution.\n self_vote - Upvote the post as author right after posting\n\n\nWe 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.\n\nSteps\n\n\n App setup - Library install and import. Connection to Steem node\n Variable input and format - Input and creation of varialbes\n Post submission and result - Committing of transaction to the blockchain\n\n\n1. App setup \n\nIn this tutorial we use 4 packages:\n\n\n random and string - used to create a random string used for the permlink\n steem - steem-python library and interaction with Blockchain\n steembase - used to connect to the testnet\n\n\nWe import the libraries, connect to the testnet and initialize the Steem class.\n\nimport random\nimport string\nimport steembase\nimport steem\n\nsteembase.chains.known_chains['STEEM'] = {\n 'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',\n 'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'\n}\n\n#connect node and private posting key\nclient = steem.Steem(nodes=['https://testnet.steem.vc'], keys=['5JEZ1EiUjFKfsKP32b15Y7jybjvHQPhnvCYZ9BW62H1LDUnMvHz'])\n\n\nBecause 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.\n\n2. Variable input and format\n\nThe first three variables are captured via a simple string input while the tags variable is captured in the form of an array.\n\n#capture variables\nauthor = input('Username: ')\ntitle = input('Post Title: ')\nbody = input('Post Body: ')\n\n#capture list of tags and separate by \" \"\ntaglimit = 2 #number of tags 1 - 5\ntaglist = []\nfor i in range(1, taglimit+1):\n\tprint(i)\n\ttag = input(' Tag : ')\n\ttaglist.append(tag)\n\n\nThe 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\n\n\" \".join(taglist) #create string joined with empty spaces\n\n#random generator to create post permlink\npermlink = ''.join(random.choices(string.digits, k=10))\n\n\nThe 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.\n\n3. Post submission and result\n\nThe 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.\n\nclient.commit.post(title=title, body=body, author=author, tags=taglist, permlink=permlink)\n\nprint(\"Post created successfully\")\n\n\nA simple confirmation is printed on the screen if the post is committed successfully.\n\nYou can also check on the testportal for the post.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/10_submit_post\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-transfer-steem-and-sbd": { + "id": "tutorials-python-transfer-steem-and-sbd", + "title": "PY: Transfer Steem And Sbd", + "category": "tutorials-python", + "description": "How to transfer STEEM and SBD to another account using Python.", + "type": "", + "url": "/tutorials-python/transfer_steem_and_sbd", + "content": "Full, runnable src of Transfer Steem And Sbd can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIntro\n\nThe 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:\n\n\n to - The intended recipient of the funds transfer\n 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\n asset - A string value specifying whether STEEM or SBD is being transferred\n memo - An optional text field containing comments on the transfer. This value may begin with ‘#’ for encrypted messaging\n account - The account that the funds are being transferred from\n\n\nSteps\n\n\n App setup - Library install and import. Connection to testnet\n User information and steem node - Input user information and connection to Steem node\n Check balance - Check current STEEM and SBD balance of user account\n Recipient input - Check for valid recipient account name\n Transfer type and amount - Input of transfer type and the amount to transfer\n Transfer commit - Commit of transfer to blockchain\n\n\n1. App setup \n\nIn this tutorial we use 2 packages:\n\n\n steem - steem-python library and interaction with Blockchain\n pick - helps select the query type interactively\n\n\nWe import the libraries and connect to the testnet.\n\nimport steembase\nimport steem\nfrom pick import pick\n\nsteembase.chains.known_chains['STEEM'] = {\n 'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',\n 'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'\n}\n\n\nBecause this tutorial alters the blockchain we connect to the testnet so we don’t create spam on the production server.\n\n2. User information and steem node \n\nWe 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.\n\n#capture user information\nusername = input('Enter username: ') #demo account: cdemo\nwif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3\n\n#connect node and private active key\nclient = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])\n\n\n3. Check balance \n\nIn order to give the user enough information to make the transfer we check the current balance of the account using the get_account function.\n\n#get account balance for STEEM and SBD\nuserinfo = client.get_account(username)\ntotal_steem = userinfo['balance']\ntotal_sbd = userinfo['sbd_balance']\n\nprint('CURRENT ACCOUNT BALANCE:' + '\\n' + total_steem + '\\n' + total_sbd + '\\n')\n\n\nThe result of the query is displayed in the console/terminal.\n\n4. Recipient input \n\nThe recipient account is input via the console/terminal and then a check is done whether that username does in fact exist.\n\n#get recipient name\nrecipient = input('Enter the user you wish to transfer funds to: ')\n\n#check for valid recipient name\nresult = client.get_account(recipient)\n\n\nThe 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.\n\n5. Transfer type and amount \n\nIf 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.\n\nif result:\n #choice of transfer\n title = 'Please choose transfer type: '\n options = ['STEEM', 'SBD', 'Cancel Transfer']\n # get index and selected transfer type\n option, index = pick(options, title)\nelse:\n print('Invalid recipient for funds transfer')\n exit()\n\n\nOnce the user chooses the type of transfer we proceed to assign the amount as well as the asset parameter.\n\nif option == 'Cancel Transfer':\n print('Transaction cancelled')\n exit()\nelse:\n if option == 'STEEM':\n #get STEEM transfer amount\n amount = input('Enter amount of STEEM to transfer to ' + recipient + ': ')\n asset = 'STEEM'\n else:\n #get SBD transfer amount\n amount = input('Enter amount of SBD to transfer to ' + recipient + ': ')\n asset = 'SBD'\n\n\n6. Transfer commit \n\nOnce all the parameters have been assigned we can proceed with the actual commit to the blockchain.\n\n#parameters: to, amount, asset, memo='', account\nclient.transfer(recipient, float(amount), asset, '', username)\nprint('\\n' + amount + ' ' + asset + ' has been transferred to ' + recipient)\n\n\nThe memo parameter can be left empty as in the above example. A simple confirmation is printed on the UI.\nAs 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.\n\n#get remaining account balance for STEEM and SBD\nuserinfo = client.get_account(username)\ntotal_steem = userinfo['balance']\ntotal_sbd = userinfo['sbd_balance']\n\nprint('\\n' + 'REMAINING ACCOUNT BALANCE:' + '\\n' + total_steem + '\\n' + total_sbd + '\\n')\n\n\nWe 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.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/21_transfer_steem_and_sbd\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-transfer-steem-and-sbd-to-savings-balance": { + "id": "tutorials-python-transfer-steem-and-sbd-to-savings-balance", + "title": "PY: Transfer Steem And Sbd To Savings Balance", + "category": "tutorials-python", + "description": "How to transfer STEEM and SBD to savings using Python.", + "type": "", + "url": "/tutorials-python/transfer_steem_and_sbd_to_savings_balance", + "content": "Full, runnable src of Transfer Steem And Sbd To Savings Balance can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIt 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.\n\nsteemlogin 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.\nhttps://steemlogin.com/sign/transfer-to-savings?from=username&to=username&amount=0.000%20STEEM&memo=text\nThis is similar to the steemlogin links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://steemlogin.com/sign. There is also a steemlogin link for withdrawing funds.\n\nIntro\n\nThe 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:\n\n\n 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\n asset - A string value specifying whether STEEM or SBD is being transferred\n memo - An optional text field containing comments on the transfer\n to - The recipient savings account name. Funds can be transferred to any other users’ savings balance\n account - The source account for the transfer\n\n\nand transfer_from_savings has 6 parameters:\n\n\n 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\n asset - A string value specifying whether STEEM or SBD is being withdrawn\n memo - An optional text field containing comments on the withdrawal\n request id - Integer identifier for tracking the withdrawal. This needs to be a unique number for a specified user\n to - The recipient account name. Funds can be withdrawn to any other users’ available balance\n account - The source account for the transfer\n\n\nSteps\n\n\n App setup - Library install and import. Connection to testnet\n User information and steem node - Input user information and connection to Steem node\n Check balance - Check current STEEM and SBD balance of user account\n Transfer type and amount - Input of transfer type and the amount to transfer\n Transfer commit - Commit of transfer to blockchain\n\n\n1. App setup \n\nIn this tutorial we use 3 packages:\n\n\n steem - steem-python library and interaction with Blockchain\n pick - helps select the query type interactively\n random - use to create random numbers\n\n\nWe import the libraries and connect to the testnet.\n\nimport steembase\nimport steem\nfrom pick import pick\nimport random\n\nsteembase.chains.known_chains['STEEM'] = {\n 'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',\n 'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'\n}\n\n\nBecause this tutorial alters the blockchain we connect to a testnet so we don’t create spam on the production server.\n\n2. User information and steem node \n\nWe 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.\n\n#capture user information\nusername = input('Enter username: ') #demo account: demo01\nwif = input('Enter private ACTIVE key: ') #demo account: 5HxTntgeoLm4trnTz94YBsY6MpAap1qRVXEKsU5n1v2du1gAgVH\n\n#connect node and private active key\nclient = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])\n\n\n3. Check balance \n\nIn 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.\n\n#check for valid account and get account balance for STEEM and SBD\nuserinfo = client.get_account(username)\nif(userinfo is None) :\n print('Oops. Looks like user ' + username + ' doesn\\'t exist on this chain!')\n exit()\n\ntotal_steem = userinfo['balance']\ntotal_sbd = userinfo['sbd_balance']\nsavings_steem = userinfo['savings_balance']\nsavings_sbd = userinfo['savings_sbd_balance']\n\nprint('CURRENT ACCOUNT BALANCE:' + '\\n' + total_steem + '\\n' + total_sbd + '\\n')\nprint('CURRENT SAVINGS BALANCE:' + '\\n' + savings_steem + '\\n' + savings_sbd + '\\n')\n\ninput('Press enter to continue with the transfer' + '\\n')\n\n\nThe result of the query is displayed in the console/terminal.\n\n4. Transfer type and amount \n\nThe 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.\n\n#choice of transfer/withdrawal\ntitle1 = 'Please choose transfer type: '\noptions1 = ['Transfer', 'Withdrawal', 'Cancel']\n#get index and selected transfer type\ntransfer_type, index = pick(options1, title1)\n\nif transfer_type == 'Cancel':\n print('Transaction cancelled')\n exit()\n\n#choice of currency\ntitle2 = 'Please choose currency: '\noptions2 = ['STEEM', 'SBD']\noption, index = pick(options2, title2)\n\nif option == 'STEEM':\n #get STEEM transfer amount\n amount = input('Enter amount of STEEM to transfer: ')\n asset = 'STEEM'\nelse:\n #get SBD transfer amount\n amount = input('Enter amount of SBD to transfer: ')\n asset = 'SBD'\n\n\n5. Transfer commit \n\nOnce 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.\n\nif transfer_type == 'Transfer':\n #parameters: amount, asset, memo, to, account\n client.transfer_to_savings(float(amount), asset, '', username, username)\n print('\\n' + 'Transfer to savings balance successful')\nelse:\n #create request ID random integer\n requestID = random.randint(1,1000000)\n #parameters: amount, asset, memo, request_id=None, to=None, account=None\n client.transfer_from_savings(float(amount), asset, '', requestID, username, username)\n print('\\n' + 'Withdrawal from savings successful, transaction ID: ' + str(requestID))\n\n\nWith 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.\n\nAs 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.\n\n#get remaining account balance for STEEM and SBD\nuserinfo = client.get_account(username)\ntotal_steem = userinfo['balance']\ntotal_sbd = userinfo['sbd_balance']\nsavings_steem = userinfo['savings_balance']\nsavings_sbd = userinfo['savings_sbd_balance']\n\nprint('\\n' + 'REMAINING ACCOUNT BALANCE:' + '\\n' + total_steem + '\\n' + total_sbd + '\\n')\nprint('CURRENT SAVINGS BALANCE:' + '\\n' + savings_steem + '\\n' + savings_sbd + '\\n')\n\n\nWe 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.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/33_transfer_steem_and_sbd_to_savings_balance\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-using-keys-securely": { + "id": "tutorials-python-using-keys-securely", + "title": "PY: Using Keys Securely", + "category": "tutorials-python", + "description": "Learn how Steem-Python library handles transaction signing with user's key and how to securely manage your private keys.", + "type": "", + "url": "/tutorials-python/using_keys_securely", + "content": "Full, runnable src of Using Keys Securely can be downloaded as part of the PY tutorials repository.\n\n\nIntro\n\nSteem 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.\n\nSteps\n\n\n App setup - Library install and import\n Key usage example - Example showing how to import keys\n\n\n1. App setup \n\nIn this tutorial we are only using steem package - steem-python library.\n\n # initialize Steem class\n from steem import Steem\n\n # defining private keys inside source code is not secure way but possible\n s = Steem(keys=['<private_posting_key>', '<private_active_key>'])\n\n\nLast line from above snippet shows how to define private keys for account that’s going to transact using script.\n\n2. Key usage example \n\nAfter defining private keys inside Steem class, we can quickly sign any transaction and broadcast it to the network.\n\n # above will allow accessing Commit methods such as\n # demo account sending 0.001 STEEM to demo1 account\n\n s.commit.transfer('demo','0.001','STEEM','memo text','demo1')\n\n\nAbove 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.\n\nYou can type following to learn more about steempy commands:\n\n steempy -h\n\n\nsteempy lets you leverage your BIP38 encrypted wallet to perform various actions on your accounts.\n\nThe 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.\n\nYou can import your Steem username with following command:\n\nsteempy importaccount username\n\nNext you can import individual private keys:\n\nsteempy addkey <private_key>\n\nThat’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.\n\n # if private keys are not defined\n # accessing Wallet methods are also possible and secure way\n s.wallet.get_active_key_for_account('demo')\n\n\nAbove line fetches private key for user demo from local machine and signs transaction.\n\nsteempy also allows you to sign and broadcast transactions from terminal. For example:\n\nsteempy transfer --account <account_name> <recipient_name> 1 STEEM memo\n\nwould sign and broadcast transfer operation,\n\nsteempy upvote --account <account_name> link\n\nwould sing and broadcast vote operation, etc.\n\nThat’s it!\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/001_using_keys_securely\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see output in terminal/command prompt screen." + } + + + + + + + , + + "tutorials-python-vote-on-content": { + "id": "tutorials-python-vote-on-content", + "title": "PY: Vote On Content", + "category": "tutorials-python", + "description": "How to vote on a post/comment using Python.", + "type": "", + "url": "/tutorials-python/vote_on_content", + "content": "Full, runnable src of Vote On Content can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIntro\n\nVoting 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:\n\n\n identifier - This is a combination of the author and permink of the post/comment that the vote will be on\n weight - This value determines whether the vote is an upvote (+100.0) or a downvote (-100.0) but this value cannot be 0\n username - The name of the account that is executing the vote\n\n\nSteps\n\n\n App setup - Library install and import. Connection to testnet\n User information and steem node - Input user information and connection to Steem node\n Check vote status - Vote status of post/comment\n Commit vote - Commit vote to the blockchain\n\n\n1. App setup \n\nIn this tutorial we use 3 packages:\n\n\n steem - steem-python library and interaction with Blockchain\n pick - helps select the query type interactively\n\n\nWe import the libraries and connect to the testnet.\n\nimport steembase\nimport steem\nfrom pick import pick\n\nsteembase.chains.known_chains['STEEM'] = {\n 'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',\n 'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'\n}\n\n\nBecause this tutorial alters the blockchain we connect to the testnet so we don’t create spam on the production server.\n\n2. User information and steem node\n\nWe 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.\n\n#capture user information\nusername = input('Please enter your username: ')\npostingkey = input('Please enter your private posting key: ')\n\n#connect node and private posting key, demo account name: cdemo, posting key: 5JEZ1EiUjFKfsKP32b15Y7jybjvHQPhnvCYZ9BW62H1LDUnMvHz\ns = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[postingkey])\n\n\n3. Check vote status\n\nIn 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.\nIf you need to find something to vote on, you can try (https://condenser.steem.vc/) YMMV.\n\n#capture variables\nauthor = input('Author of post/comment that you wish to vote for: ')\npermlink = input('Permlink of the post/comment you wish to vote for: ')\n\n\nThe vote status check is done with a simple query to the blockchain.\n\n#check vote status\nresult = s.get_active_votes(author, permlink)\n\n\nThis 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.\n\nif result:\n\tfor vote in result :\n\t\tif vote['voter'] == username:\n\t\t\ttitle = \"This post/comment has already been voted for\"\n\t\t\tbreak\n\t\telse:\n\t\t\ttitle = \"No vote for this post/comment has been submitted\"\nelse:\n\ttitle = \"No vote for this post/comment has been submitted\"\n\n\n4. Commit vote\n\nThe result from the previous step is used to give the user a choice in what the next step in the operation should be.\n\n#option to continue\noptions = ['Add/Change vote', 'Cancel voting process']\noption, index = pick(options, title)\n\n\nThe 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.\n\nIt’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\n#voting commit\nif option == 'Add/Change vote':\n\tweight = input('\\n'+'Please advise weight of vote between -100.0 and 100 (not zero): ')\n\tidentifier = ('@'+author+'/'+permlink)\n\ttry:\n\t\tprint('Sending vote. ...')\n\t\ts.commit.vote(identifier, float(weight), username)\n\t\tprint('\\n'+'Vote sent.')\n\texcept (RPCErrorRecoverable, RPCError) as err: \n\t\tprint('\\n'+'Exception encountered. Unable to vote')\n\nelse:\n\tprint('Voting has been cancelled')\n\n\nWhen the function is executed the selected vote weight overrides any value previously recorded on the blockchain.\n\nA simple confirmation of the chosen action is printed on the screen.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/17_vote_on_content\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + , + + "tutorials-python-witness-listing-and-voting": { + "id": "tutorials-python-witness-listing-and-voting", + "title": "PY: Witness Listing And Voting", + "category": "tutorials-python", + "description": "How to vote for or remove a vote for a witness user using Python.", + "type": "", + "url": "/tutorials-python/witness_listing_and_voting", + "content": "Full, runnable src of Witness Listing And Voting can be downloaded as part of the PY tutorials repository.\n\n\nIn 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.\n\nIntro\n\nThe 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:\n\n\n witness - The witness to approve\n account - The source user account for the voting\n approve - This value is set to True when approving a witness\n\n\nThe disapprove_witness has the same parameters except for _approve_ which is not required.\n\nSteps\n\n\n App setup - Library install and import. Connection to testnet\n User information and steem node - Input user information and connection to Steem node\n Active witness list - Create a list of active as well as already voted for witnesses\n Vote / Unvote - Input witness name and commite vote/unvote to blockchain\n\n\n1. App setup \n\nIn this tutorial we use 3 packages:\n\n\n steem - steem-python library and interaction with Blockchain\n pick - helps select the query type interactively\n pprint - print results in better format\n\n\nWe import the libraries and connect to the testnet.\n\nimport steembase\nimport steem\nfrom pick import pick\nimport pprint\n\nsteembase.chains.known_chains['STEEM'] = {\n 'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',\n 'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'\n}\n\n\nBecause this tutorial alters the blockchain we connect to a testnet so we don’t create spam on the production server.\n\n2. User information and steem node \n\nWe 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.\n\n#capture user information\nusername = input('Enter username: ') #demo account: cdemo\nwif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3\n\n#connect node and private active key\nclient = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])\n\n#check valid user\nuserinfo = client.get_account(username)\nif(userinfo is None) :\n print('Oops. Looks like user ' + username + ' doesn\\'t exist on this chain!')\n exit()\n\n\n3. Active witness list \n\nWe 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.\n\n#print list of active witnesses\nprint('ACTIVE WITNESSES')\nwitness_list = client.get_active_witnesses()\npprint.pprint(witness_list)\n\n\nWe 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.\n\n#print list of currently voted for witnesses\nprint('\\n' + 'WITNESSES CURRENTLY VOTED FOR')\nvote_list = userinfo['witness_votes']\npprint.pprint(vote_list)\n\ninput('Press enter to continue')\n\n\n4. Vote / Unvote \n\nThe 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.\n\n#choice of action\ntitle = ('Please choose action')\noptions = ['VOTE', 'UNVOTE', 'CANCEL']\noption, index = pick(options, title)\n\nif (option == 'CANCEL') :\n print('\\n' + 'operation cancelled')\n exit()\n\n\nVOTE :\n\nif (option == 'VOTE') :\n # vote process\n witness_vote = input('Please enter the witness name you wish to vote for: ')\n if witness_vote not in witness_list :\n print('\\n' + witness_vote + ' does not appear on the available witness list')\n exit()\n if witness_vote in vote_list :\n print('\\n' + witness_vote + ' cannot be voted for more than once')\n exit()\n client.approve_witness(witness=witness_vote, account=username, approve=True)\n print('\\n' + witness_vote + ' has been successfully voted for')\n\n\nUNVOTE :\n\nelse :\n # unvote process\n witness_unvote = input('Please enter the witness name you wish to remove the vote from: ')\n if witness_unvote not in vote_list :\n print('\\n' + witness_unvote + ' is not in your voted for list')\n exit()\n client.disapprove_witness(witness=witness_unvote, account=username)\n print('\\n' + witness_unvote + ' has been removed from your voted for list')\n\n\nA confirmation of the transaction to the blockchain is displayed on the UI.\n\nWe 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.\n\nTo Run the tutorial\n\n\n review dev requirements\n clone this repo\n cd tutorials/22_witness_listing_and_voting\n pip install -r requirements.txt\n python index.py\n After a few moments, you should see a prompt for input in terminal screen." + } + + + + + + + + + , + + "tutorials-recipes-account-creation-process": { + "id": "tutorials-recipes-account-creation-process", + "title": "Account creation process", + "category": "tutorials-recipes", + "description": "The methods on how to create a new account.", + "type": "", + "url": "/tutorials-recipes/account-creation-process", + "content": "This recipe will take you through the different options when creating accounts on the Steem blockchain.\n\nIntro\n\nThe Resource Credit system gives us two ways to create an account. We describe their use here.\n\n\n Account creation method comparison\n Discounted\n Non-discounted\n\n\nAccount creation method comparison\n\n\n \n \n Discounted account creations\n Non-discounted account creations\n \n \n \n \n You can purchase Account Creation Tokens(ACT) and use them to create an account. These tokens do not expire.\n You need to create an account and wait for it to be approved by the Steemit faucet\n \n \n Account’s are created immediately at no additional cost.\n You are required to pay the 3 STEEM to create an account and wait for the account to be approved.\n \n \n\n\n1. Discounted account creations\n\nThe discounted account creation process uses an Account Creation Token(ACT) that is purchased with Resource Credits (RC) to create the account instead of paying the creation fee in STEEM.\n\nACTs are only good for creating accounts. They have no other purpose. They do not expire, are not transferable, and there is also no upper limit to the amount of tokens one can have. (If you’re a hoarder, you can be stockpile them.) There is however a limit on the total amount of tokens available on the blockchain for claiming at any one time. The available tokens replenish over time, and the limit is decided upon by the witnesses.\n\nClaiming tokens is the first step required to create an account. To do this, broadcast the claim_account operation on the network to claim an account token.\n\n[\n \"claim_account\",\n {\n \"creator\": \"creator\",\n \"fee\": \"0.000 STEEM\",\n \"extensions\": []\n }\n]\n\n\nOnce you have claimed a token, broadcast the create_claimed_account operation to create the account using the account that claimed the token. Select a new unique account name and provide account keys for the new account. These can be generated using any of the Steem libraries available.\n\n[\n \"create_claimed_account\",\n {\n \"creator\": \"creator\",\n \"new_account_name\": \"new_account_name\",\n \"owner\": {\n \"weight_threshold\": 1,\n \"account_auths\": [],\n \"key_auths\": [[\"000000000000000000000000000000000000000000000000000\", 1]],\n },\n \"active\": {\n \"weight_threshold\": 1,\n \"account_auths\": [],\n \"key_auths\": [[\"000000000000000000000000000000000000000000000000000\", 1]],\n },\n \"posting\": {\n \"weight_threshold\": 1,\n \"account_auths\": [],\n \"key_auths\": [[\"000000000000000000000000000000000000000000000000000\", 1]],\n },\n \"memo_key\": {\n \"weight_threshold\": 1,\n \"account_auths\": [],\n \"key_auths\": [[\"000000000000000000000000000000000000000000000000000\", 1]],\n },\n \"json_metadata\": \"\",\n \"extensions\": []\n }\n]\n\n\nAccounts created with this method, don’t have any SP, but do have enough RC to interact with the chain at a starting level.\n\n2. Non-discounted account creation\n\nNon-discounted account creation operation allows you to create accounts by paying an account creation fee of 3 STEEM as part of the account creation api call. We use the account_create operation to commit this transaction to the blockchain. When creating a new account, the new account_name needs to be supplied. The keys must be derived from an owner-key which must be kept safe. The account keys can be generated using the new_account_name, owner-key and Steem tools.\n\n[\n \"account_create\",\n {\n \"fee\": \"3.00 STEEM\",\n \"creator\": \"creator\",\n \"new_account_name\": \"new_account_name\",\n \"owner\": {\n \"weight_threshold\": 1,\n \"account_auths\": [],\n \"key_auths\": [[\"000000000000000000000000000000000000000000000000000\", 1]],\n },\n \"active\": {\n \"weight_threshold\": 1,\n \"account_auths\": [],\n \"key_auths\": [[\"000000000000000000000000000000000000000000000000000\", 1]],\n },\n \"posting\": {\n \"weight_threshold\": 1,\n \"account_auths\": [],\n \"key_auths\": [[\"000000000000000000000000000000000000000000000000000\", 1]],\n },\n \"memo_key\": {\n \"weight_threshold\": 1,\n \"account_auths\": [],\n \"key_auths\": [[\"000000000000000000000000000000000000000000000000000\", 1]],\n },\n \"json_metadata\": \"\"\n }\n]\n\n\nYou can follow this tutorial to see a working example of how to create accounts." + } + + + + + + + , + + "tutorials-recipes-calculate-rc-recipe": { + "id": "tutorials-recipes-calculate-rc-recipe", + "title": "Calculating RC costs", + "category": "tutorials-recipes", + "description": "How to calculate resource credit cost for transactions.", + "type": "", + "url": "/tutorials-recipes/calculate_rc_recipe", + "content": "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.\n\nIntro\n\nRCs 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.\n\nThe 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.\n\nThe 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.\n\nThere are applications available to check an account’s status, like steemd.com, but here we will look at how calculate the values manually.\n\nCalculating available RC\n\nSince 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.\n\n//capture account\nvar _account = await client.database.getAccounts(['username'])\nvar account = _account[0]\nvar props = await client.database.getDynamicGlobalProperties()\nvar CURRENT_UNIX_TIMESTAMP = parseInt((new Date(props.time).getTime() / 1000).toFixed(0))\n//calculate available SP\nvar totalShares = parseFloat(account.vesting_shares) + parseFloat(account.received_vesting_shares) - parseFloat(account.delegated_vesting_shares);\n//determine elapsed time since last RC update\nvar elapsed = CURRENT_UNIX_TIMESTAMP - account.voting_manabar.last_update_time;\nvar maxMana = totalShares * 1000000;\n//calculate current mana for the 5 day period (432000 sec = 5 days)\nvar currentMana = parseFloat(account.voting_manabar.current_mana) + elapsed * maxMana / 432000;\n\nif (currentMana > maxMana) {\n currentMana = maxMana;\n}\n//determine percentage of available mana(RC)\nvar currentManaPerc = currentMana * 100 / maxMana;\n \nconsole.log(currentManaPerc);\n\n\nCalculating transaction cost\n\nA 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.\n\nimport beem\nfrom beem.rc import RC\n\nclient = beem.Steem()\n\nrc = RC(steem_instance=client)\n#beem sets its own rough, default values if you don't pass them in.\nprint(rc.comment()) #(self, tx_size=1000, permlink_length=10, parent_permlink_length=10)\nprint(rc.vote()) #(self, tx_size=210)\nprint(rc.transfer()) #(self, tx_size=290, market_op_count=1)\n\n\nThe 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.\n\nopdata = {\n 'voter': 'steemit',\n 'author': 'r1s2g3',\n 'permlink': 'rc-calculations-according-to-your-need-part-1',\n 'weight': 100\n}\n#create operation to check\nop = beembase.operations.Vote(opdata)\n#check vote transaction size\nvote_tx = rc.get_tx_size(op)\nprint(vote_tx)\n#check vote RC cost\nprint(rc.vote(vote_tx))\n\n\nYou can find the source for beem’s RC class in the beem github repo\nAdditional info can also be found in this article by steem user @holger80\n\nAllocation of RC to blockchain resources\n\nAn 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" + } + + + + + + + , + + "tutorials-recipes-estimate-upvote": { + "id": "tutorials-recipes-estimate-upvote", + "title": "Estimate the value of an upvote", + "category": "tutorials-recipes", + "description": "Calculate the approximate value of an upvote on Steem", + "type": "", + "url": "/tutorials-recipes/estimate_upvote", + "content": "By the end of this recipe you should know how to estimate value of each vote on Steem.\n\nThis recipe will take you through the process of fetching necessary data and formulating estimation.\n\nIntro\n\nCalculating 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.\n\nSteps\n\n\n Get Reward Fund Current reward fund information is crucial part of estimation\n Get Account Steem power and voting power is another important info\n Feed history To get price rate reported by witnesses\n Final calculation Formulate all information we have\n\n\n1. Get Reward Fund\n\nGetting Reward Fund information is simply calling get_reward_fund('post') api call, it will give us reward_balance and recent_claims.\n\nThe response we’re working with will look like:\n\n{\n\t\"id\":0,\n\t\"name\":\"post\",\n\t\"reward_balance\":\"741222.051 STEEM\",\n\t\"recent_claims\":\"457419472820935017\",\n\t\"last_update\":\"2018-05-23T12:08:36\",\n\t\"content_constant\":\"2000000000000\",\n\t\"percent_curation_rewards\":2500,\n\t\"percent_content_rewards\":10000,\n\t\"author_reward_curve\":\"linear\",\n\t\"curation_reward_curve\":\"square_root\"\n}\n\n\n2. Get Account\n\nNext 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.\n\nThe response example will look like:\n\n[\n {\n \"id\": 9660,\n \"name\": \"steemitblog\",\n \"owner\": {\n \"weight_threshold\": 1,\n \"account_auths\": [\n [\n \"ned\",\n 1\n ]\n ],\n \"key_auths\": [\n [\n \"STM65wH1LZ7BfSHcK69SShnqCAH5xdoSZpGkUjmzHJ5GCuxEK9V5G\",\n 1\n ]\n ]\n },\n \"active\": {\n \"weight_threshold\": 1,\n \"account_auths\": [],\n \"key_auths\": [\n [\n \"STM65wH1LZ7BfSHcK69SShnqCAH5xdoSZpGkUjmzHJ5GCuxEK9V5G\",\n 1\n ]\n ]\n },\n \"posting\": {\n \"weight_threshold\": 1,\n \"account_auths\": [\n [\n \"ned\",\n 1\n ]\n ],\n \"key_auths\": [\n [\n \"STM4yfYEjUoey4PLrKhnKFo1XKQZtZ77fWLnbGTr2mAUaSt2Sx9W4\",\n 1\n ],\n [\n \"STM5FeHFtL8J453DUi98LKwkqXBH5iwxf9xCqYs6QwPibPru3RNq3\",\n 1\n ],\n [\n \"STM5VwLXkNQf17sQ2XuxScdxruwBy1jak2mDxCjmyfYMNhm1WzPzN\",\n 1\n ],\n [\n \"STM5ke2kzgwBmysSqCNM6zRABi8SNpaJEtnFXuTtRcU3Uvf47481z\",\n 1\n ]\n ]\n },\n \"memo_key\": \"STM5FeHFtL8J453DUi98LKwkqXBH5iwxf9xCqYs6QwPibPru3RNq3\",\n \"json_metadata\": \"\",\n \"proxy\": \"\",\n \"last_owner_update\": \"2017-03-17T18:19:18\",\n \"last_account_update\": \"2017-03-17T18:19:18\",\n \"created\": \"2016-05-24T18:54:24\",\n \"mined\": false,\n \"recovery_account\": \"steem\",\n \"last_account_recovery\": \"2016-07-19T19:48:54\",\n \"reset_account\": \"null\",\n \"comment_count\": 0,\n \"lifetime_vote_count\": 0,\n \"post_count\": 154,\n \"can_vote\": true,\n \"voting_power\": 9800,\n \"last_vote_time\": \"2018-05-22T20:10:45\",\n \"balance\": \"810.371 STEEM\",\n \"savings_balance\": \"0.000 STEEM\",\n \"sbd_balance\": \"4613.426 SBD\",\n \"sbd_seconds\": \"10828300402329\",\n \"sbd_seconds_last_update\": \"2018-05-22T22:34:24\",\n \"sbd_last_interest_payment\": \"2018-04-25T18:26:15\",\n \"savings_sbd_balance\": \"0.000 SBD\",\n \"savings_sbd_seconds\": \"0\",\n \"savings_sbd_seconds_last_update\": \"1970-01-01T00:00:00\",\n \"savings_sbd_last_interest_payment\": \"1970-01-01T00:00:00\",\n \"savings_withdraw_requests\": 0,\n \"reward_sbd_balance\": \"79.490 SBD\",\n \"reward_steem_balance\": \"0.000 STEEM\",\n \"reward_vesting_balance\": \"608341.169185 VESTS\",\n \"reward_vesting_steem\": \"293.101 STEEM\",\n \"vesting_shares\": \"93540695.469156 VESTS\",\n \"delegated_vesting_shares\": \"0.000000 VESTS\",\n \"received_vesting_shares\": \"0.000000 VESTS\",\n \"vesting_withdraw_rate\": \"0.000000 VESTS\",\n \"next_vesting_withdrawal\": \"1969-12-31T23:59:59\",\n \"withdrawn\": 0,\n \"to_withdraw\": 0,\n \"withdraw_routes\": 0,\n \"curation_rewards\": 10288,\n \"posting_rewards\": 38917298,\n \"proxied_vsf_votes\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"witnesses_voted_for\": 0,\n \"last_post\": \"2018-05-22T18:59:33\",\n \"last_root_post\": \"2018-05-22T18:59:33\",\n \"average_bandwidth\": \"34722906781\",\n \"lifetime_bandwidth\": \"656153000000\",\n \"last_bandwidth_update\": \"2018-05-22T20:10:45\",\n \"average_market_bandwidth\": 1170000000,\n \"lifetime_market_bandwidth\": 1170000000,\n \"last_market_bandwidth_update\": \"2016-07-27T15:10:09\",\n \"vesting_balance\": \"0.000 STEEM\",\n \"reputation\": \"146151592482665\",\n \"transfer_history\": [],\n \"market_history\": [],\n \"post_history\": [],\n \"vote_history\": [],\n \"other_history\": [],\n \"witness_votes\": [],\n \"tags_usage\": [],\n \"guest_bloggers\": []\n }\n]\n\n\n3. Feed history\n\nLast thing we will need is rate of the get_current_median_history_price, returns median price rate bucket with base element.\n\nThe response example will look like:\n\n{\n \"base\": \"3.029 SBD\",\n \"quote\": \"1.000 STEEM\"\n}\n\n\n4. Final calculation\n\nAfter getting all these variables, all we have to do is to calculate estimation\n\ntotal_vests = vesting_shares + received_vesting_shares - delegated_vesting_shares\nfinal_vest = total_vests * 1e6\npower = (voting_power * weight / 10000) / 50\nrshares = power * final_vest / 10000\nestimate = rshares / recent_claims * reward_balance * sbd_median_price\n\n\nThat’s all there is to it." + } + + + + + + + , + + "tutorials-recipes-forum-market-bandwidth": { + "id": "tutorials-recipes-forum-market-bandwidth", + "title": "Forum/Market Bandwidth", + "category": "tutorials-recipes", + "description": "How to interpret raw bandwidth data.", + "type": "", + "url": "/tutorials-recipes/forum-market-bandwidth", + "content": "Intro\n\n\n 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\n\n\nWe’re going over the various API calls needed to determine the remaining bandwidth available to a particular account. As mentioned in the STEEM Whitepaper:\n\n\n Bandwidth used by an individual user should be measured over a suitably long period of time to allow that\nuser to time-shift their usage. Users tend to login, do many things at once, then logout. This means that\ntheir bandwidth over a short period of time may appear much higher than if viewed over a longer period of\ntime. If the time window is stretched too far, then the reserve ratio will not adjust fast enough to respond\nto short-term surges; conversely, if the window is too short then clustering usage will have too big of an\nimpact on normal users.\n\n\nBandwidth is specific to each account and depends on account activity.\n\nSections\n\n\n Getting Account Bandwidth\n Dynamic Global Properties\n Account STEEM Power\n Calculate\n\n\nGetting Account Bandwidth\n\ncurl -s --data '{\n \"jsonrpc\":\"2.0\",\n \"method\":\"condenser_api.get_account_bandwidth\",\n \"params\":[\n \"cheetah\",\n \"forum\"\n ],\n \"id\":1\n}' https://api.steemit.com\n\n\n{\n \"jsonrpc\":\"2.0\",\n \"result\":{\n \"id\":20846,\n \"account\":\"cheetah\",\n \"type\":\"forum\",\n \"average_bandwidth\":\"7525646416619\",\n \"lifetime_bandwidth\":\"386010589000000\",\n \"last_bandwidth_update\":\"2018-07-18T16:37:54\"\n },\n \"id\":1\n}\n\n\nIn this example, we got forum (blogging) average bandwidth of 7,525,646,416,619 with a lifetime bandwidth of 386,010,589,000,000.\n\nNote, 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.\n\nDynamic Global Properties\n\nTo do the calculation, we need max_virtual_bandwidth and total_vesting_shares from the global properties, e.g.:\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"condenser_api.get_dynamic_global_properties\", \"params\":[], \"id\":1}' https://api.steemit.com\n\n\n{\n \"id\":1,\n \"jsonrpc\":\"2.0\",\n \"result\":{\n \"head_block_number\":24264289,\n \"head_block_id\":\"01723e6156ad44ac7bf3028a53a7ac642084cb39\",\n \"time\":\"2018-07-17T20:25:27\",\n \"current_witness\":\"followbtcnews\",\n \"total_pow\":514415,\n \"num_pow_witnesses\":172,\n \"virtual_supply\":\"283443693.176 STEEM\",\n \"current_supply\":\"271786073.683 STEEM\",\n \"confidential_supply\":\"0.000 STEEM\",\n \"current_sbd_supply\":\"15504633.926 SBD\",\n \"confidential_sbd_supply\":\"0.000 SBD\",\n \"total_vesting_fund_steem\":\"193007548.472 STEEM\",\n \"total_vesting_shares\":\"391468555319.000697 VESTS\",\n \"total_reward_fund_steem\":\"0.000 STEEM\",\n \"total_reward_shares2\":\"0\",\n \"pending_rewarded_vesting_shares\":\"382967391.274340 VESTS\",\n \"pending_rewarded_vesting_steem\":\"187173.234 STEEM\",\n \"sbd_interest_rate\":0,\n \"sbd_print_rate\":2966,\n \"maximum_block_size\":65536,\n \"current_aslot\":24341309,\n \"recent_slots_filled\":\"340282366920938463463374607431768211455\",\n \"participation_count\":128,\n \"last_irreversible_block_num\":24264271,\n \"vote_power_reserve_rate\":10,\n \"average_block_size\":13436,\n \"current_reserve_ratio\":200000000,\n \"max_virtual_bandwidth\":\"264241152000000000000\"\n }\n}\n\n\nAccount STEEM Power\n\nWe also need to know how much the account has in STEEM Power from vesting_shares and received_vesting_shares:\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"condenser_api.get_accounts\", \"params\":[[\"cheetah\"]], \"id\":1}' https://api.steemit.com\n\n\n{\n \"jsonrpc\":\"2.0\",\n \"result\":[\n {\n \"id\":25796,\n \"name\":\"cheetah\",\n \"owner\":{\n \"weight_threshold\":1,\n \"account_auths\":[],\n \"key_auths\":[[\"STM7yFmwPSKUP7FCV7Ut9Aev5cwfDzJZixcreS1U3ha36XG47ZpqT\", 1]]\n },\n \"active\":{\n \"weight_threshold\":1,\n \"account_auths\":[],\n \"key_auths\":[[\"STM7yFmwPSKUP7FCV7Ut9Aev5cwfDzJZixcreS1U3ha36XG47ZpqT\", 1]]\n },\n \"posting\":{\n \"weight_threshold\":1,\n \"account_auths\":[[\"anyx\", 100]],\n \"key_auths\":[[\"STM5bicRFWhpxnwBymo2HHJv6mFLiaP6AwVVsFEnnVjVcqbvqzvFt\", 100], [\"STM7yFmwPSKUP7FCV7Ut9Aev5cwfDzJZixcreS1U3ha36XG47ZpqT\", 100], [\"STM8Jn23vNmBzVuDAgQeZzzR17LmruENmmZmv1ra53tbsBgYbJFwk\", 100]]\n },\n \"memo_key\":\"STM7yFmwPSKUP7FCV7Ut9Aev5cwfDzJZixcreS1U3ha36XG47ZpqT\",\n \"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\\\"}}\",\n \"proxy\":\"\",\n \"last_owner_update\":\"1970-01-01T00:00:00\",\n \"last_account_update\":\"2017-06-13T00:14:00\",\n \"created\":\"2016-07-17T08:47:18\",\n \"mined\":true,\n \"recovery_account\":\"steem\",\n \"last_account_recovery\":\"1970-01-01T00:00:00\",\n \"reset_account\":\"null\",\n \"comment_count\":0,\n \"lifetime_vote_count\":0,\n \"post_count\":517808,\n \"can_vote\":true,\n \"voting_power\":1249,\n \"last_vote_time\":\"2018-07-18T16:39:21\",\n \"balance\":\"118.463 STEEM\",\n \"savings_balance\":\"0.000 STEEM\",\n \"sbd_balance\":\"67.717 SBD\",\n \"sbd_seconds\":\"127094582318\",\n \"sbd_seconds_last_update\":\"2018-07-18T14:13:15\",\n \"sbd_last_interest_payment\":\"2018-06-20T12:01:15\",\n \"savings_sbd_balance\":\"0.000 SBD\",\n \"savings_sbd_seconds\":\"0\",\n \"savings_sbd_seconds_last_update\":\"1970-01-01T00:00:00\",\n \"savings_sbd_last_interest_payment\":\"1970-01-01T00:00:00\",\n \"savings_withdraw_requests\":0,\n \"reward_sbd_balance\":\"0.005 SBD\",\n \"reward_steem_balance\":\"0.009 STEEM\",\n \"reward_vesting_balance\":\"26.366463 VESTS\",\n \"reward_vesting_steem\":\"0.013 STEEM\",\n \"vesting_shares\":\"4770940.577823 VESTS\",\n \"delegated_vesting_shares\":\"0.000000 VESTS\",\n \"received_vesting_shares\":\"16020356.484882 VESTS\",\n \"vesting_withdraw_rate\":\"347124.891306 VESTS\",\n \"next_vesting_withdrawal\":\"2018-07-21T02:27:09\",\n \"withdrawn\":\"1388499565224\",\n \"to_withdraw\":\"4512623586985\",\n \"withdraw_routes\":1,\n \"curation_rewards\":170083,\n \"posting_rewards\":37433355,\n \"proxied_vsf_votes\":[\"50341599736964\", \"20169963876698\", 0, 0],\n \"witnesses_voted_for\":23,\n \"last_post\":\"2018-07-18T16:39:24\",\n \"last_root_post\":\"2018-07-18T07:00:45\",\n \"average_bandwidth\":\"7525467544963\",\n \"lifetime_bandwidth\":\"386011530000000\",\n \"last_bandwidth_update\":\"2018-07-18T16:39:24\",\n \"average_market_bandwidth\":2406616155,\n \"lifetime_market_bandwidth\":\"224370000000\",\n \"last_market_bandwidth_update\":\"2018-07-12T04:57:36\",\n \"vesting_balance\":\"0.000 STEEM\",\n \"reputation\":\"305786119478594\",\n \"transfer_history\":[],\n \"market_history\":[],\n \"post_history\":[],\n \"vote_history\":[],\n \"other_history\":[],\n \"witness_votes\":[\n \"anyx\",\n \"arcange\",\n \"ats-witness\",\n \"ausbitbank\",\n \"bitcoiner\",\n \"blockchained\",\n \"chitty\",\n \"drakos\",\n \"followbtcnews\",\n \"fubar-bdhr\",\n \"guiltyparties\",\n \"liondani\",\n \"lukestokes.mhth\",\n \"neoxian\",\n \"netuoso\",\n \"noisy.witness\",\n \"patrice\",\n \"pfunk\",\n \"pjau\",\n \"teamsteem\",\n \"thecryptodrive\",\n \"themarkymark\",\n \"timcliff\"\n ],\n \"tags_usage\":[],\n \"guest_bloggers\":[]\n }\n ],\n \"id\":1\n}\n\n\nCalculate\n\nNow, we can derive bandwidth_allocated:\n\nbandwidth_allocated = max_virtual_bandwidth * (vesting_shares + received_vesting_shares) / total_vesting_shares\n\nbandwidth_allocated = bandwidth_allocated / 1000000\n\nIn our example, bandwidth_allocated = 14034118993.\n\nNow that we have both bandwidth_allocated and average_bandwidth, we can determine the percentages.\n\nFirst, we need average_bandwidth on the same scale as bandwidth_allocated:\n\naverage_bandwidth = average_bandwidth / 1000000\n\nThen we can get the percentages:\n\nbandwidth_used = 100 * average_bandwidth / bandwidth_allocated\n\nbandwidth_remaining = 100 - (100 * average_bandwidth / bandwidth_allocated)\n\nWe can see that cheetah has used 0.053 % bandwidth and has 99.946 % remaining as of last_bandwidth_update." + } + + + + + + + , + + "tutorials-recipes-jussi-multiplexer": { + "id": "tutorials-recipes-jussi-multiplexer", + "title": "Using jussi as a Multiplexer", + "category": "tutorials-recipes", + "description": "Optimize your local applications with jussi", + "type": "", + "url": "/tutorials-recipes/jussi-multiplexer", + "content": "By the end of this recipe you should know how to install jussi on your local subnet to take advantage of its features.\n\nThis recipe will take you through the process of setting up jussi for a small infrastructure like a home network.\n\nIntro\n\nWhat 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.\n\nDeploying 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.\n\n\n \n\n\nSteps\n\n\n Setting Up Docker In order to run jussi, docker is recommended\n Install jussi Clone jussi from the repository and build\n Configure Your Apps Point all of your applications to this node\n\n\n1. Setting Up Docker \n\nAlthough it’s possible to set up jussi to run natively without virtualization, docker is recommended. Setting up docker depends on your operating system:\n\n\n Docker for Linux\n Docker for macOS\n Docker for Windows\n\n\n2. Install jussi \n\ngit clone https://github.com/steemit/jussi.git\ncd jussi\n\n\nEdit the file DEV_config.json and change all:\n\nhttps://steemd.steemitdev.com\n\n… to …\n\nhttps://api.steemit.com\n\nAlso consider adding the retries element to your DEV_config.json.\n\nThen build and run:\n\ndocker build -t=\"$USER/jussi:$(git rev-parse --abbrev-ref HEAD)\" .\ndocker run -itp 9000:8080 \"$USER/jussi:$(git rev-parse --abbrev-ref HEAD)\"\n\n\n3. Configure Your Apps \n\nNow, you can use your new jussi node as if it’s a full node running locally. For example:\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"condenser_api.get_block\", \"params\":[8675309], \"id\":1}' http://localhost:9000\n\n\nIn 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.\n\nOnce 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.\n\nTroubleshooting / Updating\n\nError: invalid argument \"/jussi:master\" for t=/jussi:master: invalid reference format\n\nSolution:\n\nYou’re probably trying to run on a raspberry pi. Just replace $USER in the command with the current user.\n\n\n\nIf you would like to update jussi to the latest version, here’s a quick way:\n\ngit stash && git pull && git stash pop\n\n\nIf 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." + } + + + + + + + , + + "tutorials-recipes-plugin-and-api-list": { + "id": "tutorials-recipes-plugin-and-api-list", + "title": "Enable SteemD Node APIs", + "category": "tutorials-recipes", + "description": "Run a SteemD Node with your preferred APIs", + "type": "", + "url": "/tutorials-recipes/plugin_and_api_list", + "content": "This is a list of the plugins, and their associated dependencies, required to enable specific apis.\n\nWhen setting up the config file steemd will run the chain, p2p, and webserver plugins regardless of other dependencies\n\nAPI’s with their respective plugin dependencies\n\naccount_by_key_API\n\n <steem/plugins/account_by_key/account_by_key_plugin.hpp>\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n https://github.com/steemit/steem/blob/master/libraries/plugins/apis/account_by_key_api/include/steem/plugins/account_by_key_api\n\n\naccount_history_API\n\n <steem/plugins/account_history/account_history_plugin.hpp>\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n https://github.com/steemit/steem/blob/master/libraries/plugins/apis/account_history_api/include/steem/plugins/account_history_apiaccount_history_api\n\n\nblock_api\n\n <steem/plugins/chain/chain_plugin.hpp>\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n https://github.com/steemit/steem/blob/master/libraries/plugins/apis/block_api/include/steem/plugins/block_api\n\n\nchain_api\n\n <steem/plugins/chain/chain_plugin.hpp>\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n https://github.com/steemit/steem/tree/master/libraries/plugins/apis/chain_api/include/steem/plugins/chain_api\n\n\ncondenser_api\n\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n <steem/plugins/database_api/database_api_plugin.hpp>\n <steem/plugins/block_api/block_api_plugin.hpp>\n https://github.com/steemit/steem/tree/master/libraries/plugins/apis/condenser_api/include/steem/plugins/condenser_api\n\n\ndatabase_api\n\n <steem/plugins/chain/chain_plugin.hpp>\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n https://github.com/steemit/steem/tree/master/libraries/plugins/apis/database_api/include/steem/plugins/database_api\n\n\ndebug_node_api\n\n <steem/plugins/debug_node/debug_node_plugin.hpp>\n <steem/plugins/database_api/database_api_objects.hpp>\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n https://github.com/steemit/steem/tree/master/libraries/plugins/apis/debug_node_api/include/steem/plugins/debug_node_api\n\n\nfollow_api\n\n <steem/plugins/follow/follow_plugin.hpp>\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n <steem/plugins/json_rpc/utility.hpp>\n <steem/plugins/database_api/database_api_objects.hpp>\n <steem/plugins/reputation_api/reputation_api.hpp>\n https://github.com/steemit/steem/tree/master/libraries/plugins/apis/follow_api/include/steem/plugins/follow_api\n\n\nmarket_history_api\n\n <steem/plugins/market_history/market_history_plugin.hpp>\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n https://github.com/steemit/steem/tree/master/libraries/plugins/apis/market_history_api/include/steem/plugins/market_history_api\n\n\nnetwork_broadcast_api\n\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n <steem/plugins/chain/chain_plugin.hpp>\n <steem/plugins/p2p/p2p_plugin.hpp>\n https://github.com/steemit/steem/tree/master/libraries/plugins/apis/network_broadcast_api/include/steem/plugins/network_broadcast_apinetwork_broadcast_api\n\n\nrc_api\n\n <steem/plugins/rc/rc_plugin.hpp>\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n https://github.com/steemit/steem/tree/master/libraries/plugins/apis/rc_api/include/steem/plugins/rc_api\n\n\nreputation_api\n\n <steem/plugins/reputation/reputation_plugin.hpp>\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n <steem/plugins/database_api/database_api_objects.hpp>\n https://github.com/steemit/steem/tree/master/libraries/plugins/apis/reputation_api/include/steem/plugins/reputation_api\n\n\ntags_api\n\n <steem/plugins/tags/tags_plugin.hpp>\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n <steem/plugins/database_api/database_api_objects.hpp>\n https://github.com/steemit/steem/tree/master/libraries/plugins/apis/tags_api/include/steem/plugins/tags_api\n\n\ntest_api\n\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n <steem/plugins/json_rpc/utility.hpp>\n https://github.com/steemit/steem/tree/master/libraries/plugins/apis/test_api/include/steem/plugins/test_api\n\n\nwitness_api\n\n <steem/plugins/witness/witness_plugin.hpp>\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n https://github.com/steemit/steem/tree/master/libraries/plugins/apis/witness_api/include/steem/plugins/witness_api\n\n\nAvailable plugins with any other plugin dependencies listed\n\naccount_by_key_plugin\n\ndependency plugins\n\n <steem/plugins/chain/chain_plugin.hpp>\n\n\ndefinition\n\n Used to lookup account information based on a key\n\n\nadditional account_by_key plugin:\n\n account_by_key_objects\n\n\naccount_history_plugin\n\ndependency plugins\n\n <steem/plugins/chain/chain_plugin.hpp>\n\n\ndefinition\n\n Used to lookup account history information\n\n\naccount_history_rocksdb_plugin\n\ndependency plugins\n\n <steem/plugins/account_history_rocksdb/account_history_rocksdb_objects.hpp>\n <steem/plugins/chain/chain_plugin.hpp>\n\n\ndefinition\n\n More efficient way of storing and reading information from the database\n\n\nadditional account_history_rocksdb plugin:\n\n account_history_rocksdb_objects\n\n\nblock_data_export_plugin\n\ndependency plugins\n\n <steem/plugins/chain/chain_plugin.hpp>\n\n\ndefinition\n\n create export file containing block data\n\n\nadditional block_data_export plugin:\n\n exportable_block_data\n\n\nblock_log_info_plugin\n\ndependency plugins\n\n <steem/plugins/chain/chain_plugin.hpp>\n\n\ndefinition\n\n create a block log file with block number, size and hash\nadditional block_log_info plugin:\n block_log_info_objects\n\n\nchain_plugin\n\ndependency plugins\n\n none\n\n\ndefinition\n\n Connection to the blockchain\n\n\ndebug_node_plugin\ndependency plugins\n\n <steem/plugins/chain/chain_plugin.hpp>\ndefinition\n 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.\n This plugin allows all sorts of creative “what-if” experiments with the chain.\n https://github.com/steemit/steem/blob/master/doc/debug_node_plugin.md\n\n\nfollow_plugin\n\ndependency plugins\n\n <steem/plugins/follow/follow_operations.hpp>\n <steem/plugins/chain/chain_plugin.hpp>\n\n\ndefinition\n\n Used to lookup information related to reputation and account follow operations\n\n\nadditional follow plugins:\n\n follow_objects\n follow_operations\n inc_performance\n\n\njson_rpc_plugin\n\ndependency plugins\n\n none\n\n\ndefinition\n\n This plugin holds bindings for all APIs and their methods and can dispatch JSONRPC requests to the appropriate API.\n For a plugin to use the API Register, it needs to specify the register as a dependency.\n Then, during initializtion, register itself using add_api.\n\n\nadditional json_rpc plugin:\n utility\n\nmarket_history_plugin\n\ndependency plugins\n\n <steem/plugins/chain/chain_plugin.hpp>\n\n\ndefinition\n\n 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.\n\n\np2p_plugin\n\ndependency plugins\n\n <steem/plugins/chain/chain_plugin.hpp>\n\n\ndefinition\n\n allowes peer-to-peer communication\n\n\nadditional p2p plugin:\n\n p2p_default_seeds\n\n\nrc_plugin\n\ndependency plugins\n\n <steem/plugins/chain/chain_plugin.hpp>\n\n\ndefinition\n\n Managing of resources - curation rewards, vesting shares, etc.\n\n\nadditional rc plugins:\n\n rc_curve\n \n <steem/plugins/rc/rc_utility.hpp>\n \n \n rc_export_object\n \n <steem/plugins/block_data_export/exportable_block_data.hpp>\n <steem/plugins/rc/resource_count.hpp>\n \n \n rc_objects\n \n <steem/plugins/rc/rc_utility.hpp>\n <steem/plugins/rc/resource_count.hpp>\n \n \n rc_utility\n\n\nreputation_plugin\n\ndependency plugins\n\n <steem/plugins/chain/chain_plugin.hpp>\n\n\ndefinition\n\n manage user steemit user reputation (relevant to voting on content)\n\n\nadditional reputation plugin:\n\n reputation_objects\n\n\nsmt_test_plugin\ndependency plugins\n\n <steem/plugins/chain/chain_plugin.hpp>\n\n\ndefinition\n\nadditional smt_test plugin:\n\n smt_test_objects\n\n\nstats_export_plugin\ndependency plugins\n\n <steem/plugins/chain/chain_plugin.hpp>\n <steem/plugins/block_data_export/block_data_export_plugin.hpp>\n\n\ndefinition\n\nstatsd_plugin\ndependency plugins\n\n none\n\n\ndefinition\n\n statistical information logging\n\n\nadditional statsd plugin:\n\n utility\n \n <steem/plugins/statsd/statsd_plugin.hpp>\n \n \n\n\ntags_plugin\ndependency plugins\n\n <steem/plugins/chain/chain_plugin.hpp>\n\n\ndefinition\n\n Used to lookup information about tags, posts, and discussions as well as votes.\n\n\nwebserver_plugin\ndependency plugins\n\n <steem/plugins/json_rpc/json_rpc_plugin.hpp>\n\n\ndefinition\n\n webserver user interface\n\n\nwitness_plugin\ndependency plugins\n\n <steem/plugins/chain/chain_plugin.hpp>\n <steem/plugins/p2p/p2p_plugin.hpp>\n <steem/plugins/rc/rc_plugin.hpp>\n\n\ndefinition\n\n The witness plugin contains all of the bandwidth logic. Can access the available bandwidth of an account and current reserve ratio.\n\n\nadditional witness plugins:\n\n witness_objects\n witness_export_objects\n <steem/plugins/block_data_export/exportable_block_data.hpp>\n <steem/plugins/witness/witness_objects.hpp" + } + + + + + + + , + + "tutorials-recipes-understanding-configuration-values": { + "id": "tutorials-recipes-understanding-configuration-values", + "title": "Understanding Configuration Values", + "category": "tutorials-recipes", + "description": "Low level blockchain constants", + "type": "", + "url": "/tutorials-recipes/understanding-configuration-values", + "content": "Intro\n\nThese 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).\n\nSee: config.hpp\n\nUsually, 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.\n\nSections\n\n\n Fields\n \n IS_TEST_NET\n STEEM_ENABLE_SMT\n STEEM_INITIAL_VOTE_POWER_RATE\n STEEM_REDUCED_VOTE_POWER_RATE\n STEEM_ADDRESS_PREFIX\n STEEM_BLOCK_INTERVAL\n STEEM_CASHOUT_WINDOW_SECONDS\n STEEM_CHAIN_ID\n STEEM_CHAIN_ID_NAME\n STEEM_CREATE_ACCOUNT_DELEGATION_RATIO\n STEEM_CREATE_ACCOUNT_DELEGATION_TIME\n STEEM_FEED_HISTORY_WINDOW\n STEEM_GENESIS_TIME\n STEEM_HARDFORK_REQUIRED_WITNESSES\n STEEM_INFLATION_NARROWING_PERIOD\n STEEM_MAX_ACCOUNT_NAME_LENGTH\n STEEM_MAX_ACCOUNT_WITNESS_VOTES\n STEEM_MAX_WITNESSES\n STEEM_MAX_PERMLINK_LENGTH\n STEEM_MAX_WITNESS_URL_LENGTH\n STEEM_MIN_REPLY_INTERVAL\n STEEM_MIN_REPLY_INTERVAL_HF20\n STEEM_MIN_ROOT_COMMENT_INTERVAL\n STEEM_MIN_PAYOUT_SBD\n STEEM_NULL_ACCOUNT\n STEEM_REVERSE_AUCTION_WINDOW_SECONDS\n STEEM_SOFT_MAX_COMMENT_DEPTH\n STEEM_SAVINGS_WITHDRAW_TIME\n STEEM_UPVOTE_LOCKOUT_HF17\n STEEM_VESTING_WITHDRAW_INTERVALS\n \n \n Not Covered\n Example Method Call\n Example Output\n\n\nIS_TEST_NET\n\nIndicates if this node is running on testnet. See: Steem Testnet\n\nSTEEM_ENABLE_SMT\n\nIndicates if Smart Media Tokens have been enabled (future hardfork).\n\nSTEEM_INITIAL_VOTE_POWER_RATE\n\nThe 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).\n\nSTEEM_REDUCED_VOTE_POWER_RATE\n\nThe rate used since HF19. The number of votes an account may cast per day before voting power is impacted (10 votes per day).\n\nSTEEM_ADDRESS_PREFIX\n\nAddress prefix used on mainnet is STM and on testnet is TST. See: Steem Testnet\n\nSTEEM_BLOCK_INTERVAL\n\nBlock 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.\n\nSTEEM_CASHOUT_WINDOW_SECONDS\n\nThis value was simply set to 7 days, since HF17.\n\nPrior 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.\n\nNote, on testnet, this is typically much shorter: 1 hour. See: Steem Testnet\n\nSTEEM_CHAIN_ID\n\nThe 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\n\nSTEEM_CHAIN_ID_NAME\n\nTyically used to automatically get a unique chain id for a testnet. See: Steem Testnet\n\nSTEEM_CREATE_ACCOUNT_DELEGATION_RATIO\n\nThis ratio is set to 5 and is used to determine the cost of an account created with delegation.\n\nAs 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).\n\nThis minimum STEEM ensures that those accounts can transact if the delegation is removed.\n\nSTEEM_CREATE_ACCOUNT_DELEGATION_TIME\n\nThere 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.\n\nNote that delegation can be revoked before 30 days have elapsed from the creation date, but stays in limbo.\n\nSTEEM_FEED_HISTORY_WINDOW\n\nPrice feed history window, which is 3.5 days since HF16.\n\nSTEEM_GENESIS_TIME\n\nScheduled 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\n\nSTEEM_HARDFORK_REQUIRED_WITNESSES\n\nThe minimum number of Delegated Proof of Stake witnesses required for hardfork. This guarantees 75% participation on all subsequent rounds.\n\nBy 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\n\nSTEEM_INFLATION_NARROWING_PERIOD\n\nInflation 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.\n\n\n \n \n Year\n Supply\n Inflation\n New Supply\n  \n Year\n Supply\n Inflation\n New Supply\n \n \n \n \n 2016\n 250,000,000\n 9.50%\n 23,750,000\n  \n 2031\n 646,511,386\n 3.19%\n 20,613,886\n \n \n 2017\n 273,750,000\n 9.08%\n 24,854,398\n  \n 2032\n 667,125,272\n 2.77%\n 18,464,106\n \n \n 2018\n 298,604,398\n 8.66%\n 25,854,554\n  \n 2033\n 685,589,378\n 2.35%\n 16,090,399\n \n \n 2019\n 324,458,952\n 8.24%\n 26,727,942\n  \n 2034\n 701,679,777\n 1.93%\n 13,515,587\n \n \n 2020\n 351,186,894\n 7.82%\n 27,452,027\n  \n 2035\n 715,195,364\n 1.51%\n 10,766,608\n \n \n 2021\n 378,638,921\n 7.40%\n 28,004,740\n  \n 2036\n 725,961,973\n 1.08%\n 7,874,074\n \n \n 2022\n 406,643,661\n 6.98%\n 28,364,989\n  \n 2037\n 733,836,047\n 0.95%\n 6,971,442\n \n \n 2023\n 435,008,650\n 6.55%\n 28,513,181\n  \n 2038\n 740,807,489\n 0.95%\n 7,037,671\n \n \n 2024\n 463,521,832\n 6.13%\n 28,431,762\n  \n 2039\n 747,845,160\n 0.95%\n 7,104,529\n \n \n 2025\n 491,953,593\n 5.71%\n 28,105,742\n  \n 2040\n 754,949,689\n 0.95%\n 7,172,022\n \n \n 2026\n 520,059,335\n 5.29%\n 27,523,204\n  \n 2041\n 762,121,711\n 0.95%\n 7,240,156\n \n \n 2027\n 547,582,539\n 4.87%\n 26,675,768\n  \n 2042\n 769,361,868\n 0.95%\n 7,308,938\n \n \n 2028\n 574,258,308\n 4.45%\n 25,558,997\n  \n 2043\n 776,670,805\n 0.95%\n 7,378,373\n \n \n 2029\n 599,817,304\n 4.03%\n 24,172,733\n  \n 2044\n 784,049,178\n 0.95%\n 7,448,467\n \n \n 2030\n 623,990,038\n 3.61%\n 22,521,348\n  \n 2045\n 791,497,645\n 0.95%\n 7,519,228\n \n \n\n\nSTEEM_MAX_ACCOUNT_NAME_LENGTH\n\nNames 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:\n\n\n Each label is three characters or more\n Each label begins with a letter\n Each label ends with a letter or digit\n Each label contains only letters, digits or hyphens\n\n\nIn addition we require the following:\n\n\n All letters are lowercase\n Length is between (inclusive) STEEM_MIN_ACCOUNT_NAME_LENGTH (3 characters) and STEEM_MAX_ACCOUNT_NAME_LENGTH (16 characters)\n\n\nSTEEM_MAX_ACCOUNT_WITNESS_VOTES\n\nEach account may cast up to 30 witness votes.\n\nSTEEM_MAX_WITNESSES\n\nThis value is set to 21, which means there are 21 witnesses cycling to produce blocks.\n\nEvery 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.\n\nSTEEM_MAX_PERMLINK_LENGTH\n\nA permlink is a unique string identifier for a post/comment, linked to the author of the post/comment. It must not exceed 256 characters.\n\nSTEEM_MAX_WITNESS_URL_LENGTH\n\nWitnesses may provide a URL in their witness proposal. It must not exceed 2,048 characters.\n\nSTEEM_MIN_REPLY_INTERVAL\n\nPrior to HF20, comments (replies) could only be broadcasted once every 20 seconds, per account.\n\nSTEEM_MIN_REPLY_INTERVAL_HF20\n\nIn HF20, comments (replies) can be broadcasted once every 3 seconds, per account (one comment per account per block). See: #2019\n\nSTEEM_MIN_ROOT_COMMENT_INTERVAL\n\nPosts (root comments) can only be broadcasted once every 5 minutes, per account.\n\nSTEEM_MIN_PAYOUT_SBD\n\nRewards of less than 0.020 SBD are considered “dust” and will not receive payout.\n\nSTEEM_NULL_ACCOUNT\n\nThis defines the null account used by the blockchain as the canonical account designated to burn assets.\n\nThe blockchain checks all asset types transferred to this account, thus, even reward balances and VESTS are burned. See: operation_time_tests.cpp\n\nSTEEM_REVERSE_AUCTION_WINDOW_SECONDS\n\nPrior to HF6, there was no reverse auction logic. From HF6 to HF19, the reverse auction window is 30 minutes.\n\nIn HF20, the reverse action is being reduced to 15 minutes. See: #1874, #1878\n\nSTEEM_SOFT_MAX_COMMENT_DEPTH\n\nA comment is nested at a maximum depth of 255. As a soft limit, it is enforced by the witness_plugin. See: witness_plugin.cpp\n\nPrior to HF17, the maximum comment depth was 6. See: #767\n\nSTEEM_SAVINGS_WITHDRAW_TIME\n\nThis 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.\n\nSTEEM_UPVOTE_LOCKOUT_HF17\n\nAccounts may not increase payout within last 12 hours before payout, since HF17.\n\nSTEEM_VESTING_WITHDRAW_INTERVALS\n\nSets the power-down rate, which is fulfilled once a week over 13 weeks.\n\nPrior to HF16, this value was 104 weeks.\n\nNot Covered\n\nFields not covered in this recipe are:\n\n\n SBD_SYMBOL\n STEEM_100_PERCENT\n STEEM_1_PERCENT\n STEEM_ACCOUNT_RECOVERY_REQUEST_EXPIRATION_PERIOD\n STEEM_ACTIVE_CHALLENGE_COOLDOWN\n STEEM_ACTIVE_CHALLENGE_FEE\n STEEM_APR_PERCENT_MULTIPLY_PER_BLOCK\n STEEM_APR_PERCENT_MULTIPLY_PER_HOUR\n STEEM_APR_PERCENT_MULTIPLY_PER_ROUND\n STEEM_APR_PERCENT_SHIFT_PER_BLOCK\n STEEM_APR_PERCENT_SHIFT_PER_HOUR\n STEEM_APR_PERCENT_SHIFT_PER_ROUND\n STEEM_BANDWIDTH_AVERAGE_WINDOW_SECONDS\n STEEM_BANDWIDTH_PRECISION\n STEEM_BLOCKCHAIN_PRECISION\n STEEM_BLOCKCHAIN_PRECISION_DIGITS\n STEEM_BLOCKCHAIN_HARDFORK_VERSION\n STEEM_BLOCKCHAIN_VERSION\n STEEM_BLOCKS_PER_DAY\n STEEM_BLOCKS_PER_HOUR\n STEEM_BLOCKS_PER_YEAR\n STEEM_CASHOUT_WINDOW_SECONDS_PRE_HF12\n STEEM_CASHOUT_WINDOW_SECONDS_PRE_HF17\n STEEM_COMMENT_REWARD_FUND_NAME\n STEEM_CONTENT_APR_PERCENT\n STEEM_CONTENT_CONSTANT_HF0\n STEEM_CONTENT_REWARD_PERCENT\n STEEM_CONVERSION_DELAY\n STEEM_CONVERSION_DELAY_PRE_HF_16\n STEEM_CREATE_ACCOUNT_WITH_STEEM_MODIFIER\n STEEM_CURATE_APR_PERCENT\n STEEM_DEFAULT_SBD_INTEREST_RATE\n STEEM_EQUIHASH_K\n STEEM_EQUIHASH_N\n STEEM_FEED_HISTORY_WINDOW_PRE_HF_16\n STEEM_FEED_INTERVAL_BLOCKS\n STEEM_INFLATION_RATE_START_PERCENT\n STEEM_INFLATION_RATE_STOP_PERCENT\n STEEM_INIT_MINER_NAME\n STEEM_INIT_PUBLIC_KEY_STR\n STEEM_INIT_SUPPLY\n STEEM_INIT_TIME\n STEEM_IRREVERSIBLE_THRESHOLD\n STEEM_LIQUIDITY_APR_PERCENT\n STEEM_LIQUIDITY_REWARD_BLOCKS\n STEEM_LIQUIDITY_REWARD_PERIOD_SEC\n STEEM_LIQUIDITY_TIMEOUT_SEC\n STEEM_MAX_ASSET_WHITELIST_AUTHORITIES\n STEEM_MAX_AUTHORITY_MEMBERSHIP\n STEEM_MAX_BLOCK_SIZE\n STEEM_SOFT_MAX_BLOCK_SIZE\n STEEM_MAX_CASHOUT_WINDOW_SECONDS\n STEEM_MAX_COMMENT_DEPTH\n STEEM_MAX_COMMENT_DEPTH_PRE_HF17\n STEEM_MAX_FEED_AGE_SECONDS\n STEEM_MAX_INSTANCE_ID\n STEEM_MAX_MEMO_SIZE\n STEEM_MAX_MINER_WITNESSES_HF0\n STEEM_MAX_MINER_WITNESSES_HF17\n STEEM_MAX_PROXY_RECURSION_DEPTH\n STEEM_MAX_RATION_DECAY_RATE\n STEEM_MAX_RESERVE_RATIO\n STEEM_MAX_RUNNER_WITNESSES_HF0\n STEEM_MAX_RUNNER_WITNESSES_HF17\n STEEM_MAX_SATOSHIS\n STEEM_MAX_SHARE_SUPPLY\n STEEM_MAX_SIG_CHECK_DEPTH\n STEEM_MAX_TIME_UNTIL_EXPIRATION\n STEEM_MAX_TRANSACTION_SIZE\n STEEM_MAX_UNDO_HISTORY\n STEEM_MAX_URL_LENGTH\n STEEM_MAX_VOTE_CHANGES\n STEEM_MAX_VOTED_WITNESSES_HF0\n STEEM_MAX_VOTED_WITNESSES_HF17\n STEEM_MAX_WITHDRAW_ROUTES\n STEEM_MIN_ACCOUNT_CREATION_FEE\n STEEM_MIN_ACCOUNT_NAME_LENGTH\n STEEM_MIN_BLOCK_SIZE_LIMIT\n STEEM_MIN_BLOCK_SIZE\n STEEM_MIN_CONTENT_REWARD\n STEEM_MIN_CURATE_REWARD\n STEEM_MIN_PERMLINK_LENGTH\n STEEM_MIN_VOTE_INTERVAL_SEC\n STEEM_MINER_ACCOUNT\n STEEM_MINER_PAY_PERCENT\n STEEM_MIN_FEEDS\n STEEM_MINING_REWARD\n STEEM_MINING_TIME\n STEEM_MIN_LIQUIDITY_REWARD\n STEEM_MIN_LIQUIDITY_REWARD_PERIOD_SEC\n STEEM_MIN_POW_REWARD\n STEEM_MIN_PRODUCER_REWARD\n STEEM_MIN_TRANSACTION_EXPIRATION_LIMIT\n STEEM_MIN_TRANSACTION_SIZE_LIMIT\n STEEM_MIN_UNDO_HISTORY\n STEEM_NUM_INIT_MINERS\n STEEM_OWNER_AUTH_HISTORY_TRACKING_START_BLOCK_NUM\n STEEM_OWNER_AUTH_RECOVERY_PERIOD\n STEEM_OWNER_CHALLENGE_COOLDOWN\n STEEM_OWNER_CHALLENGE_FEE\n STEEM_OWNER_UPDATE_LIMIT\n STEEM_POST_AVERAGE_WINDOW\n STEEM_POST_REWARD_FUND_NAME\n STEEM_POST_WEIGHT_CONSTANT\n STEEM_POW_APR_PERCENT\n STEEM_PRODUCER_APR_PERCENT\n STEEM_PROXY_TO_SELF_ACCOUNT\n STEEM_SBD_INTEREST_COMPOUND_INTERVAL_SEC\n STEEM_SECONDS_PER_YEAR\n STEEM_RECENT_RSHARES_DECAY_TIME_HF19\n STEEM_RECENT_RSHARES_DECAY_TIME_HF17\n STEEM_ROOT_POST_PARENT\n STEEM_SAVINGS_WITHDRAW_REQUEST_LIMIT\n STEEM_SBD_START_PERCENT\n STEEM_SBD_STOP_PERCENT\n STEEM_SECOND_CASHOUT_WINDOW\n STEEM_START_MINER_VOTING_BLOCK\n STEEM_START_VESTING_BLOCK\n STEEM_TEMP_ACCOUNT\n STEEM_UPVOTE_LOCKOUT_HF7\n STEEM_VESTING_FUND_PERCENT\n STEEM_VESTING_WITHDRAW_INTERVALS_PRE_HF_16\n STEEM_VESTING_WITHDRAW_INTERVAL_SECONDS\n STEEM_VOTE_DUST_THRESHOLD\n STEEM_VOTE_REGENERATION_SECONDS\n STEEM_SYMBOL\n VESTS_SYMBOL\n STEEM_VIRTUAL_SCHEDULE_LAP_LENGTH\n STEEM_VIRTUAL_SCHEDULE_LAP_LENGTH2\n STEEM_MAX_LIMIT_ORDER_EXPIRATION\n STEEM_DELEGATION_RETURN_PERIOD_HF0\n STEEM_DELEGATION_RETURN_PERIOD_HF20\n\n\nExample Method Call\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"condenser_api.get_config\", \"params\":[], \"id\":1}' https://api.steemit.com\n\n\nExample Output\n\n{\n \"id\":1,\n \"jsonrpc\":\"2.0\",\n \"result\":{\n \"IS_TEST_NET\":false,\n \"STEEM_ENABLE_SMT\":false,\n \"SBD_SYMBOL\":null,\n \"STEEM_INITIAL_VOTE_POWER_RATE\":40,\n \"STEEM_REDUCED_VOTE_POWER_RATE\":10,\n \"STEEM_100_PERCENT\":10000,\n \"STEEM_1_PERCENT\":100,\n \"STEEM_ACCOUNT_RECOVERY_REQUEST_EXPIRATION_PERIOD\":\"86400000000\",\n \"STEEM_ACTIVE_CHALLENGE_COOLDOWN\":\"86400000000\",\n \"STEEM_ACTIVE_CHALLENGE_FEE\":{\"amount\":\"2000\", \"precision\":3, \"nai\":\"@@000000021\"},\n \"STEEM_ADDRESS_PREFIX\":\"STM\",\n \"STEEM_APR_PERCENT_MULTIPLY_PER_BLOCK\":\"102035135585887\",\n \"STEEM_APR_PERCENT_MULTIPLY_PER_HOUR\":\"119577151364285\",\n \"STEEM_APR_PERCENT_MULTIPLY_PER_ROUND\":\"133921203762304\",\n \"STEEM_APR_PERCENT_SHIFT_PER_BLOCK\":87,\n \"STEEM_APR_PERCENT_SHIFT_PER_HOUR\":77,\n \"STEEM_APR_PERCENT_SHIFT_PER_ROUND\":83,\n \"STEEM_BANDWIDTH_AVERAGE_WINDOW_SECONDS\":604800,\n \"STEEM_BANDWIDTH_PRECISION\":1000000,\n \"STEEM_BLOCKCHAIN_PRECISION\":1000,\n \"STEEM_BLOCKCHAIN_PRECISION_DIGITS\":3,\n \"STEEM_BLOCKCHAIN_HARDFORK_VERSION\":\"0.19.0\",\n \"STEEM_BLOCKCHAIN_VERSION\":\"0.19.10\",\n \"STEEM_BLOCK_INTERVAL\":3,\n \"STEEM_BLOCKS_PER_DAY\":28800,\n \"STEEM_BLOCKS_PER_HOUR\":1200,\n \"STEEM_BLOCKS_PER_YEAR\":10512000,\n \"STEEM_CASHOUT_WINDOW_SECONDS\":604800,\n \"STEEM_CASHOUT_WINDOW_SECONDS_PRE_HF12\":86400,\n \"STEEM_CASHOUT_WINDOW_SECONDS_PRE_HF17\":43200,\n \"STEEM_CHAIN_ID\":\"0000000000000000000000000000000000000000000000000000000000000000\",\n \"STEEM_CHAIN_ID_NAME\":\"\",\n \"STEEM_COMMENT_REWARD_FUND_NAME\":\"comment\",\n \"STEEM_CONTENT_APR_PERCENT\":3875,\n \"STEEM_CONTENT_CONSTANT_HF0\":\"2000000000000\",\n \"STEEM_CONTENT_REWARD_PERCENT\":7500,\n \"STEEM_CONVERSION_DELAY\":\"302400000000\",\n \"STEEM_CONVERSION_DELAY_PRE_HF_16\":\"604800000000\",\n \"STEEM_CREATE_ACCOUNT_DELEGATION_RATIO\":5,\n \"STEEM_CREATE_ACCOUNT_DELEGATION_TIME\":\"2592000000000\",\n \"STEEM_CREATE_ACCOUNT_WITH_STEEM_MODIFIER\":30,\n \"STEEM_CURATE_APR_PERCENT\":3875,\n \"STEEM_DEFAULT_SBD_INTEREST_RATE\":1000,\n \"STEEM_EQUIHASH_K\":6,\n \"STEEM_EQUIHASH_N\":140,\n \"STEEM_FEED_HISTORY_WINDOW\":84,\n \"STEEM_FEED_HISTORY_WINDOW_PRE_HF_16\":168,\n \"STEEM_FEED_INTERVAL_BLOCKS\":1200,\n \"STEEM_GENESIS_TIME\":\"2016-03-24T16:00:00\",\n \"STEEM_HARDFORK_REQUIRED_WITNESSES\":17,\n \"STEEM_INFLATION_NARROWING_PERIOD\":250000,\n \"STEEM_INFLATION_RATE_START_PERCENT\":978,\n \"STEEM_INFLATION_RATE_STOP_PERCENT\":95,\n \"STEEM_INIT_MINER_NAME\":\"initminer\",\n \"STEEM_INIT_PUBLIC_KEY_STR\":\"STM8GC13uCZbP44HzMLV6zPZGwVQ8Nt4Kji8PapsPiNq1BK153XTX\",\n \"STEEM_INIT_SUPPLY\":0,\n \"STEEM_INIT_TIME\":\"1970-01-01T00:00:00\",\n \"STEEM_IRREVERSIBLE_THRESHOLD\":7500,\n \"STEEM_LIQUIDITY_APR_PERCENT\":750,\n \"STEEM_LIQUIDITY_REWARD_BLOCKS\":1200,\n \"STEEM_LIQUIDITY_REWARD_PERIOD_SEC\":3600,\n \"STEEM_LIQUIDITY_TIMEOUT_SEC\":\"604800000000\",\n \"STEEM_MAX_ACCOUNT_NAME_LENGTH\":16,\n \"STEEM_MAX_ACCOUNT_WITNESS_VOTES\":30,\n \"STEEM_MAX_ASSET_WHITELIST_AUTHORITIES\":10,\n \"STEEM_MAX_AUTHORITY_MEMBERSHIP\":10,\n \"STEEM_MAX_BLOCK_SIZE\":393216000,\n \"STEEM_SOFT_MAX_BLOCK_SIZE\":2097152,\n \"STEEM_MAX_CASHOUT_WINDOW_SECONDS\":1209600,\n \"STEEM_MAX_COMMENT_DEPTH\":65535,\n \"STEEM_MAX_COMMENT_DEPTH_PRE_HF17\":6,\n \"STEEM_MAX_FEED_AGE_SECONDS\":604800,\n \"STEEM_MAX_INSTANCE_ID\":\"281474976710655\",\n \"STEEM_MAX_MEMO_SIZE\":2048,\n \"STEEM_MAX_WITNESSES\":21,\n \"STEEM_MAX_MINER_WITNESSES_HF0\":1,\n \"STEEM_MAX_MINER_WITNESSES_HF17\":0,\n \"STEEM_MAX_PERMLINK_LENGTH\":256,\n \"STEEM_MAX_PROXY_RECURSION_DEPTH\":4,\n \"STEEM_MAX_RATION_DECAY_RATE\":1000000,\n \"STEEM_MAX_RESERVE_RATIO\":20000,\n \"STEEM_MAX_RUNNER_WITNESSES_HF0\":1,\n \"STEEM_MAX_RUNNER_WITNESSES_HF17\":1,\n \"STEEM_MAX_SATOSHIS\":\"4611686018427387903\",\n \"STEEM_MAX_SHARE_SUPPLY\":\"1000000000000000\",\n \"STEEM_MAX_SIG_CHECK_DEPTH\":2,\n \"STEEM_MAX_TIME_UNTIL_EXPIRATION\":3600,\n \"STEEM_MAX_TRANSACTION_SIZE\":65536,\n \"STEEM_MAX_UNDO_HISTORY\":10000,\n \"STEEM_MAX_URL_LENGTH\":127,\n \"STEEM_MAX_VOTE_CHANGES\":5,\n \"STEEM_MAX_VOTED_WITNESSES_HF0\":19,\n \"STEEM_MAX_VOTED_WITNESSES_HF17\":20,\n \"STEEM_MAX_WITHDRAW_ROUTES\":10,\n \"STEEM_MAX_WITNESS_URL_LENGTH\":2048,\n \"STEEM_MIN_ACCOUNT_CREATION_FEE\":1,\n \"STEEM_MIN_ACCOUNT_NAME_LENGTH\":3,\n \"STEEM_MIN_BLOCK_SIZE_LIMIT\":65536,\n \"STEEM_MIN_BLOCK_SIZE\":115,\n \"STEEM_MIN_CONTENT_REWARD\":{\"amount\":\"1000\", \"precision\":3, \"nai\":\"@@000000021\"},\n \"STEEM_MIN_CURATE_REWARD\":{\"amount\":\"1000\", \"precision\":3, \"nai\":\"@@000000021\"},\n \"STEEM_MIN_PERMLINK_LENGTH\":0,\n \"STEEM_MIN_REPLY_INTERVAL\":20000000,\n \"STEEM_MIN_REPLY_INTERVAL_HF20\":3000000,\n \"STEEM_MIN_ROOT_COMMENT_INTERVAL\":300000000,\n \"STEEM_MIN_VOTE_INTERVAL_SEC\":3,\n \"STEEM_MINER_ACCOUNT\":\"miners\",\n \"STEEM_MINER_PAY_PERCENT\":100,\n \"STEEM_MIN_FEEDS\":7,\n \"STEEM_MINING_REWARD\":{\"amount\":\"1000\", \"precision\":3, \"nai\":\"@@000000021\"},\n \"STEEM_MINING_TIME\":\"2016-03-24T17:00:00\",\n \"STEEM_MIN_LIQUIDITY_REWARD\":{\"amount\":\"1200000\", \"precision\":3, \"nai\":\"@@000000021\" },\n \"STEEM_MIN_LIQUIDITY_REWARD_PERIOD_SEC\":60000000,\n \"STEEM_MIN_PAYOUT_SBD\":{\"amount\":\"20\", \"precision\":3, \"nai\":\"@@000000013\"},\n \"STEEM_MIN_POW_REWARD\":{\"amount\":\"1000\", \"precision\":3, \"nai\":\"@@000000021\"},\n \"STEEM_MIN_PRODUCER_REWARD\":{\"amount\":\"1000\", \"precision\":3, \"nai\":\"@@000000021\"},\n \"STEEM_MIN_TRANSACTION_EXPIRATION_LIMIT\":15,\n \"STEEM_MIN_TRANSACTION_SIZE_LIMIT\":1024,\n \"STEEM_MIN_UNDO_HISTORY\":10,\n \"STEEM_NULL_ACCOUNT\":\"null\",\n \"STEEM_NUM_INIT_MINERS\":1,\n \"STEEM_OWNER_AUTH_HISTORY_TRACKING_START_BLOCK_NUM\":3186477,\n \"STEEM_OWNER_AUTH_RECOVERY_PERIOD\":\"2592000000000\",\n \"STEEM_OWNER_CHALLENGE_COOLDOWN\":\"86400000000\",\n \"STEEM_OWNER_CHALLENGE_FEE\":{\"amount\":\"30000\", \"precision\":3, \"nai\":\"@@000000021\"},\n \"STEEM_OWNER_UPDATE_LIMIT\":3600000000,\n \"STEEM_POST_AVERAGE_WINDOW\":86400,\n \"STEEM_POST_REWARD_FUND_NAME\":\"post\",\n \"STEEM_POST_WEIGHT_CONSTANT\":1600000000,\n \"STEEM_POW_APR_PERCENT\":750,\n \"STEEM_PRODUCER_APR_PERCENT\":750,\n \"STEEM_PROXY_TO_SELF_ACCOUNT\":\"\",\n \"STEEM_SBD_INTEREST_COMPOUND_INTERVAL_SEC\":2592000,\n \"STEEM_SECONDS_PER_YEAR\":31536000,\n \"STEEM_RECENT_RSHARES_DECAY_TIME_HF19\":\"1296000000000\",\n \"STEEM_RECENT_RSHARES_DECAY_TIME_HF17\":\"2592000000000\",\n \"STEEM_REVERSE_AUCTION_WINDOW_SECONDS\":1800,\n \"STEEM_ROOT_POST_PARENT\":\"\",\n \"STEEM_SAVINGS_WITHDRAW_REQUEST_LIMIT\":100,\n \"STEEM_SAVINGS_WITHDRAW_TIME\":\"259200000000\",\n \"STEEM_SBD_START_PERCENT\":200,\n \"STEEM_SBD_STOP_PERCENT\":500,\n \"STEEM_SECOND_CASHOUT_WINDOW\":2592000,\n \"STEEM_SOFT_MAX_COMMENT_DEPTH\":255,\n \"STEEM_START_MINER_VOTING_BLOCK\":864000,\n \"STEEM_START_VESTING_BLOCK\":201600,\n \"STEEM_TEMP_ACCOUNT\":\"temp\",\n \"STEEM_UPVOTE_LOCKOUT_HF7\":60000000,\n \"STEEM_UPVOTE_LOCKOUT_HF17\":\"43200000000\",\n \"STEEM_VESTING_FUND_PERCENT\":1500,\n \"STEEM_VESTING_WITHDRAW_INTERVALS\":13,\n \"STEEM_VESTING_WITHDRAW_INTERVALS_PRE_HF_16\":104,\n \"STEEM_VESTING_WITHDRAW_INTERVAL_SECONDS\":604800,\n \"STEEM_VOTE_DUST_THRESHOLD\":50000000,\n \"STEEM_VOTE_REGENERATION_SECONDS\":432000,\n \"STEEM_SYMBOL\":null,\n \"VESTS_SYMBOL\":null,\n \"STEEM_VIRTUAL_SCHEDULE_LAP_LENGTH\":\"18446744073709551615\",\n \"STEEM_VIRTUAL_SCHEDULE_LAP_LENGTH2\":\"340282366920938463463374607431768211455\",\n \"STEEM_MAX_LIMIT_ORDER_EXPIRATION\":2419200,\n \"STEEM_DELEGATION_RETURN_PERIOD_HF0\":604800,\n \"STEEM_DELEGATION_RETURN_PERIOD_HF20\":864000\n }\n}" + } + + + + + + + , + + "tutorials-recipes-understanding-dynamic-global-properties": { + "id": "tutorials-recipes-understanding-dynamic-global-properties", + "title": "Understanding Dynamic Global Properties", + "category": "tutorials-recipes", + "description": "Maintains global state information", + "type": "", + "url": "/tutorials-recipes/understanding-dynamic-global-properties", + "content": "Intro\n\nDynamic Global Properties represents a set of values that are calculated during normal chain operations and reflect the current values of global blockchain properties.\n\nThe API returns an object containing information that changes every block interval such as the head block number, the total vesting fund, etc.\n\nSections\n\n\n Fields\n \n head_block_number\n head_block_id\n time\n current_witness\n total_pow\n num_pow_witnesses\n virtual_supply\n current_supply\n current_sbd_supply\n total_vesting_fund_steem\n total_vesting_shares\n total_reward_fund_steem\n total_reward_shares2\n sbd_interest_rate\n maximum_block_size\n current_aslot\n recent_slots_filled\n last_irreversible_block_num\n vote_power_reserve_rate\n average_block_size\n current_reserve_ratio\n max_virtual_bandwidth\n \n \n Not Covered\n Example Method Call\n Example Output\n\n\nhead_block_number\n\nBlock height at the head of the blockchain. This represents the latest block produced by witnesses.\n\n\n example: 24155032\n\n\nhead_block_id\n\nUsed 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.\n\n\n example: 0170939865fa4e3aa7fca8f8df35d23333fe0bee\n see: RIPEMD-160 hashes\n\n\ntime\n\nPoint in time (UTC) that the block was included in the chain.\n\nUsed to synchronize events like Hard Fork activation.\n\nWhen 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.\n\nFor new transactions, expirations originate from this time.\n\n\n example: 2018-07-14T01:19:51\n\n\ncurrent_witness\n\nAccount name of the current witness.\n\n\n example: blocktrades\n\n\ntotal_powDeprecated\n\nThe total POW accumulated, aka the sum of num_pow_witness at the time new POW is added.\n\n\n example: 514415\n\n\nnum_pow_witnessesDeprecated\n\nThe current count of how many pending POW witnesses there are, determines the difficulty of doing pow.\n\n\n example: 172\n\n\nvirtual_supply\n\nThe virtual supply is the supply of all STEEM + all SBD if all SBD were converted to STEEM at the current median price.\n\n\n example: 283290592.652 STEEM\n\n\ncurrent_supply\n\nSTEEM currently in existence.\n\n\n example: 271546371.129 STEEM\n\n\nconfidential_supply\n\nTotal asset held in confidential balances.\n\n\n example: 0.000 STEEM\n\n\ncurrent_sbd_supply\n\nSBD currently in existence.\n\n\n example: 15478883.968 SBD\n\n\nconfidential_sbd_supply\n\nTotal asset held in confidential balances.\n\n\n example: 0.000 SBD\n\n\ntotal_vesting_fund_steem Deprecated\n\nNow deprecated way to get STEEM that is invested in STEEM POWER (powered up).\n\nUse condenser_api.get_reward_fund instead.\n\n\n example: 192713261.007 STEEM\n\n\ntotal_vesting_shares\n\nVESTS that are invested in STEEM POWER (powered up).\n\n\n example: 390950506702.452773 VESTS\n\n\ntotal_reward_fund_steem \n\nSTEEM available in the reward pool.\n\n\n example: 0.000 STEEM\n\n\ntotal_reward_shares2 Deprecated\n\nNow deprecated way to get the number of shares in the pool.\n\nUse condenser_api.get_reward_fund instead.\n\n\n example: 0\n\n\nsbd_interest_rate\n\nThis property defines the interest rate that SBD deposits receive.\n\n\n example: 0\n\n\nmaximum_block_size\n\nMaximum 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.\n\nNote: 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.\n\n\n example: 65536\n\n\ncurrent_aslot\n\nThe 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.\n\n\n example: 24231997\n\n\nrecent_slots_filled\n\nUsed to compute witness participation.\n\n\n example: 340282366920938463463374607431768211455\n\n\nlast_irreversible_block_num\n\nThe latest block number that has been confirmed by two thirds of all block producers and is thus irreversible.\n\n\n example: 24155017\n\n\nvote_power_reserve_rate\n\nThe 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.\n\n\n example: 10\n\n\naverage_block_size Removed\n\nRemoved in 0.20.6, see: #3029\n\nAverage 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.\n\n\n example: 9309\n\n\ncurrent_reserve_ratio Removed\n\nRemoved in 0.20.6, see: #3029\n\nAny 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.\n\n\n example: 200000000\n\n\nmax_virtual_bandwidth Removed\n\nRemoved in 0.20.6, see: #3029\n\nThe 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\n\n\n example: 264241152000000000000\n\n\nNot Covered\n\nFields not covered in this recipe are:\n\n\n confidential_supply\n confidential_sbd_supply\n pending_rewarded_vesting_shares\n pending_rewarded_vesting_steem\n sbd_print_rate\n participation_count\n\n\nExample Method Call\n\nTo retrieve the current results for condenser_api.get_dynamic_global_properties, we can retrieve the current state information using curl:\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"condenser_api.get_dynamic_global_properties\", \"params\":[], \"id\":1}' https://api.steemit.com\n\n\nExample Output\n\n{\n \"id\":1,\n \"jsonrpc\":\"2.0\",\n \"result\":{\n \"head_block_number\":24238248,\n \"head_block_id\":\"0171d8a833dc369abd034b0c67d8725f96df9e5b\",\n \"time\":\"2018-07-16T22:41:24\",\n \"current_witness\":\"xeldal\",\n \"total_pow\":514415,\n \"num_pow_witnesses\":172,\n \"virtual_supply\":\"283434761.199 STEEM\",\n \"current_supply\":\"271729171.190 STEEM\",\n \"confidential_supply\":\"0.000 STEEM\",\n \"current_sbd_supply\":\"15498201.173 SBD\",\n \"confidential_sbd_supply\":\"0.000 SBD\",\n \"total_vesting_fund_steem\":\"192913644.627 STEEM\",\n \"total_vesting_shares\":\"391296886352.617261 VESTS\",\n \"total_reward_fund_steem\":\"0.000 STEEM\",\n \"total_reward_shares2\":\"0\",\n \"pending_rewarded_vesting_shares\":\"379159224.860656 VESTS\",\n \"pending_rewarded_vesting_steem\":\"185294.019 STEEM\",\n \"sbd_interest_rate\":0,\n \"sbd_print_rate\":2933,\n \"maximum_block_size\":65536,\n \"current_aslot\":24315228,\n \"recent_slots_filled\":\"340282366920938463463374607431768211400\",\n \"participation_count\":128,\n \"last_irreversible_block_num\":24238230,\n \"vote_power_reserve_rate\":10\n }\n}" + } + + + + + + + , + + "tutorials-recipes-vest-to-steem": { + "id": "tutorials-recipes-vest-to-steem", + "title": "Converting VESTS to STEEM", + "category": "tutorials-recipes", + "description": "How to convert VESTS to STEEM or STEEM POWER", + "type": "", + "url": "/tutorials-recipes/vest-to-steem", + "content": "Intro\n\nSteem’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.\n\nSteps\n\n\n Get Dynamic Global Properties Fetch current values of global blockchain properties\n Formulate VESTS_TO_STEEM Formulate function that will convert given VESTS to STEEM.\n\n\n1. Get Dynamic Global Properties \n\nFollowing method can be used to fetch global values\n\ncurl -s --data '{\"jsonrpc\":\"2.0\", \"method\":\"condenser_api.get_dynamic_global_properties\", \"params\":[], \"id\":1}' https://api.steemit.com\n\n\nExample Output\n\n{\n \"id\":1,\n \"jsonrpc\":\"2.0\",\n \"result\":{\n \"head_block_number\":24238248,\n \"head_block_id\":\"0171d8a833dc369abd034b0c67d8725f96df9e5b\",\n \"time\":\"2018-07-16T22:41:24\",\n \"current_witness\":\"xeldal\",\n \"total_pow\":514415,\n \"num_pow_witnesses\":172,\n \"virtual_supply\":\"283434761.199 STEEM\",\n \"current_supply\":\"271729171.190 STEEM\",\n \"confidential_supply\":\"0.000 STEEM\",\n \"current_sbd_supply\":\"15498201.173 SBD\",\n \"confidential_sbd_supply\":\"0.000 SBD\",\n \"total_vesting_fund_steem\":\"192913644.627 STEEM\",\n \"total_vesting_shares\":\"391296886352.617261 VESTS\",\n \"total_reward_fund_steem\":\"0.000 STEEM\",\n \"total_reward_shares2\":\"0\",\n \"pending_rewarded_vesting_shares\":\"379159224.860656 VESTS\",\n \"pending_rewarded_vesting_steem\":\"185294.019 STEEM\",\n \"sbd_interest_rate\":0,\n \"sbd_print_rate\":2933,\n \"maximum_block_size\":65536,\n \"current_aslot\":24315228,\n \"recent_slots_filled\":\"340282366920938463463374607431768211400\",\n \"participation_count\":128,\n \"last_irreversible_block_num\":24238230,\n \"vote_power_reserve_rate\":10,\n \"average_block_size\":10950,\n \"current_reserve_ratio\":200000000,\n \"max_virtual_bandwidth\":\"264241152000000000000\"\n }\n}\n\n\n2. Formulate VESTS_TO_STEEM \n\nFrom above results we have everything we need to calculate STEEM from given VESTS value.\n\nLet’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:\n\nvestSteem = ( result.total_vesting_fund_steem x availableVESTS ) / result.total_vesting_shares\n\n\nThat’s it!" + } + + + + + + + , + + "tutorials-recipes-virtual-operations-when-streaming-blockchain-transactions": { + "id": "tutorials-recipes-virtual-operations-when-streaming-blockchain-transactions", + "title": "Streaming blockchain transactions", + "category": "tutorials-recipes", + "description": "Including virtual operations when streaming blockchain transactions", + "type": "", + "url": "/tutorials-recipes/virtual-operations-when-streaming-blockchain-transactions", + "content": "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.\n\nIntro\n\nThere 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.\n\nThere 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.\n\nSteps\n\n\n Blocks, transactions and operations\n Virtual operation streaming\n\n\n1. Blocks, transactions and operations \n\nIn 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.\n\nstream = client.blockchain.getBlockStream();\n stream\n .on('data', function(block) {\n console.log(block);\n ...\n ...\n\n\nBelow is an example of what a block looks like:\n\n{\n \"block_id\":\"017fa2a9b142cd8d3607b7e7421412402bf97957\",\n \"extensions\":[],\n \"previous\":\"017fa2a867978140e7553bbfd65396a5a8136d53\",\n \"signing_key\":\"STM5gBt5xvdb5vhmXjBqfzQ7vwr4hFF5rjmYmZnSbzdb9eWmk9or5\",\n \"timestamp\":\"2018-08-17T08:31:48\",\n \"transaction_ids\": [],\n \"transaction_merkle_root\":\"4f0d61928ce9595aec6558fb53f1af1b8de06d78\",\n \"transactions\": [],\n \"witness\":\"smooth.witness\",\n \"witness_signature\":\"204e00e747ce75b24fc26b5d18f12992197c61de0bf27c830416761bd25648238239c5eb26a5e392d474e27c601842e2ccf105ffb47f5a5712727412a18f106dbb\"\n}\n\n\nEach block contains transactions:\n\n{\n \"block_num\": 25141929,\n \"expiration\": \"2018-08-17T08:41:42\",\n \"extensions\": [],\n \"operations\": [],\n \"ref_block_num\": 41616,\n \"ref_block_prefix\": 3838737669,\n \"signatures\": [\"1f261ccf59131dcd10334a40b8b76bd2e80b05eee1c8deaedb…ebb7e4a4d6e22f7823940248f1488978d4ec8ecbd8abbd88e\"],\n \"transaction_id\": \"a972aef3388908f8a4b4a8d889fb89c83d2b8eb3\",\n \"transaction_num\": 0\n}\n\n\nAnd each transaction contains operations:\n\n[\n \"vote\", \n {\n \"author\":\"skmedia\",\n \"permlink\":\"buynearn-new-mlm-plan-launched-4th-june-2018-new-mlm-plan-2018-10inr-4-buynearn-online\",\n \"voter\":\"nazann\",\n \"weight\":4700 \n }\n]\n\n\n2. Virtual operation streaming \n\nVirtual 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.\n\nsteem-python provides a very simple method to stream virtual or any other operations directly:\n\nfrom steem import Steem\nfrom steem.blockchain import Blockchain\nimport pprint\ns = Steem()\nb = Blockchain(s)\n\nfor op in b.stream('author_reward'):\n pprint.pprint(op)\n # break\n\n\nWith result:\n\n{\n \"_id\": \"11cb40b9283c8a89ed5d8c348cbc68d76a9d8bd3\",\n \"author\": \"hopehash\",\n \"block_num\": 25145619,\n \"permlink\": \"hopehash-btc-1-057\",\n \"sbd_payout\": \"0.000 SBD\",\n \"steem_payout\": \"2.341 STEEM\",\n \"timestamp\": \"2018-08-17T17:11:36.18\",\n \"trx_id\": \"0000000000000000000000000000000000000000\",\n \"type\": \"author_reward\",\n \"vesting_payout\": \"4740.455508 VESTS\"\n}\n\n\nFrom 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.\n\nstream = client.blockchain.getBlockStream();\n stream\n .on('data', function(block) {\n let x = 0\n while (x < block.transactions.length) {\n if (block.transactions[x].operations[0][0] = 'author_reward') {\n console.log(block.transactions[x].operations[0]);\n }\n x += 1\n }\n });\n\n\nThat’s all there is to it." + } + + + + + + + + + , + + "tutorials-ruby-blog-feed": { + "id": "tutorials-ruby-blog-feed", + "title": "RB: Blog Feed", + "category": "tutorials-ruby", + "description": "This example will output blog details to the terminal for the author specified, limited to five results.", + "type": "", + "url": "/tutorials-ruby/blog_feed", + "content": "Full, runnable src of Blog Feed can be downloaded as part of the RB tutorials repository.\n\n\nScript\n\nThe script parses the creation date, assuming Zulu timezone (AKA UTC).\n\nThe 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.\n\nIt also counts the words in the content body by splitting the text into an array of strings, delimited by whitespace.\n\nFinally, it creates the canonical URL by combining parent_permlink, author, and permlink.\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/01_blog_feed\nbundle install\nruby blog_feed.rb steemitblog\n\n\nExample Output\n\n2018-03-24 17:30:36 UTC\n Post: Happy 2nd Birthday Steem Blockchain\n By: steemitblog\n Words: 301\n https://steemit.com/steem/@steemitblog/happy-2nd-birthday-steem-blockchain\n2018-03-07 20:56:36 UTC\n Post: Join Team Steemit at TokenFest!\n By: steemitblog\n Words: 104\n https://steemit.com/steemit/@steemitblog/join-team-steemit-at-tokenfest\n2018-02-27 20:18:36 UTC\n Post: Smart Media Token Development\n By: steemitblog\n Words: 699\n https://steemit.com/smt/@steemitblog/smart-media-token-development\n2018-02-25 20:55:24 UTC\n Reblog: I filmed this video of @ned @pkattera and @sneak talking about the SMTs and the future of Steemit\n By: ruwan\n Words: 89\n https://steemit.com/steemit/@ruwan/i-filmed-this-video-of-ned-pkattera-and-sneak-talking-about-the-smts-and-the-future-of-steemit\n2018-02-22 17:41:00 UTC\n Post: STEEM 및 SBD가 GOPAX에 상장되었습니다\n By: steemitblog\n Words: 317\n https://steemit.com/gopax/@steemitblog/steem-sbd-gopa" + } + + + + + + + , + + "tutorials-ruby-edit-content-patching": { + "id": "tutorials-ruby-edit-content-patching", + "title": "RB: Edit Content Patching", + "category": "tutorials-ruby", + "description": "---", + "type": "", + "url": "/tutorials-ruby/edit_content_patching", + "content": "Full, runnable src of Edit Content Patching can be downloaded as part of the RB tutorials repository.\n\n\ntitle: How to edit a Post\nposition: 5\nexclude: true\nlayout: main-script\ndescription: Patching changes to a post on Steem.\nmain_script: tutorials-ruby/edit_content_patching.rb\nmain_type: ruby\nmain_script_anchor: Script\n—\n\nIntro\n\nThis tutorial will show a technique for efficiently editing a post by only broadcasting changes to the post body.\n\nScript\n\nThis 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.\n\nBecause 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.\n\nAs stated earlier, you will need to change broadcast to true. You can also set other values to test this script on other post:\n\n\n wif - The posting key of the author.\n author - Name of the account that wrote the post we’re modifying.\n title - Title of the post.\n 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.\n\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/12_edit_content_patching\nbundle install\nruby edit_content_patching.rb\n\n\nExample Output\n\nChanges:\n@@ -26,8 +26,26 @@\n edited)\n+%0AAppended content.\n{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"id\": \"f327acc1c51d907a9ba9bfac70e6fc9e99ab2865\",\n \"block_num\": 23035803,\n \"trx_num\": 0,\n \"expired\": false\n },\n \"id\": 1\n}" + } + + + + + + + , + + "tutorials-ruby-follow-another-user": { + "id": "tutorials-ruby-follow-another-user", + "title": "RB: Follow Another User", + "category": "tutorials-ruby", + "description": "*How to follow/unfollow another user.*", + "type": "", + "url": "/tutorials-ruby/follow_another_user", + "content": "Full, runnable src of Follow Another User can be downloaded as part of the RB tutorials repository.\n\n\nThis tutorial will take you through the process of following/muting/unfollowing/ummuting an author and checking the follow status of an author.\n\nSections\n\n\n Follow\n Check Follow\n To Run - Running the example.\n\n\nFollow\n\nIn the first example script, we can modify the initial configuration then run:\n\nruby follow.rb\n\n\nFollows (and mutes) are expressed by custom_json with id=follow (mutes also use id=follow).\n\nExample custom_json operation:\n\n{\n \"id\": \"follow\",\n \"required_auths\": [],\n \"required_posting_auths\": [\"social\"],\n \"json\": \"[\\\"follow\\\",{\\\"follower\\\":\\\"social\\\",\\\"following\\\":\\\"alice\\\",\\\"what\\\":[\\\"blog\\\"]}]\"\n}\n\n\nTo 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:\n\n\n follower - The specific account that will select the author to follow/unfollow.\n following - The account/author that the account would like to follow.\n 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.\n\n\nCheck Follow\n\nIn the second example script:\n\nruby check_follow.rb\n\n\nThe 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).\n\nWe 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).\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/18_follow_another_user\nbundle install\nruby follow.rb\n\n\nExample Output\n\n{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"id\": \"025688e27999d3aa514f1f0b77c9f8d8dae31d72\",\n \"block_num\": 26349355,\n \"trx_num\": 3,\n \"expired\": false\n },\n \"id\": 3\n}" + } + + + + + + + , + + "tutorials-ruby-get-account-comments": { + "id": "tutorials-ruby-get-account-comments", + "title": "RB: Get Account Comments", + "category": "tutorials-ruby", + "description": "Fetching the comments written by a particular account.", + "type": "", + "url": "/tutorials-ruby/get_account_comments", + "content": "Full, runnable src of Get Account Comments can be downloaded as part of the RB tutorials repository.\n\n\nHistorically, applications that wanted to retrieve comments written by a particular account would use get_state. But this method has been scheduled for deprecation. So we’ll use a more supported approach in this tutorial using get_account_history.\n\nSections\n\n\n Making the api call - Requesting account history\n \n Example api call - make the call in code\n Example api call using script - using our tutorial script\n Example Output - output from a successful call\n \n \n Comment Fields - Getting more detail than provided by account history.\n To Run - Running the example.\n\n\nMaking the api call\n\nTo request the latest comments by a particular author, we can use the get_account_history method:\n\napi = Radiator::Api.new\n\napi.get_account_history(account_name, -1, 10000) do |history|\n history.each do |index, item|\n type, op = item.op\n \n next unless type == 'comment'\n next if op.parent_author.empty? # skip posts\n next if op.parent_author == account_name # skip replies to account\n\n # .\n # ... your code here\n # .\n end\nend\n\n\nNotice, the above example request up to 10,000 operations from history, starting from the oldest. From these results, we iterate on each item in history to locate a) type of comment, and b) parent_author that do not match the account_name.\n\nExample api call\n\nIf we want to get the comments by user @lordvader …\n\napi.get_account_history(\"lordvader\") do |content| ...\n\n\nExample api call using script\n\nAnd to do the same with our tutorial script\nruby get_account_comments.rb lordvader\n\n\nExample Output\n\nFrom the example we get the following output from our script:\n\n.\n.\n.\nReply to @saarliconvalley in discussion: \"The Empire has sent you a friend request.\"\n\tbody_length: 33 (7 words)\n\treplied at: 2018-03-27T16:02:45\n\tnet_votes: 0\n\thttps://steemit.com/@lordvader/re-saarliconvalley-re-lordvader-2018327t16025594z-20180327t160243538z\nReply to @teenovision in discussion: \"The Empire has sent you a friend request.\"\n\tbody_length: 90 (16 words)\n\treplied at: 2018-03-27T15:53:39, updated at: 2018-03-30T17:25:18, active at: 2018-03-30T17:25:18\n\tnet_votes: 0\n\thttps://steemit.com/@lordvader/re-teenovision-re-lordvader-the-empire-has-sent-you-a-friend-request-20180327t155339532z\nReply to @gtg in discussion: \"gtg witness log\"\n\tbody_length: 130 (25 words)\n\treplied at: 2018-04-06T04:29:00\n\tnet_votes: 2\n\thttps://steemit.com/@lordvader/re-gtg-ffdhu-gtg-witness-log-20180406t042906872z\n\n\nComment fields\n\nComments in the results of get_account_history will only return the following fields:\n\n\n parent_author\n parent_permlink\n author\n permlink\n title\n body\n json_metadata\n\n\nIn our example script, we want more detail than this, so for every comment, we call get_content to retrieve more detail. For a full explanation of the results provided by get_content, please refer to the tutorial: Get Post Details\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\n\n <account-name>\n\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/09_get_account_comments\nbundle install\nruby get_account_comments.rb <account-name>" + } + + + + + + + , + + "tutorials-ruby-get-account-replies": { + "id": "tutorials-ruby-get-account-replies", + "title": "RB: Get Account Replies", + "category": "tutorials-ruby", + "description": "Fetching the replies written to a particular account.", + "type": "", + "url": "/tutorials-ruby/get_account_replies", + "content": "Full, runnable src of Get Account Replies can be downloaded as part of the RB tutorials repository.\n\n\nHistorically, applications that wanted to retrieve replies written to a particular account would use get_state. But this method has been scheduled for deprecation. So we’ll use a more supported approach in this tutorial using get_account_history.\n\nSections\n\n\n Making the api call - Requesting account history\n \n Example api call - make the call in code\n Example api call using script - using our tutorial script\n Example Output - output from a successful call\n \n \n Comment Fields - Getting more detail than provided by account history.\n To Run - Running the example.\n\n\nMaking the api call\n\nTo request the latest replies to a particular author, we can use the get_account_history method:\n\napi = Radiator::Api.new\n\napi.get_account_history(account_name, -1, 10000) do |history|\n history.each do |index, item|\n type, op = item.op\n \n next unless type == 'comment'\n next if op.parent_author.empty? # skip posts\n next unless op.parent_author == account_name # skip comments by account\n\n # .\n # ... your code here\n # .\n end\nend\n\n\nNotice, the above example request up to 10,000 operations from history, starting from the oldest. From these results, we iterate on each item in history to locate a) type of comment, and b) parent_author that match the account_name.\n\nExample api call\n\nIf we want to get the replies to user @lordvader …\n\napi.get_account_history(\"lordvader\") do |content| ...\n\n\nExample api call using script\n\nAnd to do the same with our tutorial script\nruby get_account_replies.rb lordvader\n\n\nExample Output\n\nFrom the example we get the following output from our script:\n\n.\n.\n.\nReply by @steemitboard in discussion: \"The Empire has sent you a friend request.\"\n\tbody_length: 677 (99 words)\n\treplied at: 2018-04-28T04:32:42\n\tnet_votes: 0\n\thttps://steemit.com/@steemitboard/steemitboard-notify-lordvader-20180428t043241000z\nReply by @jedimasteryoda in discussion: \"The Empire has sent you a friend request.\"\n\tbody_length: 65 (11 words)\n\treplied at: 2018-06-07T18:47:54\n\tnet_votes: 0\n\thttps://steemit.com/@jedimasteryoda/re-lordvader-the-empire-has-sent-you-a-friend-request-20180607t184754944z\nReply by @koinbot in discussion: \"The Empire has sent you a friend request.\"\n\tbody_length: 15 (2 words)\n\treplied at: 2018-06-23T07:58:51\n\tnet_votes: 0\n\thttps://steemit.com/@koinbot/re-lordvader-the-empire-has-sent-you-a-friend-request-20180623t075851464z\n\n\nComment fields\n\nReplies in the results of get_account_history will only return the following fields:\n\n\n parent_author\n parent_permlink\n author\n permlink\n title\n body\n json_metadata\n\n\nIn our example script, we want more detail than this, so for every comment, we call get_content to retrieve more detail. For a full explanation of the results provided by get_content, please refer to the tutorial: Get Post Details\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\n\n <account-name>\n\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/08_get_account_replies\nbundle install\nruby get_account_replies.rb <account-name>" + } + + + + + + + , + + "tutorials-ruby-get-follower-and-following-list": { + "id": "tutorials-ruby-get-follower-and-following-list", + "title": "RB: Get Follower And Following List", + "category": "tutorials-ruby", + "description": "_How to create a list of followers and accounts that you are following._", + "type": "", + "url": "/tutorials-ruby/get_follower_and_following_list", + "content": "Full, runnable src of Get Follower And Following List can be downloaded as part of the RB tutorials repository.\n\n\nThis tutorial will take you through the process of requesting either the follower or following list for an account on the blockchain.\n\nIntro\n\nIn radiator, we can request follow results using condenser_api.get_following or condenser_api.get_follows methods. These methods take the following arguments:\n\n\n account - The account for which the follower/following process will be executed.\n start - Where in the list to begin getting results.\n 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).\n limit - The number of lines to be returned by the query (limit, maximum 1000 per call)\n\n\nSteps\n\n\n Configure connection Configuration of radiator to communicate with the Steem blockchain\n Input variables Collecting the required inputs via command line arguments\n Get followers/following Get the followers or accounts being followed\n Display Return the array of results to the console\n\n\n1. Configure connection\n\nIn the first few lines we initialize the configured library and packages (libraries are described in Gemfile):\n\nrequire 'rubygems'\nrequire 'bundler/setup'\n\nBundler.require\n\napi = Radiator::Api.new\n\n\nAbove, we have radiator pointing to the production network. To specify a different full node, e.g.:\n\napi = Radiator::Api.new(url: 'https://testnet.steemitdev.com')\n\n\n2. Input variables\n\nCapture the arguments from the command line.\n\naccount = ARGV[0]\ntype = ARGV[1] || 'following'\nlimit = (ARGV[2] || '-1').to_i\n\n\n3. Get followers/following\n\nDepending on the arguments passed, we call the corresponding method and the element name of what we are requesting:\n\nmethod = \"get_#{type}\"\nelem = type.sub(/s/, '').to_sym\n\n\nThe 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.\n\n4. Display\n\nIterate multiple calls to capture all of the results.\n\nuntil count >= result.size\n count = result.size\n response = api.send(method, account, result.last, what, [limit, 100].max)\n abort response.error.message if !!response.error\n result += response.result.map(&elem)\n result = result.uniq\nend\n\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/19_get_follower_and_following_list\nbundle install\nruby get_follow.rb" + } + + + + + + + , + + "tutorials-ruby-get-post-comments": { + "id": "tutorials-ruby-get-post-comments", + "title": "RB: Get Post Comments", + "category": "tutorials-ruby", + "description": "This example will output the reply details and totals for the post/comment passed as an argument to the script.", + "type": "", + "url": "/tutorials-ruby/get_post_comments", + "content": "Full, runnable src of Get Post Comments can be downloaded as part of the RB tutorials repository.\n\n\nScript\n\nFirst, 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.\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/07_get_post_comments\nbundle install\nruby comments_list.rb https://steemit.com/steem/@steemitblog/dev-portal-update-new-steem-developer-resources\n\n\nExample Output\n\nReplies by:\n\tshahabshah\n\tmumin007\n\tbigblueleadsled\n\treseller\n\tlatikasha\n\tdannywill\n\tsteemitag\n\tsequentialvibe\n\txplosive\n\twhatsup\n\tevolved08gsr\n\tsteevc\n\tmightymicke\n\tmarc0o\n\takintunde\n\toliverlai\n\tzufrizal\n\tbitcointravel\n\tvsf\n\tbadribireuen\nTotal replies: 20" + } + + + + + + + , + + "tutorials-ruby-get-post-details": { + "id": "tutorials-ruby-get-post-details", + "title": "RB: Get Post Details", + "category": "tutorials-ruby", + "description": "Understand and use the most common fields of the requested content.", + "type": "", + "url": "/tutorials-ruby/get_post_details", + "content": "Full, runnable src of Get Post Details can be downloaded as part of the RB tutorials repository.\n\n\nIntro\n\nThis tutorial fetches the contents of a single post and explains all data related to that post.\n\nWe will also describe the most commonly used fields from the response object.\n\nSections\n\n\n Making the api call - Use steem-rb to a specific post\n \n Example api call - make the call in code\n Example api call using script - using our tutorial script\n Example Output - output from a successful call\n \n \n Post Fields - General use of the method to determine …\n \n parent_author - if the content is a root post or reply\n last_update and created - if the content has been modified\n cashout_time - if the content has reached payout\n beneficiaries - reward routes other accounts\n active_votes - all votes applied\n json_metadata - things like tags and app\n \n \n Script - Delving into the example script.\n To Run - Running the example.\n\n\nMaking the api call\n\nTo request a specific post we use the get_content method:\n\napi = Radiator::Api.new\n\napi.get_content(author, permlink) do |content|\n # .\n # ... your code here\n # .\nend\n\n\nExample api call\nIf we want to get the post “announcing-the-steem-developer-portal” by user @steemitdev\napi.get_content(\"steemitdev\", \"announcing-the-steem-developer-portal\") do |content| ...\n\n\nExample api call using script\nAnd to do the same with our tutorial script\nruby get_post_details.rb https://steemit.com/steemdev/@steemitdev/announcing-the-steem-developer-portal\n\n\nExample Output\n\nFrom the example we get the following output from our script\n\nPost by steemitdev\n\ttitle: Announcing the Steem Developer Portal!\n\tpermlink: announcing-the-steem-developer-portal\n\tcategory: steemdev\n\tbody_length: 2342 (381 words)\n\tposted at: 2017-10-30T16:34:27, updated at: 2017-10-30T16:34:27, active at: 2018-04-11T10:34:00\n\tchildren: 66\n\tnet_rshares: 0\n\tvote_rshares: 0\n\tpayout:\n\t\tmax_accepted_payout: 0.000 SBD\n\t\tpercent_steem_dollars: 100.00 %\n\t\tpayout at: 2017-11-06T16:34:27 (235.2 days ago)\n\t\tauthor_rewards: 0.000 SBD\n\t\tcurator_payout_value: 0.000 SBD\n\t\ttotal_payout_value: 0.000 SBD\n\tpromoted: 0.000 SBD\n\ttotal_vote_weight: 0\n\treward_weight: 100.00 %\n\tnet_votes: 181, upvotes: 234, downvotes: 1, unvotes: 0, total: 235, top voter: thejohalfiles\n\tallow_replies: true\n\tallow_votes: true\n\tallow_curation_rewards: true\n\tauthor_reputation: 14487360227924\n\ttags: steemdev, steem, dev\n\tapp: steemit/0.1\n\n\nPost fields\n\nMost 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:\n\nparent_author\n\nIn our script (get_post_details.rb), we use the ruby statement:\n\ncontent.parent_author.empty?\n\n\nWith 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.\n\nOnce 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.\n\nlast_update and created\n\nIn our script, we use the ruby statement:\n\ncontent.last_update == content.created\n\n\nWith 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.\n\ncashout_time\n\nIn our script, we use the ruby statement:\n\n(cashout = Time.parse(content.cashout_time + 'Z') - Time.now.utc) > 0\n\n\nWith 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.\n\nYou 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.\n\nEven before payout, you can determine what the max_accepted_payout is. Most often, this is set to one of two values by the author:\n\n\n 1000000.000 SBD - Accepted Payout\n 0.000 SBD - Declined Payout\n\n\nIn 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:\n\n\n 10000 - Maximum Liquid Reward\n 0 - STEEM Power Only\n\n\nOnce 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.\n\nbeneficiaries\n\nIn our script, we use the ruby statement:\n\ncontent.beneficiaries.any?\n\n\nSome 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.\n\nTo display a list of who the beneficiaries are, use the following ruby code, as seen in the example:\n\ncontent.beneficiaries.each do |beneficiary|\n puts \"\\t\\t#{beneficiary.account}: #{'%.2f %' % (beneficiary.weight / 100.0)}\"\nend\n\n\nNote, if you just want an array of beneficiary account names, this will work in a pinch:\n\naccounts = content.beneficiaries.map do |beneficiary|\n beneficiary.account\nend\n\n\nactive_votes\n\nIn our script, we use the ruby statements:\n\nvotes = content.active_votes\nupvotes = votes.select { |v| v.percent > 0 }.size\ndownvotes = votes.select { |v| v.percent < 0 }.size\nunvotes = votes.select { |v| v.percent == 0 }.size\ntop_voter = votes.sort_by { |v| v.rshares.to_i }.last.voter\n\n\nThe 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).\n\njson_metadata\n\nIn our script, we use the ruby statements:\n\nmetadata = JSON[content.json_metadata || '{}'] rescue {}\ntags = metadata['tags'] || []\napp = metadata['app']\n\n\nAs 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.\n\nNote, 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.\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\n*<content-url>\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/05_get_post_details\nbundle install\nruby get_post_details.rb <content-url>" + } + + + + + + + , + + "tutorials-ruby-get-posts": { + "id": "tutorials-ruby-get-posts", + "title": "RB: Get Posts", + "category": "tutorials-ruby", + "description": "This example will output posts depending on which category is provided as the arguments.", + "type": "", + "url": "/tutorials-ruby/get_posts", + "content": "Full, runnable src of Get Posts can be downloaded as part of the RB tutorials repository.\n\n\nScript\n\nCreate a filed called get_posts_by_category.rb.\n\nThis script will pick a method to call based on the arguments passed. The expected categories are:\n\n\n trending\n hot\n active\n created\n votes\n promoted\n children\n\n\nWe 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: ''.\n\nFor each post we retrieve, we are going to build up a summary to display the interesting fields. In this case, we’re interested in:\n\n\n Creation Timestamp\n Title\n Author\n Net Votes\n Number of replies\n If it’s promoted\n Number of words in the body\n Canonical URL\n\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/04_get_posts\nbundle install\nruby get_posts_by_category.rb trending 1 steem\n\n\nExample Output\n\n2018-05-24 06:38:33 UTC\n Post: New Phone App For Steemit - Wow!\n By: happymoneyman\n Votes: 1087\n Replies: 332\n Promoted: 0.001 SBD\n Words: 190\n https://steemit.com/steemit/@happymoneyman/new-phone-app-for-steemit-wow\n\n\nError Handling\n\nWe’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." + } + + + + + + + , + + "tutorials-ruby-get-voters-list-on-post": { + "id": "tutorials-ruby-get-voters-list-on-post", + "title": "RB: Get Voters List On Post", + "category": "tutorials-ruby", + "description": "This example will output the active vote totals for the post/comment passed as an argument to the script.", + "type": "", + "url": "/tutorials-ruby/get_voters_list_on_post", + "content": "Full, runnable src of Get Voters List On Post can be downloaded as part of the RB tutorials repository.\n\n\nScript\n\nFirst, 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).\n\nThen, we sort the votes by rshares to find the top voter.\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/06_get_voters_list_on_post\nbundle install\nruby voter_list.rb https://steemit.com/steemdev/@steemitdev/announcing-the-steem-developer-portal\n\n\nExample Output\n\nUpvotes: 231\nDownvotes: 1\nUnvotes: 0\nTotal: 232\nTop Voter: thejohalfiles" + } + + + + + + + , + + "tutorials-ruby-getting-started": { + "id": "tutorials-ruby-getting-started", + "title": "RB: Getting Started", + "category": "tutorials-ruby", + "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).", + "type": "", + "url": "/tutorials-ruby/getting_started", + "content": "Full, runnable src of Getting Started can be downloaded as part of the RB tutorials repository.\n\n\nSetup\n\nThe following is a minimal Gemfile for running .rb files in these examples.\n\nAdd gem 'radiator' to your Gemfile. Then install the gem:\n\nbundle install\n\n\nIt is also possible to install radiator directly with gem:\n\ngem install radiator\n\n\nThen, to execute a script without a Gemfile, add to the top of your .rb files:\n\nrequire 'radiator'\n\n\nThen, use the ruby command with radiator specified:\n\nruby -r radiator myscript.rb\n\n\nExamples\n\nThe 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.\n\nFrom there, you can see all of the .rb files referenced on this site.\n\ngit clone https://github.com/steemit/devportal.git\ncd devportal/_includes/tutorials-ruby/\nbundle install\n\n\nTypical-Usage\n\nMost 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.\n\nRadiator also internally supports failover by specifying the failover_urls option.\n\nTo use the defaults:\n\napi = Radiator::Api.new\n\n\nTo override the url option:\n\napi = Radiator::Api.new(url: 'https://rpc.steemliberator.com')\n\n\nTo override both url and failover_urls options:\n\noptions = {\n url: 'https://rpc.steemliberator.com',\n failover_urls: [\n 'https://gtg.steem.house:8090',\n 'https://steemd.minnowsupportproject.org',\n 'https://steemd.privex.io',\n ]\n}\napi = Radiator::Api.new(options)\n\n\nNext Step\n\nIf you’d like to dive right into the first tutorial, have a look at: Blog Feed" + } + + + + + + + , + + "tutorials-ruby-reblogging-post": { + "id": "tutorials-ruby-reblogging-post", + "title": "RB: Reblogging Post", + "category": "tutorials-ruby", + "description": "To reblog ('resteem') a post, we can use a custom json operation that is handled by the follow plugin.", + "type": "", + "url": "/tutorials-ruby/reblogging_post", + "content": "Full, runnable src of Reblogging Post can be downloaded as part of the RB tutorials repository.\n\n\nFor 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.\n\nSections\n\n\n Making the api call - broadcasting the operation\n \n Example api call - make the call in code\n Example api call using script - using our tutorial script\n Example Output - output from a successful call\n Example Error - error output from a unsuccessful call\n \n \n Custom JSON Fields - understanding the result\n To Run - Running the example.\n\n\nMaking the api call\n\nTo broadcast the operation, we can use a Radiator::Transaction instance:\n\ntx = Radiator::Transaction.new\n\n\ntx.process(true)\n\n\nPassing true to Radiator::Transaction#process will broadcast the operations queued in the operations array of the transaction.\n\nExample api call\n\nIf we want to reblog, we need to form the json properly, for example:\n\ndata = [\n :reblog, {\n account: reblogger,\n author: author,\n permlink: permlink\n }\n]\n\ntx.operations << {\n type: :custom_json,\n id: 'follow',\n required_auths: [],\n required_posting_auths: [reblogger],\n json: data.to_json\n}\n\n\nExample api call using script\n\nAnd to do the same with our tutorial script:\n\nruby reblogging_post.rb https://steemit.com/@inertia/kinda-spooky\n\n\nExample Output\n\nFrom the example we get the following output from our script:\n\n{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"id\": \"0aa41e06b2612315d32cadeb671eb1201f266dd7\",\n \"block_num\": 24063620,\n \"trx_num\": 19,\n \"expired\": false\n },\n \"id\": 3\n}\n\n\nThe response we get after broadcasting the transaction gives us the transaction id (0aa41e0...), block number (24063620), and the transaction number of that block (19).\n\nExample Error\n\nIf a post has already been reblogged by the account, we will get back an error:\n\n{\n \"jsonrpc\": \"2.0\",\n \"error\": {\n \"code\": -32000,\n \"message\": \"Assert Exception:blog_itr == blog_comment_idx.end(): Account has already reblogged this post\",\n \"data\": {\n \"code\": 10,\n \"name\": \"assert_exception\",\n \"message\": \"Assert Exception\",\n \"stack\": [\n {\n \"context\": {\n \"level\": \"error\",\n \"file\": \"follow_evaluators.cpp\",\n \"line\": 143,\n \"method\": \"do_apply\",\n \"hostname\": \"\",\n \"timestamp\": \"2018-07-10T21:33:11\"\n },\n \"format\": \"blog_itr == blog_comment_idx.end(): Account has already reblogged this post\",\n \"data\": {\n }\n },\n {\n \"context\": {\n \"level\": \"warn\",\n \"file\": \"follow_evaluators.cpp\",\n \"line\": 216,\n \"method\": \"do_apply\",\n \"hostname\": \"\",\n \"timestamp\": \"2018-07-10T21:33:11\"\n },\n \"format\": \"\",\n \"data\": {\n \"o\": {\n \"account\": \"social\",\n \"author\": \"inertia\",\n \"permlink\": \"kinda-spooky\"\n }\n }\n },\n {\n \"context\": {\n \"level\": \"warn\",\n \"file\": \"generic_custom_operation_interpreter.hpp\",\n \"line\": 195,\n \"method\": \"apply\",\n \"hostname\": \"\",\n \"timestamp\": \"2018-07-10T21:33:11\"\n },\n \"format\": \"\",\n \"data\": {\n \"outer_o\": {\n \"required_auths\": [\n\n ],\n \"required_posting_auths\": [\n \"social\"\n ],\n \"id\": \"follow\",\n \"json\": \"[\\\"reblog\\\",{\\\"account\\\":\\\"social\\\",\\\"author\\\":\\\"inertia\\\",\\\"permlink\\\":\\\"kinda-spooky\\\"}]\"\n }\n }\n },\n {\n \"context\": {\n \"level\": \"warn\",\n \"file\": \"database.cpp\",\n \"line\": 3221,\n \"method\": \"_apply_transaction\",\n \"hostname\": \"\",\n \"timestamp\": \"2018-07-10T21:33:11\"\n },\n \"format\": \"\",\n \"data\": {\n \"op\": {\n \"type\": \"custom_json_operation\",\n \"value\": {\n \"required_auths\": [\n\n ],\n \"required_posting_auths\": [\n \"social\"\n ],\n \"id\": \"follow\",\n \"json\": \"[\\\"reblog\\\",{\\\"account\\\":\\\"social\\\",\\\"author\\\":\\\"inertia\\\",\\\"permlink\\\":\\\"kinda-spooky\\\"}]\"\n }\n }\n }\n },\n {\n \"context\": {\n \"level\": \"warn\",\n \"file\": \"database.cpp\",\n \"line\": 3227,\n \"method\": \"_apply_transaction\",\n \"hostname\": \"\",\n \"timestamp\": \"2018-07-10T21:33:11\"\n },\n \"format\": \"\",\n \"data\": {\n \"trx\": {\n \"ref_block_num\": 12404,\n \"ref_block_prefix\": 1445149887,\n \"expiration\": \"2018-07-10T21:43:09\",\n \"operations\": [\n {\n \"type\": \"custom_json_operation\",\n \"value\": {\n \"required_auths\": [\n\n ],\n \"required_posting_auths\": [\n \"social\"\n ],\n \"id\": \"follow\",\n \"json\": \"[\\\"reblog\\\",{\\\"account\\\":\\\"social\\\",\\\"author\\\":\\\"inertia\\\",\\\"permlink\\\":\\\"kinda-spooky\\\"}]\"\n }\n }\n ],\n \"extensions\": [\n\n ],\n \"signatures\": [\n \"1c063e22868f107dbafaa0452d86cfe19894f2f7fc3ea46b5c73dc7906edcd88244548f001c1d128aa07f862819e80e2f46b6cd74c6769d1d48ef4ad1f147b4dab\"\n ]\n }\n }\n },\n {\n \"context\": {\n \"level\": \"warn\",\n \"file\": \"database.cpp\",\n \"line\": 788,\n \"method\": \"push_transaction\",\n \"hostname\": \"\",\n \"timestamp\": \"2018-07-10T21:33:11\"\n },\n \"format\": \"\",\n \"data\": {\n \"trx\": {\n \"ref_block_num\": 12404,\n \"ref_block_prefix\": 1445149887,\n \"expiration\": \"2018-07-10T21:43:09\",\n \"operations\": [\n {\n \"type\": \"custom_json_operation\",\n \"value\": {\n \"required_auths\": [\n\n ],\n \"required_posting_auths\": [\n \"social\"\n ],\n \"id\": \"follow\",\n \"json\": \"[\\\"reblog\\\",{\\\"account\\\":\\\"social\\\",\\\"author\\\":\\\"inertia\\\",\\\"permlink\\\":\\\"kinda-spooky\\\"}]\"\n }\n }\n ],\n \"extensions\": [\n\n ],\n \"signatures\": [\n \"1c063e22868f107dbafaa0452d86cfe19894f2f7fc3ea46b5c73dc7906edcd88244548f001c1d128aa07f862819e80e2f46b6cd74c6769d1d48ef4ad1f147b4dab\"\n ]\n }\n }\n }\n ]\n }\n },\n \"id\": 3\n}\n\n\nThis indicates that the operation was not included in the blockchain because it was already reblogged in the past.\n\nCustom JSON Fields\n\nBroadcasting a custom_json operation will require the following fields:\n\n\n id - set to follow to indicate that this operation is handled by the follow_plugin\n required_auths - leave this as an empty JSON Array, we only need the posting authority\n required_posting_auths - JSON Array containing the account name with the posting authority\n json - the actual payload of the operation, containing a JSON Array:\n \n First element - reblog\n Second element - JSON Object containing:\n \n account - account that is doing the reblog op\n author - author of the post being reblogged\n permlink - permlink of the post being reblogged\n \n \n \n \n\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\n\n <url>\n\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/14_reblogging_post\nbundle install\nruby reblogging_post.rb <url>" + } + + + + + + + , + + "tutorials-ruby-search-accounts": { + "id": "tutorials-ruby-search-accounts", + "title": "RB: Search Accounts", + "category": "tutorials-ruby", + "description": "Performing a search on account by names starting with a given input.", + "type": "", + "url": "/tutorials-ruby/search_accounts", + "content": "Full, runnable src of Search Accounts can be downloaded as part of the RB tutorials repository.\n\n\nThis tutorial will return account names matching the input given, up to a specified limit.\n\nSections\n\n\n Making the api call - performing the lookup\n \n Example api call - make the call in code\n Example api call using script - using our tutorial script\n Example Output - output from a successful call\n \n \n To Run - Running the example.\n\n\nMaking the api call\n\nTo request the a list of accounts starting with a particular lookup pattern, we can use the lookup_accounts method:\n\napi = Radiator::Api.new\n\napi.lookup_accounts(lower_bound_name, limit) do |accounts|\n puts accounts.join(' ')\nend\n\n\nNotice, the above example can request up to 1000 accounts as an array.\n\nExample api call\n\nIf we want to get the accounts starting with “alice” …\n\napi.lookup_accounts(\"alice\", 10) do |content| ...\n\n\nExample api call using script\n\nAnd to do the same with our tutorial script, which has its own default limit of 10:\n\nruby search_accounts.rb alice\n\n\nExample Output\n\nFrom the example we get the following output from our script:\n\nalice alice-22 alice-is alice-labardo alice-mikhaylova alice-n-chains alice-radster alice-sandra alice-thuigh alice-way\n\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\n\n <lower-bound-name>\n [limit] (optional)\n\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/15_search_accounts\nbundle install\nruby search_accounts.rb <lower-bound-name> [limit]" + } + + + + + + + , + + "tutorials-ruby-search-tags": { + "id": "tutorials-ruby-search-tags", + "title": "RB: Search Tags", + "category": "tutorials-ruby", + "description": "Performing a search for tags.", + "type": "", + "url": "/tutorials-ruby/search_tags", + "content": "Full, runnable src of Search Tags can be downloaded as part of the RB tutorials repository.\n\n\nThis tutorial will return tags sorted by trending, up to a specified limit.\n\nSections\n\n\n Making the api call - performing the lookup\n \n Example api call - make the call in code\n Example api call using script - using our tutorial script\n Example Output - output from a successful call\n Tag Fields - details of fields returned\n \n \n To Run - Running the example.\n\n\nMaking the api call\n\nTo request the a list of tags, we can use the get_trending_tags method:\n\napi = Radiator::Api.new\n\napi.get_trending_tags(nil, 100) do |tags|\n puts tags\nend\n\n\nNotice, the above example can request up to 100 tags as an array.\n\nExample api call\n\nIf we want to get 10 tags starting from the tag named “music” …\n\napi.get_trending_tags(\"music\", 10) do |content| ...\n\n\nExample api call using script\n\nAnd 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:\n\nruby search_tags.rb\n\n\nExample Output\n\nFrom the example we get the following output from our script:\n\ntag: <empty>, total_payouts: 57513246.041 SBD, net_votes: 47471936, top_posts: 4523493, comments: 27287924, trending: 100430269400\ntag: life, total_payouts: 12563434.550 SBD, net_votes: 10898489, top_posts: 1193059, comments: 1164873, trending: 7440962326\ntag: photography, total_payouts: 7529111.644 SBD, net_votes: 8578110, top_posts: 819008, comments: 1498469, trending: 7311205387\ntag: kr, total_payouts: 2953387.067 SBD, net_votes: 749380, top_posts: 79842, comments: 2138776, trending: 7009078414\ntag: steemit, total_payouts: 8531217.920 SBD, net_votes: 5393375, top_posts: 580400, comments: 1156174, trending: 5471456871\ntag: art, total_payouts: 4017591.434 SBD, net_votes: 3577651, top_posts: 330597, comments: 716566, trending: 3302526197\ntag: bitcoin, total_payouts: 3556944.650 SBD, net_votes: 2885034, top_posts: 416088, comments: 625529, trending: 3284115413\ntag: introduceyourself, total_payouts: 1863437.063 SBD, net_votes: 725570, top_posts: 24891, comments: 986875, trending: 3185017448\ntag: spanish, total_payouts: 1221282.258 SBD, net_votes: 2683931, top_posts: 154983, comments: 827033, trending: 3103643123\ntag: travel, total_payouts: 3976626.578 SBD, net_votes: 2505962, top_posts: 229401, comments: 622754, trending: 2687292306\n\n\nTag fields\n\nTags in the results of get_trending_tags returns the following fields:\n\n\n name - Name of the tag or empty.\n total_payouts - Rewards paid in this tag.\n net_votes - Net votes in this tag.\n top_posts - Top votes in this tag.\n comments - Number of comments in this tag.\n trending - Total trending.\n\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\n\n [limit] (optional)\n\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/16_search_tags\nbundle install\nruby search_tags.rb [limit]" + } + + + + + + + , + + "tutorials-ruby-stream-blockchain-transactions": { + "id": "tutorials-ruby-stream-blockchain-transactions", + "title": "RB: Stream Blockchain Transactions", + "category": "tutorials-ruby", + "description": "*How to stream transactions and operations from Steem blockchain.*", + "type": "", + "url": "/tutorials-ruby/stream_blockchain_transactions", + "content": "Full, runnable src of Stream Blockchain Transactions can be downloaded as part of the RB tutorials repository.\n\n\nTo 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.\n\nSections\n\n\n Streaming Transactions\n Streaming Operations\n To Run - Running the example.\n\n\nStreaming Transactions\n\nIn the example script, we can stream transactions with the following arguments:\n\nruby stream_blockchain_transactions.rb head transactions\n\n\nThis will instruct the script to follow transactions at head block_num instead of irreversible.\n\nSee: head_block_number vs. last_irreversible_block_num\n\nThis is done by using the following ruby:\n\nstream.transactions(*args) do |trx|\n puts JSON.pretty_generate trx\nend\n\n\nThe args variable contains the start (block_num to start from) and mode (head or irreversible).\n\nStreaming Operations\n\nIn the example script, we can also pass the following arguments:\n\nruby stream_blockchain_transactions.rb head ops comment\n\n\nThis will instruct the script to follow the blockchain at head block_num instead of irreversible. It will stream operations, with the type of comment.\n\nThe script will allow multiple operation types:\n\nruby stream_blockchain_transactions.rb head ops comment vote\n\n\nVirtual operations are also allowed, but make sure to pass irreversible instead of head:\n\nruby stream_blockchain_transactions.rb irreversible ops producer_reward author_reward\n\n\nOr, if you pass no operation types, the script will stream all types:\n\nruby stream_blockchain_transactions.rb head ops\n\n\nThis is done by using the following ruby:\n\nstream.operations(type, *args) do |op|\n puts op.to_json\nend\n\n\nThe 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).\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/13_stream_blockchain_transactions\nbundle install\nruby stream_blockchain_transactions.rb\n\n\nExample Output\n\n{\"voter\":\"piggypet\",\"author\":\"tanama\",\"permlink\":\"daily-2018-9-12\",\"weight\":10000}\n{\"voter\":\"votes4minnows\",\"author\":\"askquestion\",\"permlink\":\"latest-bitcoin-price-and-news-update-13-09-2018\",\"weight\":250}\n{\"voter\":\"vncedora2018\",\"author\":\"adncabrera\",\"permlink\":\"nicomedescuentalacadadelreytanospoema-98jxnjsjzu\",\"weight\":10000}\n{\"voter\":\"baimatjeh81\",\"author\":\"albertvhons\",\"permlink\":\"promoting-steemit-post-via-proof-of-participation-pop\",\"weight\":10000}\n{\"voter\":\"steemulator\",\"author\":\"bonanza-kreep\",\"permlink\":\"communicate-and-travel-with-alfa-enzo-new-social-network\",\"weight\":10000}\n{\"voter\":\"kernigeetrueset\",\"author\":\"haejin\",\"permlink\":\"vitamin-shoppe-vsi-analysis\",\"weight\":10000}\n{\"voter\":\"borrowedearth\",\"author\":\"rijalmahyud\",\"permlink\":\"this-is-my-job\",\"weight\":10000}\n{\"voter\":\"renatdag\",\"author\":\"algarion\",\"permlink\":\"cards-3-1536663927\",\"weight\":10000}\n{\"voter\":\"elieserurabno\",\"author\":\"cathyhaack\",\"permlink\":\"my-introduction-hello-word-of-steemit\",\"weight\":10000}\n{\"voter\":\"jmotip\",\"author\":\"glennolua\",\"permlink\":\"btc-chart-review-sept-12-20-00-pst\",\"weight\":10000}\n{\"voter\":\"bishalacharya\",\"author\":\"barber78\",\"permlink\":\"beautiful-cloudformations\",\"weight\":10000}\n{\"voter\":\"ivan174\",\"author\":\"securixio\",\"permlink\":\"cloud-mining-is-no-longer-profitable\",\"weight\":10000}\n{\"voter\":\"admiralbot\",\"author\":\"homsys\",\"permlink\":\"rare-photo-picture-698-105\",\"weight\":-10000}" + } + + + + + + + , + + "tutorials-ruby-submit-comment-reply": { + "id": "tutorials-ruby-submit-comment-reply", + "title": "RB: Submit Comment Reply", + "category": "tutorials-ruby", + "description": "_By the end of this tutorial you should know how to prepare comments for Steem and then submit using Radiator._", + "type": "", + "url": "/tutorials-ruby/submit_comment_reply", + "content": "Full, runnable src of Submit Comment Reply can be downloaded as part of the RB tutorials repository.\n\n\nIntro\n\nThis 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.\n\nA 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).\n\nScript\n\nYou should change wif to the posting key that matches your author. This script will pass along the values as a comment operation:\n\n\n author - Account name of the author currently replying.\n permlink - Value unique to the author\n parent_author - The name of the author of the being replied to, in the case of a reply like this example.\n parent_permlink - The permlink of the content being replied to, in the case of a reply like this example.\n title - Typically empty.\n body - The actual content of the post.\n json_metadata - JSON containing the parent_permlink of the root post as a tags array.\n\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/11_submit_comment_reply\nbundle install\nruby submit_comment_reply.rb\n\n\nExample Output\n\n{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"id\": \"3fef14cac921e9baa7b31e43245e5380f3fb4332\",\n \"block_num\": 23355115,\n \"trx_num\": 13,\n \"expired\": false\n },\n \"id\": 3\n}\n\n\nThe response we get after broadcasting the transaction gives us the transaction id (3fef14c...), block number (22867626), and the transaction number of that block (13).\n\nError Handling\n\nWe’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." + } + + + + + + + , + + "tutorials-ruby-submit-post": { + "id": "tutorials-ruby-submit-post", + "title": "RB: Submit Post", + "category": "tutorials-ruby", + "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.", + "type": "", + "url": "/tutorials-ruby/submit_post", + "content": "Full, runnable src of Submit Post can be downloaded as part of the RB tutorials repository.\n\n\nA 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.\n\nScript\n\nYou should change wif to the posting key that matches your author. This script will pass along the values as a comment operation:\n\n\n author - Account name of the author currently posting.\n permlink - Value unique to the author\n parent_author - An empty string, in the case of a root post like this example.\n parent_permlink - The first tag, in the case of a root post like this example.\n title - Human readable title.\n body - The actual content of the post.\n json_metadata - JSON containing all of the tags.\n\n\nTo Run\n\nFirst, set up your workstation using the steps provided in Getting Started. Then you can create and execute the script (or clone from this repository):\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/10_submit_post\nbundle install\nruby submit_a_new_post.rb\n\n\nExample Output\n\n{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"id\": \"768f7f64cee94413da0017ef79f592bb4da86baf\",\n \"block_num\": 22867626,\n \"trx_num\": 43,\n \"expired\": false\n },\n \"id\": 1\n}\n\n\nThe response we get after broadcasting the transaction gives us the transaction id (768f7f6...), block number (22867626), and the transaction number of that block (43).\n\nError Handling\n\nWe’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." + } + + + + + + + , + + "tutorials-ruby-vote-on-content": { + "id": "tutorials-ruby-vote-on-content", + "title": "RB: Vote On Content", + "category": "tutorials-ruby", + "description": "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).", + "type": "", + "url": "/tutorials-ruby/vote_on_content", + "content": "Full, runnable src of Vote On Content can be downloaded as part of the RB tutorials repository.\n\n\nSections\n\n\n Making the api call - broadcasting the operation\n \n Example api call - make the call in code\n Example api call using script - using our tutorial script\n Example Output - output from a successful call\n Example Error - error output from a unsuccessful call\n \n \n Vote Fields - understanding the result\n To Run - Running the example.\n\n\nMaking the api call\n\nTo broadcast the operation, we can use a Radiator::Transaction instance:\n\ntx = Radiator::Transaction.new\n\n\ntx.process(true)\n\n\nPassing true to Radiator::Transaction#process will broadcast the operations queued in the operations array of the transaction.\n\nExample api call\n\nIf we want to vote, for example:\n\ntx.operations << {\n type: :vote,\n voter: voter,\n author: author,\n permlink: permlink,\n weight: weight\n}\n\n\nExample api call using script\n\nAnd to do the same with our tutorial script:\n\nruby vote_on_content.rb https://steemit.com/@inertia/kinda-spooky\n\n\nExample Output\n\nFrom the example we get the following output from our script:\n\n{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"id\": \"244a67bf1e64f05fb2ab52a0652a8edd30c5d273\",\n \"block_num\": 27035223,\n \"trx_num\": 15,\n \"expired\": false\n },\n \"id\": 3\n}\n\n\nThe response we get after broadcasting the transaction gives us the transaction id (244a67b...), block number (27035223), and the transaction number of that block (15).\n\nNote, this script accepts accepts an optional percentage (defaulting 100.0 %). To set the vote to 50.0 %:\n\nruby vote_on_content.rb https://steemit.com/@inertia/kinda-spooky 50\n\n\nExample Error\n\nIf an invalid vote weight is given (e.g.: 101 %), we will get back an error:\n\n{\n \"jsonrpc\": \"2.0\",\n \"error\": {\n \"code\": -32000,\n \"message\": \"Assert Exception:abs(weight) <= STEEM_100_PERCENT: Weight is not a STEEMIT percentage\",\n \"data\": {\n \"code\": 10,\n \"name\": \"assert_exception\",\n \"message\": \"Assert Exception\",\n \"stack\": [\n {\n \"context\": {\n \"level\": \"error\",\n \"file\": \"steem_operations.cpp\",\n \"line\": 179,\n \"method\": \"validate\",\n \"hostname\": \"\",\n \"timestamp\": \"2018-10-22T16:09:50\"\n },\n \"format\": \"abs(weight) <= STEEM_100_PERCENT: Weight is not a STEEMIT percentage\",\n \"data\": {\n }\n },\n {\n \"context\": {\n \"level\": \"warn\",\n \"file\": \"database.cpp\",\n \"line\": 3491,\n \"method\": \"_apply_transaction\",\n \"hostname\": \"\",\n \"timestamp\": \"2018-10-22T16:09:50\"\n },\n \"format\": \"\",\n \"data\": {\n \"trx\": {\n \"ref_block_num\": 34171,\n \"ref_block_prefix\": 1240848906,\n \"expiration\": \"2018-10-22T16:19:48\",\n \"operations\": [\n {\n \"type\": \"vote_operation\",\n \"value\": {\n \"voter\": \"social\",\n \"author\": \"inertia\",\n \"permlink\": \"kinda-spooky\",\n \"weight\": 10100\n }\n }\n ],\n \"extensions\": [\n\n ],\n \"signatures\": [\n \"1c50556b312dd71446621fc3b509da3f5596ab20e8846edd7e55ce5fb13f51742c77d1ab021afa43e039ed2655f28beb1859924ddc6db1087742f3e63e4bc2502b\"\n ]\n }\n }\n },\n {\n \"context\": {\n \"level\": \"warn\",\n \"file\": \"database.cpp\",\n \"line\": 817,\n \"method\": \"push_transaction\",\n \"hostname\": \"\",\n \"timestamp\": \"2018-10-22T16:09:50\"\n },\n \"format\": \"\",\n \"data\": {\n \"trx\": {\n \"ref_block_num\": 34171,\n \"ref_block_prefix\": 1240848906,\n \"expiration\": \"2018-10-22T16:19:48\",\n \"operations\": [\n {\n \"type\": \"vote_operation\",\n \"value\": {\n \"voter\": \"social\",\n \"author\": \"inertia\",\n \"permlink\": \"kinda-spooky\",\n \"weight\": 10100\n }\n }\n ],\n \"extensions\": [\n\n ],\n \"signatures\": [\n \"1c50556b312dd71446621fc3b509da3f5596ab20e8846edd7e55ce5fb13f51742c77d1ab021afa43e039ed2655f28beb1859924ddc6db1087742f3e63e4bc2502b\"\n ]\n }\n }\n }\n ]\n }\n },\n \"id\": 3\n}\n\n\nThis indicates that the operation was not included in the blockchain because it was given an invalid weight argument.\n\nVote Fields\n\nBroadcasting a vote operation will require the following fields:\n\n\n voter - account that is doing the vote op\n author - author of the post being voted for\n permlink - permlink of the post being voted for\n weight - percentage of one vote being cast, expressed as an integer (e.g.: 100.0 % = 10000)\n\n\nTo Run\n\nFirst, 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:\n\n\n <url> - the URL to vote on\n [weight] - the weight of the vote as percentage, optional (default 100.0 %)\n\n\ngit clone git@github.com:steemit/devportal-tutorials-rb.git\ncd devportal-tutorials-rb/tutorials/17_vote_on_content\nbundle install\nruby vote_on_content.rb <url> [weight]" + } + + + + + + }; + + + + + + +
        + + + + + + + + \ No newline at end of file diff --git a/docs/services/imageHoster.html b/docs/services/imageHoster.html index 0ddfd33a..18c30a37 100644 --- a/docs/services/imageHoster.html +++ b/docs/services/imageHoster.html @@ -1,390 +1,415 @@ + - - - - - - - - - - - - - - - -ImageHoster | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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:

        - -
        {
        +    
        +

        + + 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.

        +

        For this to succeed it requires a signature from a Steem account in good standing.

        -

        2. Fetch an uploaded image

        +

        2. Fetch an uploaded image + +

        -

        GET /<image_hash>/<filename>

        +

        GET /<image_hash>/<filename>

        -

        This downloads a previously uploaded image.

        +

        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)

        +

        <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

        +

        3. Proxy and resize an image + +

        -

        GET /<width>x<hight>/<image_url>

        +

        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.

        +

        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.

        +

        <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

        +

        4. Get user avatar image + +

        -

        GET /u/<username>/avatar/<size>

        +

        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.

        +

        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 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

        +

        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

        +

        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.

        +

        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:

        +

        Creating a signature for node.js and with dsteem:

        -
        const dsteem = require('dsteem')
        +        
        +
        const dsteem = require('dsteem')
         const crypto = require('crypto')
         const fs = require('fs')
         
        @@ -403,45 +428,47 @@ 

        5. Signing uploads

        .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

        - -
        - - +
        +
        + +

        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

        + + + + - + - + \ No newline at end of file diff --git a/docs/services/index.html b/docs/services/index.html index 1494a085..8b181bbe 100644 --- a/docs/services/index.html +++ b/docs/services/index.html @@ -1,339 +1,350 @@ + - - - - - - - - - - - - - - - -Services | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Services | Steem Developer + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal - Services

        - - - -
        - - - - -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal - Services

        + + + +
        + + + + +
        +

        + Steemit.com -

        - +

        + -

        steemit.com endpoints

        +

        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.

        +

        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:

        +

        Getting a particular user profile JSON:

        -
        https://steemit.com/@curie.json
        -
        +
        +
        https://steemit.com/@curie.json
        +
        +
        -

        User object

        -
        {
        +            

        User object

        +
        +
        {
            "user":{
               "id":81544,
               "name":"curie",
        @@ -424,15 +435,19 @@ 

        steemit.com endpoints

        }, "status":"200" } -
        +
        +
        -

        Getting a particular post JSON:

        +

        Getting a particular post JSON:

        -
        https://steemit.com/curation/@curie/the-daily-curie-12-13-feb-2017.json
        -
        +
        +
        https://steemit.com/curation/@curie/the-daily-curie-12-13-feb-2017.json
        +
        +
        -

        Post object

        -
        {
        +            

        Post object

        +
        +
        {
            "post":{
               "id":1720643,
               "author":"curie",
        @@ -474,115 +489,123 @@ 

        steemit.com endpoints

        "total_pending_payout_value":"0.000 SBD" } } -
        - -
        - -
        -

        - - SteemConnect +

        + + + + +
        +

        + + SteemLogin -

        - + -

        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.

        +

        What is SteemLogin?

        -

        How SteemConnect is implemented

        +

        The goal of SteemLogin 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 SteemLogin nor the authorised app store the private keys as the posting key is incrypted on your cookie.

        -

        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.

        +

        How SteemLogin is implemented

        -

        Steem Authorisation and OAuth 2

        +

        SteemLogin 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.

        -

        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:

        +

        Steem Authorisation and OAuth 2

        -
          -
        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. -
        +

        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:

        -

        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.

        +
          +
        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. +
        -

        Useful Links

        +

        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 SteemLogin + can be found here.

        - +

        Useful Links

        -

        For additional material you can refer to the original steemit blog post by busy.org

        + -
        - -
        -

        - +

        For additional material you can refer to the original steemit blog post by busy.org

        + +

        + +
        +

        + Jussi -

        - -

        A reverse proxy that forwards json-rpc requests.

        - + + +

        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).

        +

        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.

        +

        The purpose of this document is to help developers and node operators set up their own jussi node within a docker container.

        -

        Intro

        +

        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.

        +

        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

        +

        Sections

        - + -

        Installation

        +

        Installation

        -
        To run jussi locally:
        +
        To run jussi locally:
        -
        git clone https://github.com/steemit/jussi.git
        +            
        +
        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.

        +

        Kitematic Example + jussi in a docker container as seen from Kitematic for macOS.

        -
        Try out your local configuration:
        +
        Try out your local configuration:
        -
        curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[8675309], "id":1}' http://localhost:9000
        -
        +
        +
        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

        +

        See: Running Condenser, Jussi and a new service locally + adding feature flags to Condenser

        -
        +
        -

        Adding Upstreams

        +

        Adding Upstreams

        -

        The default DEV_config.json is:

        +

        The default DEV_config.json is:

        -
        {
        +            
        +
        {
            "limits":{"blacklist_accounts":["non-steemit"]},
            "upstreams":[
               {
        @@ -637,246 +660,260 @@ 

        Adding Upstreams} ] } -

        +
        +
        -

        Upstreams can be added to the upstreams array:

        +

        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:

        - -
        {
        +
        +
        + +

        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:

        +

        … 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.

        +

        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

        +

        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.

        +

        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.

        +

        Note that retrying broadcast methods is not recommended, which is why the example explicitly sets steemd.network_broadcast_api to 0.

        -

        json-rpc batch

        +

        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 ([{}]).

        +

        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:

        +

        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
        -
        +
        +
        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":{
        @@ -898,14 +935,18 @@ 

        json-rpc batch< ] } } -

        +
        +
        -

        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:

        +

        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
        -
        +
        +
        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
        +
        +
        -
        -

        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.

        +

        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
        -
        +
        +
        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
        +
        +
        -
        -

        Footnotes

        +

        Footnotes

        - + -
        +
        -

        Latin

        +

        Latin

        -
        -
        jussi
        +            
        +
        +
        jussi
         
         noun
         
        @@ -1066,96 +1113,113 @@ 

        Footnotes -

        - +

        +
        +
        + +
        + +
        +

        + 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.

        +

        Definition

        -

        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.

        +

        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.

        -

        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 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.

        -

        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.

        +

        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.

        -

        Detaied information on Imagehoster can be found in its repository

        +

        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.

        -

        The API

        +

        Detaied information on Imagehoster can be found in its repository

        -

        Below are examples of how to process images with the API

        +

        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. -
        +

        Below are examples of how to process images with the API

        -

        1. Upload an image

        +
          +
        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. +
        -

        POST /<username>/<signature>

        +

        1. Upload an image + +

        -

        This returns a JSON object container the URL to the uploaded image, ex:

        +

        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.

        +

        For this to succeed it requires a signature from a Steem account in good standing.

        -

        2. Fetch an uploaded image

        +

        2. Fetch an uploaded image + +

        -

        GET /<image_hash>/<filename>

        +

        GET /<image_hash>/<filename>

        -

        This downloads a previously uploaded image.

        +

        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)

        +

        <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

        +

        3. Proxy and resize an image + +

        -

        GET /<width>x<hight>/<image_url>

        +

        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.

        +

        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.

        +

        <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

        +

        4. Get user avatar image + +

        -

        GET /u/<username>/avatar/<size>

        +

        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.

        +

        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 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

        +

        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

        +

        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.

        +

        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:

        +

        Creating a signature for node.js and with dsteem:

        -
        const dsteem = require('dsteem')
        +            
        +
        const dsteem = require('dsteem')
         const crypto = require('crypto')
         const fs = require('fs')
         
        @@ -1174,92 +1238,104 @@ 

        5. Signing uploads

        .digest() process.stdout.write(key.sign(imageHash).toString() + '\n') -
        +
        +
        + +

        6. How to run + +

        -

        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

        -

        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

          +
        • +
        -
          -
        • -

          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.

        -

        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.
        • +
        -
          -
        • 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>

        -

        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

        -

        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.

        +

        sbds is a tool for easily querying the data of the Steem Blockchain.

        -

        Docker Hub

        +

        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 run -d steemit/sbds
        -
        +

        Docker Hub

        -

        Python 3

        -
        pip3 install -e git+git@github.com:steemit/sbds.git#egg=sbds
        -
        +
        +
        docker run -d steemit/sbds
        +
        +
        -

        Examples

        +

        Python 3

        +
        +
        pip3 install -e git+git@github.com:steemit/sbds.git#egg=sbds
        +
        +
        -

        Stream blocks 1 to 3450000 from our dev S3 bucket

        -
        sbds checkpoints get-blocks s3://steemit-dev-sbds-checkpoints/gzipped --start 1 --end 3450000
        -
        +

        Examples

        -

        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 blocks 1 to 3450000 from our dev S3 bucket

        +
        +
        sbds checkpoints get-blocks s3://steemit-dev-sbds-checkpoints/gzipped --start 1 --end 3450000
        +
        +
        -

        Stream all blocks from your local copy of our S3 bucket

        +

        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
        +
        +
        -
        sbds checkpoints get-blocks /home/ubuntu/checkpoints/gzipped
        -
        +

        Stream all blocks from your local copy of our S3 bucket

        -

        Routes

        +
        +
        sbds checkpoints get-blocks /home/ubuntu/checkpoints/gzipped
        +
        +
        -

        Coming soon.

        +

        Routes

        -
        - +

        Coming soon.

        + - - - + + + + + - + - + \ No newline at end of file diff --git a/docs/services/jussi.html b/docs/services/jussi.html index 61249761..03615333 100644 --- a/docs/services/jussi.html +++ b/docs/services/jussi.html @@ -1,365 +1,380 @@ + - - - - - - - - - - - - - - - -Jussi | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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
        +    
        +

        + + 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.

        +

        Kitematic Example + jussi in a docker container as seen from Kitematic for macOS.

        -
        Try out your local configuration:
        +
        Try out your local configuration:
        -
        curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[8675309], "id":1}' http://localhost:9000
        -
        +
        +
        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

        +

        See: Running Condenser, Jussi and a new service locally + adding feature flags to Condenser

        -
        +
        -

        Adding Upstreams

        +

        Adding Upstreams

        -

        The default DEV_config.json is:

        +

        The default DEV_config.json is:

        -
        {
        +        
        +
        {
            "limits":{"blacklist_accounts":["non-steemit"]},
            "upstreams":[
               {
        @@ -414,246 +429,260 @@ 

        Adding Upstreams} ] } -

        +
        +
        -

        Upstreams can be added to the upstreams array:

        +

        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:

        - -
        {
        +
        +
        + +

        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:

        +

        … 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.

        +

        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

        +

        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.

        +

        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.

        +

        Note that retrying broadcast methods is not recommended, which is why the example explicitly sets steemd.network_broadcast_api to 0.

        -

        json-rpc batch

        +

        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 ([{}]).

        +

        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:

        +

        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
        -
        +
        +
        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":{
        @@ -675,14 +704,18 @@ 

        json-rpc batch< ] } } -

        +
        +
        -

        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:

        +

        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
        -
        +
        +
        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
        +
        +
        -
        -

        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.

        +

        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
        -
        +
        +
        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
        +
        +
        -
        -

        Footnotes

        +

        Footnotes

        - + -
        +
        -

        Latin

        +

        Latin

        -
        -
        jussi
        +        
        +
        +
        jussi
         
         noun
         
        @@ -843,21 +882,22 @@ 

        Footnotes - Back to top -

        - +
        +
        +
        + +
        + + - + - + \ No newline at end of file diff --git a/docs/services/sbds.html b/docs/services/sbds.html index 8e12279e..bb09f632 100644 --- a/docs/services/sbds.html +++ b/docs/services/sbds.html @@ -1,358 +1,377 @@ + - - - - - - - - - - - - - - - -SBDS | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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.

        - -
        - - +
        +

        + + 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.

        + +
        + + - + - + \ No newline at end of file diff --git a/docs/services/steemconnect.html b/docs/services/steemconnect.html index eae4f1a4..fa86c803 100644 --- a/docs/services/steemconnect.html +++ b/docs/services/steemconnect.html @@ -1,358 +1,368 @@ + - - - - - - - - - - - - - - - -SteemConnect | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + SteemLogin | 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

        - -
        - - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +

        What is SteemLogin?

        + +

        The goal of SteemLogin 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 SteemLogin nor the authorised app store the private keys as the posting key is incrypted on your cookie.

        + +

        How SteemLogin is implemented

        + +

        SteemLogin 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 SteemLogin + can be found here.

        + +

        Useful Links

        + + + +

        For additional material you can refer to the original steemit blog post by busy.org

        + +
        + + - + - + \ No newline at end of file diff --git a/docs/services/steemit.html b/docs/services/steemit.html index bd728fb8..31ed8ed1 100644 --- a/docs/services/steemit.html +++ b/docs/services/steemit.html @@ -1,326 +1,337 @@ + - - - - - - - - - - - - - - - -Steemit.com | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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

        -
        {
        +    
        +

        + + 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",
        @@ -411,15 +422,19 @@ 

        steemit.com endpoints

        }, "status":"200" } -
        +
        +
        -

        Getting a particular post JSON:

        +

        Getting a particular post JSON:

        -
        https://steemit.com/curation/@curie/the-daily-curie-12-13-feb-2017.json
        -
        +
        +
        https://steemit.com/curation/@curie/the-daily-curie-12-13-feb-2017.json
        +
        +
        -

        Post object

        -
        {
        +        

        Post object

        +
        +
        {
            "post":{
               "id":1720643,
               "author":"curie",
        @@ -461,20 +476,21 @@ 

        steemit.com endpoints

        "total_pending_payout_value":"0.000 SBD" } } -
        - -
        - - +
        +
        + + + + - + - + \ No newline at end of file diff --git a/docs/sitemap.xml b/docs/sitemap.xml index cf87a1bf..49b6526f 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -113,7 +113,7 @@ 2018-11-15T17:18:46-06:00 -https://developers.steem.io/resources/steem_connect_libs +https://developers.steem.io/resources/steem_login_libs 2018-11-15T17:18:46-06:00 @@ -133,7 +133,7 @@ 2018-11-15T17:18:46-06:00 -https://developers.steem.io/services/steemconnect +https://developers.steem.io/services/steemlogin 2018-11-15T17:18:46-06:00 @@ -261,7 +261,7 @@ 2018-11-15T17:18:46-06:00 -https://developers.steem.io/tutorials-javascript/steemconnect +https://developers.steem.io/tutorials-javascript/steemlogin 2018-11-15T17:18:46-06:00 diff --git a/docs/testnet/index.html b/docs/testnet/index.html index c83f0d14..0d05299a 100644 --- a/docs/testnet/index.html +++ b/docs/testnet/index.html @@ -1,408 +1,435 @@ + - - - - - - - - - - - - - - - -Steem Testnet | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Steem Testnet | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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

        +

        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.

        -

        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.

        +

        Running Testnet

        -

        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.

        +

        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.

        -

        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.

        +

        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.

        -

        Testnet has the following parameters by default (as of this writing):

        +

        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.

        -
          -
        • 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
        • -
        +

        Testnet has the following parameters by default (as of this writing):

        -

        There are a number of other subtle changes that we don’t need to focus on right now.

        +
          +
        • 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
        • +
        -

        Live testnet

        +

        There are a number of other subtle changes that we don’t need to focus on right now.

        -
          -
        • ChainID: 46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32
        • -
        • Address prefix: TST
        • -
        • API node: https://testnet.steemitdev.com
        • -
        +

        Live testnet

        -

        Anyone can join the Live testnet and start testing their node and applications, become a witness, and provide API (RPC) node for public use.

        +
          +
        • ChainID: 46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32
        • +
        • Address prefix: TST
        • +
        • API node: https://testnet.steemitdev.com
        • +
        -

        Custom Testnet

        +

        Anyone can join the Live testnet and start testing their node and applications, become a witness, and provide API (RPC) node for public use.

        -

        In order to create a custom testnet, separate from the development one, we need to modify a few parameters mentioned in the previous section.

        +

        Custom Testnet

        -

        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.

        +

        In order to create a custom testnet, separate from the development one, we need to modify a few parameters mentioned in the previous section.

        -

        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.

        +

        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.

        -

        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.

        +

        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.

        -

        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.

        +

        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.

        -

        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:

        +

        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.

        -

        void database::init_genesis( uint64_t init_supply ) inside try add this line:

        +

        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:

        -

        set_hardfork( 19, true );

        +

        void database::init_genesis( uint64_t init_supply ) inside try add this line:

        -

        This would mean that 19 hardforks have been accepted by witnesses and the new chain will start with all previous forks included.

        +

        set_hardfork( 19, true );

        -

        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.

        +

        This would mean that 19 hardforks have been accepted by witnesses and the new chain will start with all previous forks included.

        -

        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.

        +

        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.

        -

        Custom live testnet

        +

        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.

        -
          -
        • ChainID: 79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673
        • -
        • Address prefix: STX
        • -
        • API node: https://testnet.steem.vc
        • -
        +

        Custom live testnet

        -

        The above testnet is powered by community member @almost-digital and doesn’t have a snapshot of the main network.

        +
          +
        • 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.

        -
        - - + + + + + - + - + \ No newline at end of file diff --git a/docs/testnet/tools.html b/docs/testnet/tools.html index 8af8538b..df6b22ef 100644 --- a/docs/testnet/tools.html +++ b/docs/testnet/tools.html @@ -1,354 +1,363 @@ + - - - - - - - - - - - - - - - -Tools | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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.
        - - -
        - - +
        +

        + + 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.
        + + +
        + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/account_reputation.html b/docs/tutorials-javascript/account_reputation.html index f2f9e541..d0f1abce 100644 --- a/docs/tutorials-javascript/account_reputation.html +++ b/docs/tutorials-javascript/account_reputation.html @@ -1,351 +1,372 @@ + - - - - - - - - - - - - - - - -JS: Account Reputation | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Account Reputation | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        - - -
        - - + + + +

        That’s it!

        + +

        To run this tutorial

        + +
          +
        1. clone this repo
        2. +
        3. cd tutorials/20_account_reputation
        4. +
        5. npm i
        6. +
        7. npm i
        8. +
        9. npm run dev-server or npm run start
        10. +
        11. After a few moments, the server should be running at http://localhost:3000/
        12. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/blog_feed.html b/docs/tutorials-javascript/blog_feed.html index 9024c8bc..2fb07d62 100644 --- a/docs/tutorials-javascript/blog_feed.html +++ b/docs/tutorials-javascript/blog_feed.html @@ -1,376 +1,406 @@ + - - - - - - - - - - - - - - - -JS: Blog Feed | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Blog Feed | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        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

        +

        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

        +

        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

        +

        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 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

        +

        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 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:

        +

        In first couple lines we require package and define connection server:

        -
        const { Client } = require('dsteem');
        +            
        +
        const { Client } = require('dsteem');
         
         const client = new Client('https://api.steemit.com');
        -
        +
        +
        -

        2. Query format

        +

        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
        • -
        +
          +
        • 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 = {
        +            
        +
        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

        +

        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 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
        +            
        +
            client.database
                 .getDiscussions('blog', query)
                 .then(result => {
                     var posts = [];
        @@ -390,11 +420,13 @@ 

        3. Fetch data and formatJSON object with the following properties:

        +

        The result returned form the service is a JSON object with the following properties:

        -
        -

        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

        +

        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.

        +

        That’s all there is to it.

        -

        To Run the tutorial

        +

        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. -
        +
          +
        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. +
        -
        +
        -

        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/claim_rewards.html b/docs/tutorials-javascript/claim_rewards.html index 793c90a2..3baeb8d5 100644 --- a/docs/tutorials-javascript/claim_rewards.html +++ b/docs/tutorials-javascript/claim_rewards.html @@ -1,351 +1,372 @@ + - - - - - - - - - - - - - - - -JS: Claim Rewards | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Claim Rewards | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        Learn how to claim rewards from unclaimed reward balance using Steemlogin 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.

        +

        Full, runnable src of Claim Rewards can be downloaded + as part of the JS tutorials repository. +

        -

        Intro

        +

        This tutorial runs on the main Steem blockchain. And accounts queried are real users with unclaimed balances.

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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 Steemlogin or Client signing options
        8. +
        -

        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:

        +

        1. App setup + +

        -
        const dsteem = require('dsteem');
        +            

        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';
        @@ -353,22 +374,31 @@ 

        1. App setup

        '0000000000000000000000000000000000000000000000000000000000000000'; //connect to server which is connected to the network/production const client = new dsteem.Client('https://api.steemit.com'); -
        +
        +
        -

        2. Search account

        +

        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:

        +

        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 accSearch = document.getElementById('username').value;
             const _accounts = await client.database.call('get_accounts', [[accSearch]]);
             console.log(`_accounts:`, _accounts);
        -
        +
        +
        -

        3. Fill form

        +

        3. Fill form + +

        -

        After we fetched account data, we will fill form with reward balance and show current reward balance details.

        +

        After we fetched account data, we will fill form with reward balance and show current reward balance details.

        -
        const name = _accounts[0].name;
        +            
        +
        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];
        @@ -378,16 +408,20 @@ 

        3. Fill form

        document.getElementById('steem').value = reward_steem; document.getElementById('sbd').value = reward_sbd; document.getElementById('sp').value = reward_vests; -
        +
        +
        -

        4. Claim reward

        +

        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.

        +

        We have 2 options on how to claim rewards. Steemlogin and Client signing options. We generate Steemlogin 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.

        +

        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 () => {
        +            
        +
        window.submitTx = async () => {
             const privateKey = dsteem.PrivateKey.fromString(
                 document.getElementById('wif').value
             );
        @@ -414,36 +448,37 @@ 

        4. Claim reward

        } ); }; -
        - -

        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/client_signing.html b/docs/tutorials-javascript/client_signing.html index 9e7ac999..e44e47a4 100644 --- a/docs/tutorials-javascript/client_signing.html +++ b/docs/tutorials-javascript/client_signing.html @@ -1,404 +1,442 @@ + - - - - - - - - - - - - - - - -JS: Client Signing | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Client Signing | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Client Signing can be downloaded + as part of the JS tutorials repository. +

        -

        Purpose is to guide you through the steps required so that you could adapt this in your own applications.

        +

        This tutorial gives you overview of how client side transaction signing works under the hood.

        -

        We have predefined accounts to select for you to quickly use and few transaction types to test the process.

        +

        Purpose is to guide you through the steps required so that you could adapt this in your own applications.

        -

        Intro

        +

        We have predefined accounts to select for you to quickly use and few transaction types to test the process.

        -

        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.

        +

        Intro

        -

        Steps

        +

        Client side signing of transaction is yet another way of interacting with Steem blockchain. Compare to Steemlogin 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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        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.

        +

        1. App setup + +

        -
        opts.addressPrefix = 'TST';
        +            

        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.
        • -
        +
          +
        • 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

        +

        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.

        +

        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

        +

        Overview

        -

        3. Account selection

        +

        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.

        +

        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(
        +            
        +
        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.

        +

        Account and its credentials should belong to specified testnet/mainnet network to sign/verify/broadcast transactions properly.

        -

        4. Operation selection

        +

        4. Operation selection + +

        -

        Number of operations are also predefined to show you example of operation format. opChange also keeps selected operation name in memory.

        +

        Number of operations are also predefined to show you example of operation format. opChange also keeps selected operation name in memory.

        -

        5. Generate transaction

        +

        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:

        +

        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
        • -
        +
          +
        • 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

        +

        Vote operation example

        -
        op = {
        +            
        +
        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),
        @@ -410,56 +448,65 @@ 

        5. Generate transaction

        +
        +
        -

        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.

        +

        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.

        +

        And output of operation object/json is set to OpInput element.

        -

        6. Sign and verify transaction

        +

        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.

        +

        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)

        +

        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.

        +

        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)

        +

        const rv = await client.database.verifyAuthority(stx)

        -

        7. Broadcast transaction

        +

        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.

        +

        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)

        +

        const res = await client.broadcast.send(stx)

        -

        That’s it!

        +

        That’s it!

        -

        To Run the tutorial

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/convert_sbd_to_steem.html b/docs/tutorials-javascript/convert_sbd_to_steem.html index ba56639d..65bfcc69 100644 --- a/docs/tutorials-javascript/convert_sbd_to_steem.html +++ b/docs/tutorials-javascript/convert_sbd_to_steem.html @@ -1,392 +1,424 @@ + - - - - - - - - - - - - - - - -JS: Convert Sbd To Steem | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Convert Sbd To Steem | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + JS: Convert Sbd To Steem -

        - -

        How to convert SBD to STEEM for a specified account.

        +

        + +

        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.

        +

        Full, runnable src of Convert Sbd To Steem can + be downloaded as part of the JS tutorials repository. +

        -

        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.

        +

        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.

        -

        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

        +

        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.

        -

        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

        +

        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

        -

        Intro

        +

        Steemlogin 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://steemlogin.com/sign/convert?owner=username&requestid=1234567&amount=0.000%20SBD This is similar to the steemlogin + links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://steemlogin.com/sign + This article has more information on using steemlogin

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        The only other information required is the private active key of the user.

        +
          +
        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. +
        -

        Steps

        +

        The only other information required is the private active key of the user.

        -
          -
        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. -
        +

        Steps

        -

        1. Configure connection

        +
          +
        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. +
        -

        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:

        +

        1. Configure connection + +

        -
        import { Client, PrivateKey } from 'dsteem';
        +            

        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.

        +

        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

        +

        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.

        +

        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 () => {
        +            
        +
        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.

        +

        With the account search function as seen below.

        -
        window.submitAcc = async () => {
        +            
        +
        window.submitAcc = async () => {
             const accSearch = document.getElementById('username').value;
         
             const _account = await client.database.call('get_accounts', [[accSearch]]);
        @@ -402,13 +434,17 @@ 

        2. User account

        var x = Math.floor(Math.random() * 10000000); document.getElementById("requestID").value = x } -
        +
        +
        -

        3. Input variables

        +

        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.

        +

        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 all values from the UI
         //get account name
         const username = document.getElementById('username').value;
         //get private active key
        @@ -421,13 +457,17 @@ 

        3. Input variables

        const convert = quantity.concat(' SBD'); //assign integer value of ID const requestid = parseInt(document.getElementById('requestID').value); -
        +
        +
        -

        4. Broadcast operation

        +

        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.

        +

        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
        +            
        +
        //create convert operation
         const op = [
             'convert',
             { owner: username, amount: convert, requestid: requestid },
        @@ -453,36 +493,37 @@ 

        4. Broadcast operationdocument.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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/create_account.html b/docs/tutorials-javascript/create_account.html index 127dd0e5..cccdf730 100644 --- a/docs/tutorials-javascript/create_account.html +++ b/docs/tutorials-javascript/create_account.html @@ -1,351 +1,377 @@ + - - - - - - - - - - - - - - - -JS: Create Account | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Create Account | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        - - -
        - - + + + +

        That’s it!

        + +

        To run this tutorial

        + +
          +
        1. clone this repo
        2. +
        3. cd tutorials/26_create_account
        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/delegate_power.html b/docs/tutorials-javascript/delegate_power.html index 94e7c769..2553e9d1 100644 --- a/docs/tutorials-javascript/delegate_power.html +++ b/docs/tutorials-javascript/delegate_power.html @@ -1,351 +1,373 @@ + - - - - - - - - - - - - - - - -JS: Delegate Power | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Delegate Power | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + JS: Delegate Power -

        - -

        Delegate power to other users using Steemconnect or Client-side signing.

        +

        + +

        Delegate power to other users using Steemlogin 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.

        +

        Full, runnable src of Delegate Power can be downloaded + as part of the JS tutorials repository. +

        -

        Intro

        +

        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.

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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 Steemlogin or Client-side signing.
        8. +
        -

        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:

        +

        1. App setup + +

        -
        const dsteem = require('dsteem');
        +            

        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';
        @@ -353,22 +375,33 @@ 

        1. App setup

        '0000000000000000000000000000000000000000000000000000000000000000'; //connect to server which is connected to the network/production const client = new dsteem.Client('https://api.steemit.com'); -
        +
        +
        -

        2. Search account

        +

        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:

        +

        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 accSearch = document.getElementById('username').value;
             const _account = await client.database.call('get_accounts', [[accSearch]]);
             console.log(`_account:`, _account);
        -
        +
        +
        -

        3. Calculate and Fill form

        +

        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.

        +

        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 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();
        @@ -378,18 +411,23 @@ 

        3. Calculate and Fill form 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.

        +

        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

        +

        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.

        +

        We have 2 options on how to delegate others. Steemlogin and Client-side signing options. By default we generate Steemlogin 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.

        +

        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 () => {
        +            
        +
        window.submitTx = async () => {
             const privateKey = dsteem.PrivateKey.fromString(
                 document.getElementById('wif').value
             );
        @@ -415,36 +453,37 @@ 

        4. Delegate power

        } ); }; -
        - -

        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/edit_content_patching.html b/docs/tutorials-javascript/edit_content_patching.html index 03d3db3c..5f342ec3 100644 --- a/docs/tutorials-javascript/edit_content_patching.html +++ b/docs/tutorials-javascript/edit_content_patching.html @@ -1,355 +1,377 @@ + - - - - - - - - - - - - - - - -JS: Edit Content Patching | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Edit Content Patching | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Edit Content Patching can be downloaded as part of the JS tutorials repository. +

        -

        Intro

        +

        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.

        -

        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.

        +

        Intro

        -

        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.

        +

        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.

        -

        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.

        +

        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.

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. Configure testnet

        +
          +
        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. +
        -

        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:

        +

        1. Configure testnet + +

        -
        const dsteem = require('dsteem');
        +            

        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';
        @@ -357,15 +379,20 @@ 

        1. Configure testnet'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.

        +

        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

        +

        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.

        +

        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' };
        +            
        +
        const query = { tag: 'demo', limit: '1' };
         client.database
             .call('get_discussions_by_blog', [query])
             .then(result => {
        @@ -381,15 +408,19 @@ 

        2. Get latest post

        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.

        +

        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

        +

        3. Creating patch + +

        -

        We have created a small function called createPatch to patch edits to the old content.

        +

        We have created a small function called createPatch to patch edits to the old content.

        -
        function createPatch(text, out) {
        +            
        +
        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);
        @@ -397,15 +428,19 @@ 

        3. Creating patch

        const patch = dmp.patch_toText(patch_make); return patch; } -
        +
        +
        -

        The createPatch function computes a list of patches to turn old content to edited content.

        +

        The createPatch function computes a list of patches to turn old content to edited content.

        -

        4. Submit a patch

        +

        4. Submit a patch + +

        -

        Next, we have the submitPost function, which executes when the Submit button is clicked.

        +

        Next, we have the submitPost function, which executes when the Submit button is clicked.

        -
        //get private key
        +            
        +
        //get private key
         const privateKey = dsteem.PrivateKey.fromString(
             document.getElementById('postingKey').value
         );
        @@ -467,13 +502,17 @@ 

        4. Submit a patch

        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.

        +

        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.

        +

        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
        +            
        +
        //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
        @@ -482,38 +521,40 @@ 

        4. Submit a 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.

        +

        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!

        +

        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

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/follow_a_user.html b/docs/tutorials-javascript/follow_a_user.html index 39410cec..28cdc608 100644 --- a/docs/tutorials-javascript/follow_a_user.html +++ b/docs/tutorials-javascript/follow_a_user.html @@ -1,386 +1,415 @@ + - - - - - - - - - - - - - - - -JS: Follow A User | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Follow A User | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + JS: Follow A User -

        - -

        Follow and unfollow a user / author.

        +

        + +

        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.

        +

        Full, runnable src of Follow A User can be downloaded + as part of the JS tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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: +

        -

        A simple HTML UI is used to capture the required information, after which the broadcast operation can be compiled.

        +
          +
        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. +
        -

        Steps

        +

        A simple HTML UI is used to capture the required information, after which the broadcast operation can be compiled.

        -
          -
        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. -
        +

        Steps

        -

        1. Configure connection

        +
          +
        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. +
        -

        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:

        +

        1. Configure connection + +

        -
        import { Client, PrivateKey } from 'dsteem';
        +            

        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.

        +

        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 () => {
        +            
        +
        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

        +

        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 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.

        +

        The parameter values are allocated as seen below once the user clicks on the “Follow / Unfollow” button.

        -
        window.submitFollow = async () => {
        +            
        +
        window.submitFollow = async () => {
             //get private key
             const privateKey = dsteem.PrivateKey.fromString(
                 document.getElementById('postingKey').value
        @@ -389,13 +418,18 @@ 

        2. Input variables

        const follower = document.getElementById('username').value; //get author permalink const following = document.getElementById('author').value; -
        +
        +
        -

        3. Get status

        +

        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.

        +

        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 });
        +            
        +
        console.log({ follower: follower, following: following });
         
             let status = await client.call('follow_api', 'get_following', [
                 follower,
        @@ -411,13 +445,17 @@ 

        3. Get status

        } else { type = 'blog'; } -
        +
        +
        -

        4. Follow operation

        +

        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.

        +

        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([
        +            
        +
        const json = JSON.stringify([
             'follow',
             {
                 follower: follower,
        @@ -425,21 +463,26 @@ 

        4. Follow operation

        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.

        +

        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 = {
        +            
        +
        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.

        +

        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(
        +            
        +
        client.broadcast.json(data, privateKey).then(
             function(result) {
                 console.log('user follow result: ', result);
                 document.getElementById('followResultContainer').style.display = 'flex';
        @@ -461,36 +504,38 @@ 

        4. Follow operation

        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/get_account_comments.html b/docs/tutorials-javascript/get_account_comments.html index aaa9536a..705ab9bc 100644 --- a/docs/tutorials-javascript/get_account_comments.html +++ b/docs/tutorials-javascript/get_account_comments.html @@ -1,351 +1,372 @@ + - - - - - - - - - - - - - - - -JS: Get Account Comments | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Get Account Comments | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        - - -
        - - + + + +

        We first check if content is not an empty object. We then iterate through each object in content and extract:

        + +
          +
        • parent_author
        • +
        • parent_permlink
        • +
        • and the post or comment the @steemitblog account is replying to
        • +
        + +

        We format created date and time, parse body markdown and get net_votes on that comment. Each line is then pushed and displayed + separately. +

        + +

        To Run the tutorial

        + +
          +
        1. clone this repo
        2. +
        3. cd tutorials/09_get_account_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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/get_account_replies.html b/docs/tutorials-javascript/get_account_replies.html index ef296534..b24415a5 100644 --- a/docs/tutorials-javascript/get_account_replies.html +++ b/docs/tutorials-javascript/get_account_replies.html @@ -1,352 +1,373 @@ + - - - - - - - - - - - - - - - -JS: Get Account Replies | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Get Account Replies | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        - - -
        - - + + + +

        We check if content is not an empty object and we iterate through each object via its key and extract, author, format created date and time, parse body markdown, get net_votes on that reply. Pushing each list item separately and displaying it. That’s it!

        + +

        To Run the tutorial

        + +
          +
        1. clone this repo
        2. +
        3. cd tutorials/08_get_account_replies
        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/get_delegations_by_user.html b/docs/tutorials-javascript/get_delegations_by_user.html index 5ec8818d..ae26b89d 100644 --- a/docs/tutorials-javascript/get_delegations_by_user.html +++ b/docs/tutorials-javascript/get_delegations_by_user.html @@ -1,365 +1,386 @@ + - - - - - - - - - - - - - - - -JS: Get Delegations By User | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Get Delegations By User | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Get Delegations By User can be downloaded as part of the JS tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        The second function is getExpiringVestingDelegations with 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. +
        -
          -
        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. -
        +

        The second function is getExpiringVestingDelegations with parameters:

        -

        Steps

        +
          +
        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. +
        -
          -
        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. -
        +

        Steps

        -

        1. Configure connection

        +
          +
        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. +
        -

        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:

        +

        1. Configure connection + +

        -
        const dsteem = require('dsteem');
        +            

        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';
        @@ -367,44 +388,61 @@ 

        1. Configure connection '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.

        +

        Above, we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint.

        -

        2. Input variables

        +

        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.

        +

        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.

        +

        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
        +            
        +
        //active delegations function
         window.createList = async () => {
             //clear list
             document.getElementById('delegationList').innerHTML = '';
         
             //get username
             const delegator = document.getElementById('username').value;
        -
        +
        +
        -

        3. Database query

        +

        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.

        +

        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
        +            
        +
        //active delegations function
         delegationdata = await client.database.getVestingDelegations(delegator, "", 100);
             console.log(JSON.stringify(delegationdata));
        -
        +
        +
        -
        //expiring delegations function
        +            
        +
        //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

        +

        4. Display results + +

        -

        Before the results are displayed a check is done whether there are in fact any transactions for the specific user.

        +

        Before the results are displayed a check is done whether there are in fact any transactions for the specific user.

        -
        //active delegations function
        +            
        +
        //active delegations function
         if (delegationdata[0] == null) {
             console.log('No delegation information');
             document.getElementById('searchResultContainer').style.display = 'flex';
        @@ -418,9 +456,11 @@ 

        4. Display results

        'form-control-plaintext alert alert-success'; document.getElementById('searchResult').innerHTML = 'Active Delegations'; } -
        +
        +
        -
        //expiring delegations function
        +            
        +
        //expiring delegations function
         if (delegationdata[0] == null) {
             console.log('No delegation information');
             document.getElementById('searchResultContainer').style.display = 'flex';
        @@ -434,70 +474,75 @@ 

        4. Display results

        '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 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.

        +

        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. -
        +
          +
        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
        +            
        +
        //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.

        +

        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. -
        +
          +
        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
        +            
        +
        //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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/get_follower_and_following_list.html b/docs/tutorials-javascript/get_follower_and_following_list.html index 582d3f97..157df441 100644 --- a/docs/tutorials-javascript/get_follower_and_following_list.html +++ b/docs/tutorials-javascript/get_follower_and_following_list.html @@ -1,360 +1,379 @@ + - - - - - - - - - - - - - - - -JS: Get Follower And Following List | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Get Follower And Following List | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Get Follower And Following List can be downloaded as part of the JS tutorials repository. +

        -

        Intro

        +

        This tutorial will take you through the process of calling both the follower and following functions from the STEEM API.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        A simple HTML interface is used to capture the required information after which the function is executed.

        +
          +
        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. +
        -

        Steps

        +

        A simple HTML interface is used to capture the required information after which the function is executed.

        -
          -
        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. -
        +

        Steps

        -

        1. Configure connection

        +
          +
        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. +
        -

        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:

        +

        1. Configure connection + +

        -
        const dsteem = require('dsteem');
        +            

        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';
        @@ -362,18 +381,22 @@ 

        1. Configure connection '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.

        +

        Above, we have dsteem pointing to the production network with the proper chainId, addressPrefix, and endpoint.

        -

        2. Input variables

        +

        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 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.

        +

        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
        +            
        +
        //Followers function
         window.submitFollower = async () => {
             //clear list
             document.getElementById('followList').innerHTML = '';
        @@ -384,13 +407,17 @@ 

        2. Input variables

        const startFollow = document.getElementById('startFollow').value; //get limit var limit = document.getElementById('limit').value; -
        +
        +
        -

        3. Get followers/following

        +

        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.

        +

        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
        +            
        +
        //get list of followers
         //getFollowers(following, startFollower, followType, limit)
             let followlist = await client.call('follow_api', 'get_followers', [
                 username,
        @@ -417,45 +444,50 @@ 

        3. Get followers/following document.getElementById('followResult').className = 'form-control-plaintext alert alert-success'; document.getElementById('followResult').innerHTML = 'Following'; -

        +
        +
        -

        4. Display

        +

        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.

        +

        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 => {
        +            
        +
        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/get_post_comments.html b/docs/tutorials-javascript/get_post_comments.html index db9330bc..73e99671 100644 --- a/docs/tutorials-javascript/get_post_comments.html +++ b/docs/tutorials-javascript/get_post_comments.html @@ -1,356 +1,380 @@ + - - - - - - - - - - - - - - - -JS: Get Post Comments | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Get Post Comments | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Get Post Comments can be + downloaded as part of the JS tutorials repository. +

        -

        We will also explain the most commonly used fields from the response object as well as parse body of each comment.

        +

        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.

        -

        Intro

        +

        We will also explain the most commonly used fields from the response object as well as parse body of each comment.

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        1. Fetching posts Getting trending posts
        2. -
        3. Post comments Open post and fetch comments
        4. -
        5. Query result Result of the query
        6. -
        +

        Steps

        -

        1. Fetching post

        +
          +
        1. Fetching posts Getting trending posts
        2. +
        3. Post comments Open post and fetch comments
        4. +
        5. Query result Result of the query
        6. +
        -

        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.

        +

        1. Fetching post + +

        -

        2. Post comments

        +

        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.

        -

        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.

        +

        2. Post comments + +

        -
        client.database.call('get_content_replies', [author, permlink]).then(result => {
        +            

        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(
        @@ -370,22 +394,29 @@ 

        2. Post comments

        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.

        +

        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('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.

        +

        The “go back” function simply hides and shows the post list.

        -

        3. Query result

        +

        3. Query result + +

        -

        The result is returned from the post content as a JSON object with the following properties:

        +

        The result is returned from the post content as a JSON object with the following properties:

        -
        [
        +            
        +
        [
             {
                 "id": 37338948,
                 "author": "demo",
        @@ -456,36 +487,37 @@ 

        3. Query result

        "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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/get_post_details.html b/docs/tutorials-javascript/get_post_details.html index fe931747..41c7e2d6 100644 --- a/docs/tutorials-javascript/get_post_details.html +++ b/docs/tutorials-javascript/get_post_details.html @@ -1,363 +1,387 @@ + - - - - - - - - - - - - - - - -JS: Get Post Details | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Get Post Details | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Get Post Details can be downloaded + as part of the JS tutorials repository. +

        -

        We will also explain the most commonly used fields from the response object as well as parse body of the post.

        +

        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.

        -

        Intro

        +

        We will also explain the most commonly used fields from the response object as well as parse body of the post.

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        1. Fetching posts Trending posts list
        2. -
        3. Post content Extract content of the selected post
        4. -
        5. Query result Returned data
        6. -
        +

        Steps

        -

        1. Fetching posts

        +
          +
        1. Fetching posts Trending posts list
        2. +
        3. Post content Extract content of the selected post
        4. +
        5. Query result Returned data
        6. +
        -

        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.

        +

        1. Fetching posts + +

        -
        var query = {
        +            

        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

        +

        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.

        +

        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 => {
        +            
        +
        client.database.call('get_content', [author, permlink]).then(result => {
             const md = new Remarkable({ html: true, linkify: true });
         
             const body = md.render(result.body);
        @@ -370,21 +394,28 @@ 

        2. Post content

        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.

        +

        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('postList').style.display = 'block';
         document.getElementById('postBody').style.display = 'none';
        -
        +
        +
        -

        The “go back” function simply hides and shows the post list.

        +

        The “go back” function simply hides and shows the post list.

        -

        3. Query result

        +

        3. Query result + +

        -

        The result is returned from the post content as a JSON object with the following properties:

        +

        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",
        @@ -449,85 +480,87 @@ 

        3. Query result

        "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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/get_posts.html b/docs/tutorials-javascript/get_posts.html index 534659db..42cd6e58 100644 --- a/docs/tutorials-javascript/get_posts.html +++ b/docs/tutorials-javascript/get_posts.html @@ -1,413 +1,438 @@ + - - - - - - - - - - - - - - - -JS: Get Posts | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Get Posts | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + JS: Get Posts -

        - -

        Query for the most recent posts having a specific tag, using a Steem filter

        +

        + +

        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.

        +

        Full, runnable src of Get Posts can be downloaded as part + of the JS tutorials repository. +

        -

        Intro

        +

        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.

        -

        Tags & Filters are two different.

        +

        Intro

        -

        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).

        +

        Tags & Filters are two different.

        -

        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.

        +

        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).

        -

        Steps

        +

        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. +

        -
          -
        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. -
        +

        Steps

        -

        1. UI

        +
          +
        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. +
        -

        The source HTML for our UI can be found in public/index.html

        +

        1. UI + +

        -

        There are three input components to the UI.

        +

        The source HTML for our UI can be found in public/index.html

        -
          -
        • -

          Filters: where we select one of the five built in filter types.

          +

          There are three input components to the UI.

          -

          <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)

          +
            +
          • +

            Filters: where we select one of the five built in filter types.

            -

            <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>

            -
          • -
          +

          <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)

          -

          Step-01-UI.png

          +

          <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>

          +
        • +
        -

        2. Construct query

        +

        Step-01-UI.png

        -

        The filter and query are constructed within the async, globally available function getPosts

        +

        2. Construct query + +

        -

        The limit property you see below limits the total number of posts we’ll get back to something -managable. In this case, five.

        +

        The filter and query are constructed within the async, globally available function getPosts

        -
        const filter = document.getElementById('filters').value;
        +            

        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

        +

        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.

        +

        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
        +            
        +
        client.database
             .getDiscussions(filter, query)
             .th..
        -
        +
        +
        -

        4. Handle response

        +

        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.

        +

        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)
        +            
        +
        ...ery)
         .then(result => {
                     console.log("Response received:", result);
                     if (result) {
        @@ -428,13 +453,17 @@ 

        4. Handle response document.getElementById('postList').innerHTML = "No result."; } }) -

        +
        +
        -

        5. Example post object

        +

        5. Example post object + +

        -

        The result returned from the service is a JSON list. This is an example list with one entry.

        +

        The result returned from the service is a JSON list. This is an example list with one entry.

        -
        [
        +            
        +
        [
             {
                 "id": 37338948,
                 "author": "steemitblog",
        @@ -502,36 +531,37 @@ 

        5. Example post object } ... ] -

        - -

        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/get_state_replacement_api.html b/docs/tutorials-javascript/get_state_replacement_api.html index 043cf803..3f7f79e1 100644 --- a/docs/tutorials-javascript/get_state_replacement_api.html +++ b/docs/tutorials-javascript/get_state_replacement_api.html @@ -1,353 +1,372 @@ + - - - - - - - - - - - - - - - -JS: Get State Replacement Api | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Get State Replacement Api | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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

        +

        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.

        +

        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.

        +

        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:

        +

        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. -
        +
          +
        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 getState() result:

        -
        {
        +            
        +
        {
           "current_route": "",
           "props": {
             "head_block_number": 0,
        @@ -409,31 +428,39 @@ 

        Current getState() result:

        "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:
        • -
        - -
        {
        +
        +
        + +

        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": [],
        @@ -516,29 +543,38 @@ 

        Route: getState(‘accounts’)"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:
        • -
        - -
        {
        +
        +
        + +

        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": [],
        @@ -585,60 +621,74 @@ 

        Route: getState(‘content’)< "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:
        • -
        - -
        {
        +
        +
        + +

        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
        +
        +
        + +

        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.

        +

        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:
        • -
        +
          +
        • Expected result:
        • +
        -
        {
        +            
        +
        {
           "average_block_size":122,
           "confidential_sbd_supply":"0.000 SBD",
           "confidential_supply":"0.000 STEEM",
        @@ -672,29 +722,36 @@ 

        Route: getState(‘props’)"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:
        • -
        - -
        {
        +
        +
        + +

        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,
        @@ -702,61 +759,75 @@ 

        Route: getState(‘tags’)

        "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:
        • -
        - -
        {
        +
        +
        + +

        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
        +
        +
        + +

        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.

        +

        If required you can also call the median_props values as standalone via the second function listed above.

        -
          -
        • Expected result:
        • -
        +
          +
        • Expected result:
        • +
        -
        {
        +            
        +
        {
           "account_subsidy_rd": {
             "resource_unit": 10000,
             "budget_per_time_unit": 797,
        @@ -794,29 +865,36 @@ 

        Route: getState(‘witness_schedule’)< "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:
        • -
        - -
        {
        +
        +
        + +

        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",
        @@ -845,34 +923,35 @@ 

        Route: getState(‘witnesses’)"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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/get_voters_list_on_post.html b/docs/tutorials-javascript/get_voters_list_on_post.html index 87cda57f..0e8000dc 100644 --- a/docs/tutorials-javascript/get_voters_list_on_post.html +++ b/docs/tutorials-javascript/get_voters_list_on_post.html @@ -1,363 +1,387 @@ + - - - - - - - - - - - - - - - -JS: Get Voters List On Post | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Get Voters List On Post | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Get Voters List On Post can be downloaded as part of the JS tutorials repository. +

        -

        We will also explain the most commonly used fields from the response object.

        +

        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.

        -

        Intro

        +

        We will also explain the most commonly used fields from the response object.

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. Fetching posts

        +
          +
        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. +
        -

        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.

        +

        1. Fetching posts + +

        -
        var query = {
        +            

        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

        +

        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.

        +

        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 => {
        +            
        +
        client.database.call('get_active_votes', [author, permlink]).then(result => {
             console.log('votes', result, JSON.stringify(result));
         
             var voters = [];
        @@ -374,19 +398,25 @@ 

        2. Voter information

        document.getElementById('postBody').style.display = 'block'; document.getElementById('postBody').innerHTML = voters.join('<li>'); }); -
        +
        +
        -
        document.getElementById('postList').style.display = 'block';
        +            
        +
        document.getElementById('postList').style.display = 'block';
         document.getElementById('postBody').style.display = 'none';
        -
        +
        +
        -

        The “go back” function simply hides and shows the post list.

        +

        The “go back” function simply hides and shows the post list.

        -

        3. Query result

        +

        3. Query result + +

        -

        The result is returned from the post content as a JSON object with the following properties:

        +

        The result is returned from the post content as a JSON object with the following properties:

        -
        [
        +            
        +
        [
             {
                 "voter": "gekko",
                 "weight": 157,
        @@ -404,45 +434,46 @@ 

        3. Query result

        "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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/getting_started.html b/docs/tutorials-javascript/getting_started.html index 226c2b1f..1faac147 100644 --- a/docs/tutorials-javascript/getting_started.html +++ b/docs/tutorials-javascript/getting_started.html @@ -1,386 +1,408 @@ + - - - - - - - - - - - - - - - -JS: Getting Started | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Getting Started | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + JS: Getting Started -

        - -

        Prepare your development environment to use Javascript with the Steem blockchain.

        +

        + +

        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.

        +

        Full, runnable src of Getting Started can be downloaded + as part of the JS tutorials repository. +

        -

        Node.js

        +

        For Javascript tutorials, we will use the opensource library dsteem.

        -

        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.

        +

        Node.js

        -

        Your Dev Environment

        +

        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.

        -

        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.

        +

        Your Dev Environment

        -

        If you want to keep multiple versions of Node on your system try Node Version Manager.

        +

        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. +

        -

        Running a typical Tutorial

        +

        If you want to keep multiple versions of Node on your system try Node Version Manager.

        -

        Let’s say you wanted to run the very first tutorial, 01_blog_feed. Here’s how you’d do it:

        +

        Running a typical Tutorial

        -
          -
        1. -

          From Bash:

          +

          Let’s say you wanted to run the very first tutorial, 01_blog_feed. Here’s how you’d do it:

          -
          git clone https://github.com/steemit/devportal-tutorials-js.git
          +            
            +
          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. -
          +
          +
          +
        2. +
        3. +

          open http://localhost:3000/ in your web browser

          +
        4. +
        -
        ### Github
        +            
        +
        ### Github
         
         If you'd rather clone projects in a windowed environment rather than the terminal, consider [Github Desktop](https://desktop.github.com/).
        -
        +
        +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/grant_active_permission.html b/docs/tutorials-javascript/grant_active_permission.html index 1f3dfc01..35fdde6e 100644 --- a/docs/tutorials-javascript/grant_active_permission.html +++ b/docs/tutorials-javascript/grant_active_permission.html @@ -1,400 +1,433 @@ + - - - - - - - - - - - - - - - -JS: Grant Active Permission | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Grant Active Permission | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + JS: Grant Active Permission -

        - -

        How to grant and revoke active permission to another user.

        +

        + +

        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.

        +

        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.

        +

        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.

        +

        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.

        +

        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

        +

        this article has more detail around active authorities

        -

        Intro

        +

        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:

        +

        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. -
        +
          +
        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 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.

        +

        The tutorial is set up with three individual functions for each of the required operations - checking permission status, granting permission and revoking permission.

        -

        Steps

        +

        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 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

        +

        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:

        +

        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 { 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.

        +

        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

        +

        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.

        +

        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 () => {
        +            
        +
        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.

        +

        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
        +            
        +
        //get username
         const username = document.getElementById('username').value;
         //get private active key
         const privateKey = PrivateKey.fromString(
        @@ -402,13 +435,18 @@ 

        2. Input variables

        ); //get account to provide active auth const newAccount = document.getElementById('newAccount').value; -
        +
        +
        -

        3. Database query

        +

        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.

        +

        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
        +            
        +
        //query database for active array
         var _data = new Array
         _data = await client.database.getAccounts([username]);
         const activeAuth = _data[0].active;
        @@ -423,21 +461,28 @@ 

        3. Database query

        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.

        +

        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('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

        +

        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.

        +

        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
        +            
        +
        //add account permission
         activeAuth.account_auths.push([
             newAccount,
             parseInt(activeAuth.weight_threshold)
        @@ -446,25 +491,32 @@ 

        4. Object creation

        //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.

        +

        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
        +            
        +
        //object creation
         const accObj = {
             account: username,
             json_metadata: _data[0].json_metadata,
             memo_key: _data[0].memo_key,
             active: activeAuth,
         }
        -
        +
        +
        -

        5. Broadcast operation

        +

        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.

        +

        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
        +            
        +
        //account update broadcast
         client.broadcast.updateAccount(accObj, privateKey).then(
             function(result) {
                 console.log(
        @@ -482,40 +534,42 @@ 

        5. Broadcast operationdocument.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. -
        - -
        - -
        - -
        - - + + + +

        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.

        + +

        Steemlogin 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://steemlogin.com/revoke/@username This is similar to the steemlogin links that have been covered in previous tutorials. For a list of + signing operations that work in this manner you can go to https://steemlogin.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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/grant_posting_permission.html b/docs/tutorials-javascript/grant_posting_permission.html index c20aa0b8..537d023b 100644 --- a/docs/tutorials-javascript/grant_posting_permission.html +++ b/docs/tutorials-javascript/grant_posting_permission.html @@ -1,368 +1,390 @@ + - - - - - - - - - - - - - - - -JS: Grant Posting Permission | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Grant Posting Permission | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + JS: Grant Posting Permission -

        - -

        How to grant and revoke posting permission to another user.

        +

        + +

        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.

        +

        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.

        +

        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

        +

        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:

        +

        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. -
        +
          +
        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 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.

        +

        The tutorial is set up with three individual functions for each of the required operations - checking permission status, granting permission and revoking permission.

        -

        Steps

        +

        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 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

        +

        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:

        +

        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');
        +            
        +
        const dsteem = require('dsteem');
         //define network parameters
         let opts = {};
         opts.addressPrefix = 'STX';
        @@ -370,17 +392,21 @@ 

        1. Configure connection '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.

        +

        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

        +

        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.

        +

        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.

        +

        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
        +            
        +
        //get username
         const username = document.getElementById('username').value;
         //get private active key
         const privateKey = dsteem.PrivateKey.fromString(
        @@ -388,13 +414,18 @@ 

        2. Input variables

        ); //get account to provide posting auth const newAccount = document.getElementById('newAccount').value; -
        +
        +
        -

        3. Database query

        +

        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.

        +

        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
        +            
        +
            //query database for posting array
             _data = new Array
             _data = await client.database.getAccounts([username]);
             const postingAuth = _data[0].posting;
        @@ -409,22 +440,29 @@ 

        3. Database query

        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.

        +

        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('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

        +

        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.

        +

        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
        +            
        +
        //add account permission
         postingAuth.account_auths.push([
             newAccount,
             parseInt(postingAuth.weight_threshold),
        @@ -433,25 +471,32 @@ 

        4. Object creation

        //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.

        +

        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
        +            
        +
        //object creation
         const accObj = {
             account: username,
             json_metadata: _data[0].json_metadata,
             memo_key: _data[0].memo_key,
             posting: postingAuth,
         };
        -
        +
        +
        -

        5. Broadcast operation

        +

        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.

        +

        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
        +            
        +
        //account update broadcast
         client.broadcast.updateAccount(accObj, privateKey).then(
             function(result) {
                 console.log(
        @@ -472,40 +517,41 @@ 

        5. Broadcast operationdocument.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. -
        - -
        - -
        - -
        - - + + + +

        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”.

        + +

        Steemlogin 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://steemlogin.com/revoke/@username This is similar to the steemlogin links that have been covered in previous tutorials. For a + list of signing operations that work in this manner you can go to https://steemlogin.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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/power_down.html b/docs/tutorials-javascript/power_down.html index 394beb26..30e9df7d 100644 --- a/docs/tutorials-javascript/power_down.html +++ b/docs/tutorials-javascript/power_down.html @@ -1,351 +1,372 @@ + - - - - - - - - - - - - - - - -JS: Power Down | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Power Down | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        Perform a power down on all or part of an account’s VESTS using either Steemlogin 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.

        +

        Full, runnable src of Power Down can be downloaded as + part of the JS tutorials repository. +

        -

        Intro

        +

        This tutorial runs on the main Steem blockchain. Therefore, any accounts used here will affect real funds on the live network. Use with caution.

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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 Steemlogin or client-side signing.
        8. +
        -

        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:

        +

        1. App setup + +

        -
        const dsteem = require('dsteem');
        +            

        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';
        @@ -353,32 +374,41 @@ 

        1. App setup

        '0000000000000000000000000000000000000000000000000000000000000000'; //connect to server which is connected to the network/production const client = new dsteem.Client('https://api.steemit.com'); -
        +
        +
        -

        2. Search account

        +

        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:

        +

        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 accSearch = document.getElementById('username').value;
             const _account = await client.database.call('get_accounts', [[accSearch]]);
             console.log(`_account:`, _account);
        -
        +
        +
        -

        3. Calculate and Fill form

        +

        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:

        +

        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)
        • -
        +
          +
        • 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.

        +

        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.

        +

        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 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();
        @@ -388,19 +418,24 @@ 

        3. Calculate and Fill form 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.

        +

        Once form is filled with the maximum available VESTS balance, we can choose the amount of VESTS to power down.

        -

        4. 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.

        +

        We have two options on how to Power down: Steemlogin and client-side signing. By default we generate a Steemlogin 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.

        +

        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.

        +

        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 () => {
        +            
        +
        window.submitTx = async () => {
             const privateKey = dsteem.PrivateKey.fromString(
                 document.getElementById('wif').value
             );
        @@ -425,36 +460,37 @@ 

        4. Power down

        } ); }; -
        - -

        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/power_up_steem.html b/docs/tutorials-javascript/power_up_steem.html index 73ea6adf..1f329031 100644 --- a/docs/tutorials-javascript/power_up_steem.html +++ b/docs/tutorials-javascript/power_up_steem.html @@ -1,351 +1,372 @@ + - - - - - - - - - - - - - - - -JS: Power Up Steem | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Power Up Steem | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + JS: Power Up Steem -

        - -

        Power up an account’s Steem using either Steemconnect or a client-side signing.

        +

        + +

        Power up an account’s Steem using either Steemlogin 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.

        +

        Full, runnable src of Power Up Steem can be downloaded + as part of the JS tutorials repository. +

        -

        Intro

        +

        This tutorial runs on the main Steem blockchain. And accounts queried are real users with liquid STEEM balances.

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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 Steemlogin or Client-side signing.
        8. +
        -

        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:

        +

        1. App setup + +

        -
        const dsteem = require('dsteem');
        +            

        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';
        @@ -353,37 +374,51 @@ 

        1. App setup

        '0000000000000000000000000000000000000000000000000000000000000000'; //connect to server which is connected to the network/production const client = new dsteem.Client('https://api.steemit.com'); -
        +
        +
        -

        2. Search account

        +

        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:

        +

        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 accSearch = document.getElementById('username').value;
             const _account = await client.database.call('get_accounts', [[accSearch]]);
             console.log(`_account:`, _account);
        -
        +
        +
        -

        3. Fill form

        +

        3. Fill form + +

        -

        After we fetched account data, we will fill form with STEEM balance and show current balance details.

        +

        After we fetched account data, we will fill form with STEEM balance and show current balance details.

        -
        const name = _account[0].name;
        +            
        +
        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

        +

        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.

        +

        We have 2 options on how to Power up. Steemlogin and Client-side signing options. By default we generate Steemlogin 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.

        +

        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 () => {
        +            
        +
        window.submitTx = async () => {
             const privateKey = dsteem.PrivateKey.fromString(
                 document.getElementById('wif').value
             );
        @@ -409,36 +444,37 @@ 

        4. Power up

        } ); }; -
        - -

        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/reblogging_post.html b/docs/tutorials-javascript/reblogging_post.html index ad3548a1..d18f5d06 100644 --- a/docs/tutorials-javascript/reblogging_post.html +++ b/docs/tutorials-javascript/reblogging_post.html @@ -1,362 +1,383 @@ + - - - - - - - - - - - - - - - -JS: Reblogging Post | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Reblogging Post | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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

        +

        + +

        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.

        +

        Full, runnable src of Reblogging Post can be downloaded + as part of the JS tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        • 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
        • -
        +

        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:

        -

        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.

        +
          +
        • 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
        • +
        -

        This tutorial makes use of the This function is taken from the tutorial Blog Feed to get a list of trending posts.

        +

        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.

        -

        Steps

        +

        This tutorial makes use of the This function is taken from the tutorial Blog Feed to get a list of trending posts.

        -
          -
        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. -
        +

        Steps

        -

        1. Configure connection**

        +
          +
        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. +
        -

        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:

        +

        1. Configure connection** + +

        -
        const dsteem = require('dsteem');
        +            

        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:

        + + +
        +
        -

        2. Collecting information

        +

        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.

        +

        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
        +            
        +
        //this function will execute when the HTML form is submitted
         window.submitPost = async () => {
             //get private key
             const privateKey = dsteem.PrivateKey.fromString(
        @@ -384,13 +408,17 @@ 

        2. Collecting informationconst theAuthor = document.getElementById('theAuthor').value; //get blog permLink const thePermLink = document.getElementById('thePermLink').value; -

        +
        +
        -

        3. Broadcasting the reblog

        +

        3. Broadcasting the reblog + +

        -

        Finally we create two variables to simply the client.broadcast function line and broadcast the reblog instruction.

        +

        Finally we create two variables to simply the client.broadcast function line and broadcast the reblog instruction.

        -
        const jsonOp = JSON.stringify([
        +            
        +
        const jsonOp = JSON.stringify([
             'reblog',
             {
                 account: myAccount,
        @@ -414,26 +442,29 @@ 

        3. Broadcasting the reblogconsole.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:

        +

        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:

        +

        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.

        +

        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:

        +

        If the reblog fails the console.log will present a long line of error code:

        -
        -

        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.

        +

        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

        +

        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

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/search_accounts.html b/docs/tutorials-javascript/search_accounts.html index 27e5bc84..80325916 100644 --- a/docs/tutorials-javascript/search_accounts.html +++ b/docs/tutorials-javascript/search_accounts.html @@ -1,358 +1,378 @@ + - - - - - - - - - - - - - - - -JS: Search Accounts | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Search Accounts | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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

        +

        + +

        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.

        +

        Full, runnable src of Search Accounts can be downloaded + as part of the JS tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        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.

        +
          +
        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. +
        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. Configure connection

        +
          +
        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. +
        -

        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:

        +

        1. Configure connection + +

        -
        const dsteem = require('dsteem');
        +            

        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';
        @@ -360,59 +380,72 @@ 

        1. Configure connection'0000000000000000000000000000000000000000000000000000000000000000'; //connect to server which is connected to the network/production const client = new dsteem.Client('https://api.steemit.com'); -

        +
        +
        -

        2. Collecting input variables

        +

        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.

        +

        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;
        +            
        +
        const max = 10;
         window.submitAcc = async () => {
             const accSearch = document.getElementById("username").value;
        -
        +
        +
        -

        3. Blockchain query

        +

        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.

        +

        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]);
        +            
        +
        const _accounts = await client.database.call('lookup_accounts',[accSearch, max]);
             console.log(`_accounts:`, _accounts);
        -
        +
        +
        -

        4. Output

        +

        4. Output + +

        -

        Finally we create a list from the “_accounts” array generated in step 3.

        +

        Finally we create a list from the “_accounts” array generated in step 3.

        -
        document.getElementById('accList').innerHTML = _accounts.join('<br>');
        +            
        +
        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/search_tags.html b/docs/tutorials-javascript/search_tags.html index aa997ee2..f5895cab 100644 --- a/docs/tutorials-javascript/search_tags.html +++ b/docs/tutorials-javascript/search_tags.html @@ -1,351 +1,372 @@ + - - - - - - - - - - - - - - - -JS: Search Tags | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Search Tags | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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

        +

        + +

        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.

        +

        Full, runnable src of Search Tags can be downloaded as + part of the JS tutorials repository. +

        -

        Intro

        +

        This tutorial runs on the main Steem blockchain.

        -

        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.

        +

        Intro

        -

        steps

        +

        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.

        -
          -
        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. -
        +

        steps

        -

        1. Configure connection

        +
          +
        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. +
        -

        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:

        +

        1. Configure connection + +

        -
        const dsteem = require('dsteem');
        +            

        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';
        @@ -353,31 +374,46 @@ 

        1. Configure connection '0000000000000000000000000000000000000000000000000000000000000000'; //connect to server which is connected to the network/production const client = new dsteem.Client('https://api.steemit.com'); -

        +
        +
        -

        2. Search input

        +

        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:

        +

        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;
        +            
        +
        const max = 10;
         window.submitTag = async () => {
             const tagSearch = document.getElementById("tagName").value;
        -
        +
        +
        -

        3. Run Search

        +

        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.

        +

        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]);
        -
        +
        +
        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.

        +

        The result of the search is an array of tags along with their respective vital data like comments, payouts, etc.

        -

        4. Output

        +

        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.

        +

        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);
        +            
        +
        console.log('tags: ', _tags);
         var posts = [];
         _tags.forEach(post => {
             posts.push(
        @@ -388,34 +424,35 @@ 

        4. Output

        }); //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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/set_withdraw_route.html b/docs/tutorials-javascript/set_withdraw_route.html index 3f1aaff9..0736ab32 100644 --- a/docs/tutorials-javascript/set_withdraw_route.html +++ b/docs/tutorials-javascript/set_withdraw_route.html @@ -1,351 +1,373 @@ + - - - - - - - - - - - - - - - -JS: Set Withdraw Route | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Set Withdraw Route | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + JS: Set Withdraw Route -

        - -

        Set routes to an account’s power downs or withdraws.

        +

        + +

        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.

        +

        Full, runnable src of Set Withdraw Route can be + downloaded as part of the JS tutorials repository. +

        -

        Intro

        +

        We will learn how to allocate a percentage for withdrawal to other accounts using Steemlogin 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.

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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 Steemlogin or client-side signing
        8. +
        -

        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:

        +

        1. App setup + +

        -
        const dsteem = require('dsteem');
        +            

        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';
        @@ -353,23 +375,31 @@ 

        1. App setup

        '0000000000000000000000000000000000000000000000000000000000000000'; //connect to server which is connected to the network/production const client = new dsteem.Client('https://api.steemit.com'); -
        +
        +
        -

        2. Get account routes

        +

        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:

        +

        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 accSearch = document.getElementById('username').value;
         
             const _account = await client.database.call('get_withdraw_routes', [accSearch]);
             console.log(`_account:`, _account);
        -
        +
        +
        -

        3. Fill form

        +

        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.

        +

        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 info = '';
         let sum = 0;
         if (_account.length > 0) {
             for (var i = 0; i < _account.length; i++) {
        @@ -381,27 +411,34 @@ 

        3. Fill form

        } 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.

        +

        Previous routes can be overwritten by changing and submitting a new transaction to the same account.

        -

        We also generate a Steemconnect signing link.

        +

        We also generate a Steemlogin signing link.

        -
        window.openSC = async () => {
        -    const link = `https://steemconnect.com/sign/set-withdraw-vesting-route?from_account=${
        +            
        +
        window.openSC = async () => {
        +    const link = `https://steemlogin.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

        +

        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:

        +

        We have two options on how to Power down: Steemlogin 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 () => {
        +            
        +
        window.submitTx = async () => {
             const privateKey = dsteem.PrivateKey.fromString(
                 document.getElementById('wif').value
             );
        @@ -428,36 +465,37 @@ 

        4. Set withdraw route } ); }; -

        - -

        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/steemconnect.html b/docs/tutorials-javascript/steemconnect.html index d62f77e4..c5c79a65 100644 --- a/docs/tutorials-javascript/steemconnect.html +++ b/docs/tutorials-javascript/steemconnect.html @@ -1,483 +1,519 @@ + - - - - - - - - - - - - - - - -JS: Steemconnect | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Steemlogin | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - - JS: Steemconnect +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + + JS: Steemlogin -

        - -

        Understand the basics of using Steemconnect with your Steem application.

        +

        + +

        Understand the basics of using Steemlogin 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.

        +

        Full, runnable src of Steemlogin can be downloaded as + part of the JS tutorials repository. +

        -

        Intro

        +

        In this tutorial we will setup Steemlogin for demo application and step by step show the process of setting up dedicated account for your app to use Steemlogin Dashboard and setup backend of your application to use Steemlogin authorization + properly. +

        -

        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.

        +

        Intro

        -

        Some other calls that require an access token (or login) are:

        +

        The application in this tutorial asks the user to grant an access to demo-app and get token from Steemlogin. 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.

        -
          -
        • Vote
        • -
        • Comment
        • -
        • Post
        • -
        • Follow
        • -
        • Reblog
        • -
        +

        Some other calls that require an access token (or login) are:

        -

        Learn more about Steemconnect operations here

        +
          +
        • Vote
        • +
        • Comment
        • +
        • Post
        • +
        • Follow
        • +
        • Reblog
        • +
        -

        Steps

        +

        Learn more about Steemlogin operations here

        -
          -
        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. -
        +

        Steps

        -

        1. Steemconnect Dashboard

        +
          +
        1. Steemlogin Dashboard Create account for application and set up dashboard
        2. +
        3. Initialize Steemlogin 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. +
        -

        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.

        +

        1. Steemlogin Dashboard + +

        -

        Setting up Steemconnect in your app is straight-forward process and never been this easy.

        +

        Steemlogin 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. +

        -

        Here are the steps that helps you to setup new app:

        +

        Setting up Steemlogin in your app is straight-forward process and never been this easy.

        -

        1a. Visit Steemconnect Dashboard and login with your Steem credentials

        +

        Here are the steps that helps you to setup new app:

        -

        steemconnect_login

        +

        1a. Visit Steemlogin Dashboard and login with your Steem credentials

        -

        1b. You will see Applications and Developers section, in Developers section click on My Apps

        +

        steemlogin_login

        -

        steemconnect_dashboard

        +

        1b. You will see Applications and Developers section, in Developers section click on My Apps

        -

        steemconnect_new_app

        +

        steemlogin_dashboard

        -

        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.

        +

        steemlogin_new_app

        -

        steemconnect_account_create

        +

        1c. Create New App using Steemlogin, which will help you create new Steem account for your application. Let’s call it demo-app for this tutorial purpose.

        -

        Account creation fee will be deducted from your balance, make sure you have enough funds to complete account creation.

        +

        steemlogin_account_create

        -

        Next step is to login with account which has enough balance to pay for account creation fee.

        +

        Account creation fee will be deducted from your balance, make sure you have enough funds to complete account creation.

        -

        steemconnect_signin

        +

        Next step is to login with account which has enough balance to pay for account creation fee.

        -

        1d. Give your app name, description, icon image link, website (if available) and Redirect URI(s)

        +

        steemlogin_signin

        -

        steemconnect_myapps

        +

        1d. Give your app name, description, icon image link, website (if available) and Redirect URI(s)

        -

        Application name and description should give users clear understanding what permissions it requires and what is the purpose of the app.

        +

        steemlogin_myapps

        -

        App Icon field should be publicly accessible and available link to your logo or icon.

        +

        Application name and description should give users clear understanding what permissions it requires and what is the purpose of the app.

        -

        Website field is homepage for the application if exist.

        +

        App Icon field should be publicly accessible and available link to your logo or icon.

        -

        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.

        +

        Website field is homepage for the application if exist.

        -
          -
        • Disclaimer: All images/screenshots of user interface may change as Steemconnect evolves
        • -
        +

        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 Steemlogin 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.

        -

        2. Initialize Steemconnect

        +
          +
        • Disclaimer: All images/screenshots of user interface may change as Steemlogin evolves
        • +
        -

        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

        +

        2. Initialize Steemlogin + +

        -
        -

        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

        -
        +

        Once you have setup account for new application, you can setup application with Steemlogin authentification and API processes. To do that, you will need to install steemlogin nodejs package with + npm i steemlogin. Within application you can initialize Steemlogin

        -

        Now that sc2-sdk is initialized we can start authentication and perform simple operations with 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

        +
        -

        3. Login URL

        +

        Now that steemlogin is initialized we can start authentication and perform simple operations with Steemlogin.

        -
        -

        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.

        -
        +

        3. Login URL + +

        -

        4. Request token

        +
        +

        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. +

        +
        -
        -

        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

        -
        +

        4. Request token + +

        -

        5. Set 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

        +
        -
        -

        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.

        -
        +

        5. Set token + +

        -
        -

        After getting access_token, we can set token for future Steemconnect API requests.

        -
        +
        +

        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.

        +
        -

        6. Get user data

        +
        +

        After getting access_token, we can set token for future Steemlogin API requests.

        +
        -
        -

        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.

        -
        +

        6. Get user data + +

        -

        7. Logout

        +
        +

        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.

        +
        -
        -

        In order to logout, you can use revokeToken function from sc2-sdk.

        -
        +

        7. Logout + +

        -

        That’s all there is to it.

        +
        +

        In order to logout, you can use revokeToken function from steemlogin.

        +
        -

        To Run the tutorial

        +

        That’s all there is to it.

        -
          -
        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. -
        +

        To Run the tutorial

        -
        +
          +
        1. clone this repo
        2. +
        3. cd tutorials/02_steemlogin
        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. +
        -
        +
        -
        - - + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/stream_blockchain_transactions.html b/docs/tutorials-javascript/stream_blockchain_transactions.html index 2f2dce72..1eacde94 100644 --- a/docs/tutorials-javascript/stream_blockchain_transactions.html +++ b/docs/tutorials-javascript/stream_blockchain_transactions.html @@ -1,352 +1,373 @@ + - - - - - - - - - - - - - - - -JS: Stream Blockchain Transactions | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Stream Blockchain Transactions | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Stream Blockchain Transactions can be downloaded as part of the JS tutorials repository. +

        -

        Intro

        +

        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.

        -

        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.

        +

        Intro

        -

        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.

        +

        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.

        -

        Steps

        +

        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.

        -
          -
        1. App setup Configure proper settings for dsteem
        2. -
        3. Stream blocks Stream blocks
        4. -
        5. Display result Show results in proper UI
        6. -
        +

        Steps

        -

        1. App setup

        +
          +
        1. App setup Configure proper settings for dsteem
        2. +
        3. Stream blocks Stream blocks
        4. +
        5. Display result Show results in proper UI
        6. +
        -

        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:

        +

        1. App setup + +

        -
        const dsteem = require('dsteem');
        +            

        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 = {};
         
        @@ -357,15 +378,19 @@ 

        1. App setup

        //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.

        +

        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

        +

        2. Stream blocks + +

        -

        Next, we have a main function which fires at on-load and starts streaming blocks from network.

        +

        Next, we have a main function which fires at on-load and starts streaming blocks from network.

        -
        stream = client.blockchain.getBlockStream();
        +            
        +
        stream = client.blockchain.getBlockStream();
         stream
             .on('data', function(block) {
                 //console.log(block);
        @@ -386,11 +411,13 @@ 

        2. Stream blocks

        // done console.log('END'); }); -
        +
        +
        -

        We have also defined Pause and Resume functions for relevant buttons to pause/resume stream at any moment.

        +

        We have also defined Pause and Resume functions for relevant buttons to pause/resume stream at any moment.

        -
        //pause stream
        +            
        +
        //pause stream
         window.pauseStream = async () => {
             state = stream.pause();
         };
        @@ -399,13 +426,17 @@ 

        2. Stream blocks

        window.resumeStream = async () => { state = state.resume(); }; -
        +
        +
        -

        3. Display result

        +

        3. Display result + +

        -

        In above scection, following line of code populates object with the data coming from Stream:

        +

        In above scection, following line of code populates object with the data coming from Stream:

        -
        blocks.unshift(
        +            
        +
        blocks.unshift(
             `<div class="list-group-item"><h5 class="list-group-item-heading">Block id: ${
                 block.block_id
             }</h5><p>Transactions in this block: ${
        @@ -416,11 +447,13 @@ 

        3. Display result

        block.timestamp }</p></div>` ); -
        +
        +
        -

        Example of output:

        +

        Example of output:

        -
        {
        +            
        +
        {
             block_id: "015d34f12bced299cec068500fdbf3070016160c",
             extensions:[],
             previous:"015d34f021e85b437c9fcb8cf47d9e258a1ad7e4",
        @@ -433,36 +466,37 @@ 

        3. Display result

        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/submit_comment_reply.html b/docs/tutorials-javascript/submit_comment_reply.html index f0cb9904..f43af4f1 100644 --- a/docs/tutorials-javascript/submit_comment_reply.html +++ b/docs/tutorials-javascript/submit_comment_reply.html @@ -1,355 +1,375 @@ + - - - - - - - - - - - - - - - -JS: Submit Comment Reply | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Submit Comment Reply | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Submit Comment Reply can + be downloaded as part of the JS tutorials repository. +

        -

        Intro

        +

        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.

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        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:

        +

        1. App setup + +

        -
        const dsteem = require('dsteem');
        +            

        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';
        @@ -357,32 +377,40 @@ 

        1. App setup

        '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.

        +

        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

        +

        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.

        +

        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
        -
        +
        +
        http://condenser.steem.vc/qbvxoy72qfc/@demo/dsf0yxlox2d
        +
        +
        -

        In this case. dsf0yxlox2d will be our parent permlink and @demo will be the the parent author.

        +

        In this case. dsf0yxlox2d will be our parent permlink and @demo will be the the parent author.

        -

        3. Add content

        +

        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

        +

        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

        +

        4. Get Comment Data + +

        -

        In the submitComment function, (runs when “Submit comment!” is clicked) -We gather information from the UI.

        +

        In the submitComment function, (runs when “Submit comment!” is clicked) We gather information from the UI.

        -
        //get private key
        +            
        +
        //get private key
         const privateKey = dsteem.PrivateKey.fromString(
             document.getElementById('postingKey').value
         );
        @@ -394,26 +422,33 @@ 

        4. Get Comment Data

        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.

        +

        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.

        +

        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
        +            
        +
        //generate random permanent link for post
         const permlink = Math.random()
             .toString(36)
             .substring(2);
        -
        +
        +
        -

        6. Build comment object

        +

        6. Build comment object + +

        -

        We take the information we gathered from the UI and put it into a well structured comment object.

        +

        We take the information we gathered from the UI and put it into a well structured comment object.

        -
        const comment = {
        +            
        +
        const comment = {
             author: account,
             title: '',
             body: body,
        @@ -422,14 +457,17 @@ 

        6. Build comment object< permlink: permlink, json_metadata: '', }; -

        +
        +
        -

        7. Post comment

        +

        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.

        +

        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);
        +            
        +
        console.log('comment broadcast object', comment);
         client.broadcast.comment(comment, privateKey).then(
             function(result) {
                 console.log('comment broadcast result', result);
        @@ -443,41 +481,44 @@ 

        7. Post comment

        console.error(error); } ); -
        +
        +
        -

        A successful comment will output something like the following to the console: -successful console output

        +

        A successful comment will output something like the following to the console: + successful console output

        -

        That’s all there is to it.

        +

        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

        +

        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

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/submit_post.html b/docs/tutorials-javascript/submit_post.html index 4f2239ee..c28e7070 100644 --- a/docs/tutorials-javascript/submit_post.html +++ b/docs/tutorials-javascript/submit_post.html @@ -1,351 +1,373 @@ + - - - - - - - - - - - - - - - -JS: Submit Post | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Submit Post | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Submit Post can be downloaded as + part of the JS tutorials repository. +

        -

        Intro

        +

        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.

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        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:

        +

        1. App setup + +

        -
        const dsteem = require('dsteem');
        +            

        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';
        @@ -353,13 +375,17 @@ 

        1. App setup

        '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

        +

        2. Fetch Steem Post or Comment data + +

        -

        Next, we have the submitPost function which executes when the Submit post button is clicked.

        +

        Next, we have the submitPost function which executes when the Submit post button is clicked.

        -
        //get private key
        +            
        +
        //get private key
         const privateKey = dsteem.PrivateKey.fromString(
             document.getElementById('postingKey').value
         );
        @@ -378,15 +404,19 @@ 

        2. Fetch Steem Post or Comment data< 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.

        +

        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

        +

        3. Format and Broadcast + +

        -

        The next step is to pass all of these elements in 2. to the client.broadcast.comment function.

        +

        The next step is to pass all of these elements in 2. to the client.broadcast.comment function.

        -
        //broadcast post to the testnet
        +            
        +
        //broadcast post to the testnet
         client.broadcast
             .comment(
                 {
        @@ -418,40 +448,44 @@ 

        3. Format and Broadcastconsole.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.

        +

        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.

        +

        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

        +

        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

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/transfer_steem_and_sbd.html b/docs/tutorials-javascript/transfer_steem_and_sbd.html index 2192a677..a90b5f72 100644 --- a/docs/tutorials-javascript/transfer_steem_and_sbd.html +++ b/docs/tutorials-javascript/transfer_steem_and_sbd.html @@ -1,364 +1,386 @@ + - - - - - - - - - - - - - - - -JS: Transfer Steem And Sbd | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Transfer Steem And Sbd | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + JS: Transfer Steem And Sbd -

        - -

        Transfer both STEEM and SBD from one account to another.

        +

        + +

        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.

        +

        Full, runnable src of Transfer Steem And Sbd can be downloaded as part of the JS tutorials repository. +

        -

        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.

        +

        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.

        -

        Intro

        +

        There is also an alternative method to transfer from one account to another using a hot signing link that can be generated via Steemlogin. 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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        It is noteworthy that Steem Power (VESTS) cannot be transferred with this 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. +
        -

        Steps

        +

        It is noteworthy that Steem Power (VESTS) cannot be transferred with this operation.

        -
          -
        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. -
        +

        Steps

        -

        1. Configure connection

        +
          +
        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. +
        -

        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:

        +

        1. Configure connection + +

        -
        const dsteem = require('dsteem');
        +            

        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';
        @@ -366,18 +388,22 @@ 

        1. Configure connection '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.

        +

        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

        +

        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 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.

        +

        The parameter values are allocated as seen below, once the user clicks on the “Transfer” button.

        -
        window.submitTransfer = async () => {
        +            
        +
        window.submitTransfer = async () => {
             //get all values from the UI
             //get account name of sender
             const username = document.getElementById('username').value;
        @@ -393,13 +419,17 @@ 

        2. Input variables

        const quantity = document.getElementById('quantity').value; //get transfer type const type = document.getElementById('type').value; -
        +
        +
        -

        3. Object creation

        +

        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.

        +

        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);
        +            
        +
        const transfer = quantity.concat(' ', type);
         
         //create transfer object
         const transf = new Object();
        @@ -407,13 +437,18 @@ 

        3. Object creation

        transf.to = recipient; transf.amount = transfer; transf.memo = comments; -
        +
        +
        -

        4. Broadcast

        +

        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.

        +

        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(
        +            
        +
        client.broadcast.transfer(transf, privateKey).then(
             function(result) {
                 console.log(
                     'included in block: ' + result.block_num,
        @@ -435,34 +470,35 @@ 

        4. Broadcast

        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/vote_on_content.html b/docs/tutorials-javascript/vote_on_content.html index ae4b1f3e..32ef867a 100644 --- a/docs/tutorials-javascript/vote_on_content.html +++ b/docs/tutorials-javascript/vote_on_content.html @@ -1,392 +1,415 @@ + - - - - - - - - - - - - - - - -JS: Vote On Content | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Vote On Content | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + JS: Vote On Content -

        - -

        Create a weighted up or down vote on a comment/post.

        +

        + +

        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.

        +

        Full, runnable src of Vote On Content can be downloaded + as part of the JS tutorials repository. +

        -

        To learn more about the testnet, including an easy way to create a play account, visit https://testnet.steem.vc/

        +

        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.

        -

        Intro

        +

        To learn more about the testnet, including an easy way to create a play account, visit https://testnet.steem.vc/

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        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

        +
          +
        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. +
        -

        Steps

        +

        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

        -
          -
        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. -
        +

        Steps

        -

        1. Configure connection

        +
          +
        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. +
        -

        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:

        +

        1. Configure connection + +

        -
        import { Client, PrivateKey } from 'dsteem';
        +            

        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.

        +

        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 = () => {
        +            
        +
        window.onload = () => {
             const account = NetConfig.accounts[0];
             document.getElementById('username').value = account.address;
             document.getElementById('postingKey').value = account.privPosting;
         };
        -
        +
        +
        -

        2. Create new post

        +

        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.

        +

        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
        +            
        +
        //refer to "10_submit_post" in the tutorials folder for creating a post on steemit
         //create post function
         window.createPost = async () => {
             //get private key
        @@ -442,13 +465,15 @@ 

        2. Create new post

        } ); }; -
        +
        +
        -

        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

        +

        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() {
        +            
        +
        const createPrivateKey = function() {
             try {
                 return dsteem.PrivateKey.fromString(
                     document.getElementById('postingKey').value
        @@ -460,15 +485,19 @@ 

        2. Create new post

        throw e; } }; -
        +
        +
        -

        3. Input variables

        +

        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 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.

        +

        The parameter values are allocated as seen below, once the user clicks on the “Submit” button.

        -
        window.submitVote = async () => {
        +            
        +
        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...';
        @@ -488,25 +517,32 @@ 

        3. Input variables

        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.

        +

        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

        +

        4. Broadcast + +

        -

        We create a vote object with the input variables before we can broadcast to the blockchain.

        +

        We create a vote object with the input variables before we can broadcast to the blockchain.

        -
        const vote = {
        +            
        +
        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.

        +

        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(
        +            
        +
        client.broadcast.vote(vote, privateKey).then(
                 function(result) {
                     console.log('success:', result);
                     resultEl.className = 'form-control-plaintext alert alert-success';
        @@ -527,36 +563,37 @@ 

        4. Broadcast

        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-javascript/witness_listing_and_voting.html b/docs/tutorials-javascript/witness_listing_and_voting.html index 85ea03f9..44adb2fa 100644 --- a/docs/tutorials-javascript/witness_listing_and_voting.html +++ b/docs/tutorials-javascript/witness_listing_and_voting.html @@ -1,383 +1,412 @@ + - - - - - - - - - - - - - - - -JS: Witness Listing And Voting | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + JS: Witness Listing And Voting | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Witness Listing And Voting can be downloaded as part of the JS tutorials repository. +

        -

        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.

        +

        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.

        -

        Intro

        +

        There is also an alternative method to vote for a witness using a hot signing link that can be generated via Steemlogin. 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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        Steps

        +
          +
        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. +
        -
          -
        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. -
        +

        Steps

        -

        1. Configure connection

        +
          +
        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. +
        -

        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:

        +

        1. Configure connection + +

        -
        import { Client, PrivateKey } from 'dsteem';
        +            

        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.

        +

        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 () => {
        +            
        +
        window.onload = async () => {
             const account = NetConfig.accounts[0];
             document.getElementById('username').value = account.address;
             document.getElementById('activeKey').value = account.privActive;
         };
        -
        +
        +
        -

        2. Create witness list

        +

        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.

        +

        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 () => {
        +            
        +
        window.createList = async () => {
             //get list limit
             const limit = document.getElementById('limit').value;
         
        @@ -394,15 +423,19 @@ 

        2. Create witness listdocument.getElementById('witnessList').innerHTML = witnesses.join(''); document.getElementById('witnessListContainer').style.display = 'flex'; }; -

        +
        +
        -

        3. Input variables

        +

        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 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.

        +

        The parameter values are allocated as seen below, once the user clicks on the “Submit Vote” button.

        -
        window.submitVote = async () => {
        +            
        +
        window.submitVote = async () => {
             //get all values from the UI
             //get account name of voter
             const voter = document.getElementById('username').value;
        @@ -412,13 +445,20 @@ 

        3. Input variables

        ); //get witness name const witness = document.getElementById('witness').value; -
        +
        +
        -

        4. Voting status

        +

        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.

        +

        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
        +            
        +
            //check if witness is already voted for
             _data = new Array
             _data = await client.database.getAccounts([voter]);
             const witnessvotes = _data[0]["witness_votes"];
        @@ -437,25 +477,34 @@ 

        4. Voting status

        document.getElementById("submitYesBtn").style.visibility = "visible"; document.getElementById("submitNoBtn").style.visibility = "visible"; -
        +
        +
        -

        5. Broadcast

        +

        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.

        +

        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 () => {
        +            
        +
        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.

        +

        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.

        +

        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
        +            
        +
        //broadcast the vote
         client.broadcast.sendOperations([vote], privateKey).then(
             function(result) {
                 console.log(
        @@ -477,11 +526,13 @@ 

        5. Broadcast

        ); 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.

        +

        Should the user choose to stop the process the following function is executed.

        -
        window.submitNo = async () => {
        +            
        +
        window.submitNo = async () => {
             document.getElementById('voteCheckContainer').style.display = 'flex';
             document.getElementById('voteCheck').className =
                 'form-control-plaintext alert alert-success';
        @@ -490,36 +541,37 @@ 

        5. Broadcast

        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/account_recovery.html b/docs/tutorials-python/account_recovery.html index 880a3cae..03a6bc4f 100644 --- a/docs/tutorials-python/account_recovery.html +++ b/docs/tutorials-python/account_recovery.html @@ -1,393 +1,420 @@ + - - - - - - - - - - - - - - - -PY: Account Recovery | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Account Recovery | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        - - -
        - - + + + +

        And that’s it!

        + +

        To Run the tutorial

        + +
          +
        1. review dev requirements
        2. +
        3. clone this repo
        4. +
        5. cd tutorials/35_account_recovery
        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/account_reputation.html b/docs/tutorials-python/account_reputation.html index 7bf548d7..03fe6dd5 100644 --- a/docs/tutorials-python/account_reputation.html +++ b/docs/tutorials-python/account_reputation.html @@ -1,351 +1,370 @@ + - - - - - - - - - - - - - - - -PY: Account Reputation | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Account Reputation | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        - - -
        - - + + + +

        That’s it. We have successfully interpreted reputation.

        + +

        To Run the tutorial

        + +
          +
        1. review dev requirements
        2. +
        3. clone this repo
        4. +
        5. cd tutorials/20_account_reputation
        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/claim_rewards.html b/docs/tutorials-python/claim_rewards.html index d92803b6..d88f85b7 100644 --- a/docs/tutorials-python/claim_rewards.html +++ b/docs/tutorials-python/claim_rewards.html @@ -1,366 +1,385 @@ + - - - - - - - - - - - - - - - -PY: Claim Rewards | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Claim Rewards | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Claim Rewards -

        - -

        How to claim rewards using Python.

        +

        + +

        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.

        +

        Full, runnable src of Claim Rewards can be downloaded + as part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        Steps

        +
          +
        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. +
        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 2 packages:

        +

        1. App setup + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        • pick - helps select the query type interactively
        • -
        +

        In this tutorial we use 2 packages:

        -

        We import the libraries and connect to the testnet.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        • pick - helps select the query type interactively
        • +
        -
        import steembase
        +            

        We import the libraries and connect to the testnet.

        + +
        +
        import steembase
         import steem
         from pick import pick
         from steem.amount import Amount
        @@ -369,27 +388,37 @@ 

        1. App setup

        '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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #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

        +

        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.

        +

        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
        +            
        +
        #get account reward balances
         userinfo = client.get_account(username)
         
         if(userinfo is None) :
        @@ -409,21 +438,28 @@ 

        3. Check reward balance < ) input('\n' + 'Press enter to continue to claim selection') -

        +
        +
        -

        4. Claim commit

        +

        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!

        +

        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
        +            
        +
        #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.

        +

        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
        +            
        +
        #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')
        @@ -450,15 +486,20 @@ 

        4. Claim commit

        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.

        +

        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

        +

        5. Balance update + +

        -

        As a final check we run the account query again to get updated values for the available rewards balances.

        +

        As a final check we run the account query again to get updated values for the available rewards balances.

        -
        #get updated account reward balances
        +            
        +
        #get updated account reward balances
         input("Press enter for new account balances")
         
         userinfo = client.get_account(username)
        @@ -473,37 +514,38 @@ 

        5. Balance update

        '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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/convert_sbd_to_steem.html b/docs/tutorials-python/convert_sbd_to_steem.html index df31a8e6..364d67d2 100644 --- a/docs/tutorials-python/convert_sbd_to_steem.html +++ b/docs/tutorials-python/convert_sbd_to_steem.html @@ -1,467 +1,507 @@ + - - - - - - - - - - - - - - - -PY: Convert Sbd To Steem | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Convert Sbd To Steem | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Convert Sbd To Steem -

        - -

        How to convert your SBD to STEEM using Python.

        +

        + +

        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.

        +

        Full, runnable src of Convert Sbd To Steem can + be downloaded as part of the PY tutorials repository. +

        -

        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.

        +

        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.

        -

        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

        +

        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.

        -

        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

        +

        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

        -

        Intro

        +

        Steemlogin 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://steemlogin.com/sign/convert?owner=username&requestid=1234567&amount=0.000%20SBD This is similar to the steemlogin + links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://steemlogin.com/sign + This article has more information on using steemlogin

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        Steps

        +
          +
        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. +
        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we only use 1 package:

        +

        1. App setup + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        +

        In this tutorial we only use 1 package:

        -

        We import the libraries and connect to the testnet.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        -
        import steembase
        +            

        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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #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

        +

        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.

        +

        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
        +            
        +
        #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.

        +

        The result of the query is displayed in the console/terminal.

        -

        4. Conversion amount and commit

        +

        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.

        +

        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
        +            
        +
        #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.

        +

        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
        +            
        +
        #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.

        +

        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.

        +

        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
        +            
        +
        #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.

        +

        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.

        +

        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

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/delegate_power.html b/docs/tutorials-python/delegate_power.html index 1f63b395..169f7806 100644 --- a/docs/tutorials-python/delegate_power.html +++ b/docs/tutorials-python/delegate_power.html @@ -1,365 +1,386 @@ + - - - - - - - - - - - - - - - -PY: Delegate Power | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Delegate Power | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Delegate Power -

        - -

        How to delegate or remove delegation of STEEM POWER to another user using Python.

        +

        + +

        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.

        +

        Full, runnable src of Delegate Power can be downloaded + as part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        Steps

        +
          +
        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. +
        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 3 packages:

        +

        1. App setup + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        • pick - helps select the query type interactively
        • -
        • pprint - print results in better format
        • -
        +

        In this tutorial we use 3 packages:

        -

        We import the libraries and connect to the testnet.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        • pick - helps select the query type interactively
        • +
        • pprint - print results in better format
        • +
        -
        import steembase
        +            

        We import the libraries and connect to the testnet.

        + +
        +
        import steembase
         import steem
         from pick import pick
         import pprint
        @@ -369,15 +390,20 @@ 

        1. App setup

        '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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #capture user information
         username = input('Enter username: ') #demo account: cdemo
         wif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3
         
        @@ -389,13 +415,18 @@ 

        2. User information and steem node < if(userinfo is None) : print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!') exit() -

        +
        +
        -

        3. Check balance

        +

        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.

        +

        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)
        +            
        +
        #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')
        @@ -409,15 +440,20 @@ 

        3. Check balance

        print('\n' + 'Available VESTS : ' + str(avail_vests)) input('Press enter to continue' + '\n') -
        +
        +
        -

        The result of the query is displayed in the console/terminal.

        +

        The result of the query is displayed in the console/terminal.

        -

        4. Delegation amount and commit

        +

        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.

        +

        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
        +            
        +
        #choice of action
         title = ('Please choose action')
         options = ['DELEGATE POWER', 'UN-DELEGATE POWER', 'CANCEL']
         option, index = pick(options, title)
        @@ -432,11 +468,14 @@ 

        4. Delegation amount and commit 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!

        +

        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!

        -
        -

        A confirmation of the transaction is displayed on the UI.

        +

        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.

        +

        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

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/edit_content_patching.html b/docs/tutorials-python/edit_content_patching.html index 4a07e147..19851f6e 100644 --- a/docs/tutorials-python/edit_content_patching.html +++ b/docs/tutorials-python/edit_content_patching.html @@ -1,365 +1,387 @@ + - - - - - - - - - - - - - - - -PY: Edit Content Patching | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Edit Content Patching | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Edit Content Patching -

        - -

        How to edit post content with diff_match_patch using Python.

        +

        + +

        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.

        +

        Full, runnable src of Edit Content Patching can be downloaded as part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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.

        +

        Intro

        -

        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.

        +

        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.

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 2 packages:

        +

        1. App setup + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        • diff_match_patch - used to compute the difference between two text fields to create a patch
        • -
        +

        In this tutorial we use 2 packages:

        -

        We import the libraries and connect to the testnet.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        • diff_match_patch - used to compute the difference between two text fields to create a patch
        • +
        -
        import steembase
        +            

        We import the libraries and connect to the testnet.

        + +
        +
        import steembase
         import steem
         from diff_match_patch import diff_match_patch
         
        @@ -367,27 +389,37 @@ 

        1. App setup

        '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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #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

        +

        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.

        +

        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
        +            
        +
        #check valid username
         userinfo = client.get_account(username)
         if(userinfo is None) :
             print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!')
        @@ -404,15 +436,19 @@ 

        3. Post to update

        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.

        +

        The user also inputs the updated text in the console/terminal. This will then give us the two text fields to compare.

        -

        4. Patching

        +

        4. Patching + +

        -

        The module is initiated and the new post text is checked for validity.

        +

        The module is initiated and the new post text is checked for validity.

        -
        #initialise the diff match patch module
        +            
        +
        #initialise the diff match patch module
         dmp = diff_match_patch()
         
         #Check for null input
        @@ -424,11 +460,14 @@ 

        4. Patching

        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.

        +

        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
        +            
        +
        #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)
        @@ -441,50 +480,55 @@ 

        4. Patching

        new_body = patch_body[0] else : new_body = n_body -
        +
        +
        -

        5. New post commit

        +

        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.

        +

        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
        +            
        +
        #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.

        +

        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.

        +

        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

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/follow_a_user.html b/docs/tutorials-python/follow_a_user.html index 020a4771..78309359 100644 --- a/docs/tutorials-python/follow_a_user.html +++ b/docs/tutorials-python/follow_a_user.html @@ -1,365 +1,386 @@ + - - - - - - - - - - - - - - - -PY: Follow A User | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Follow A User | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Follow A User -

        - -

        How to follow or unfollow an author using Python.

        +

        + +

        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.

        +

        Full, runnable src of Follow A User can be downloaded + as part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        Steps

        +
          +
        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. +
        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 3 packages:

        +

        1. App setup + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        • pick - helps select the query type interactively
        • -
        +

        In this tutorial we use 3 packages:

        -

        We import the libraries and connect to the testnet.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        • pick - helps select the query type interactively
        • +
        -
        import steembase
        +            

        We import the libraries and connect to the testnet.

        + +
        +
        import steembase
         import steem
         from pick import pick
         
        @@ -367,40 +388,56 @@ 

        1. App setup

        '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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #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

        +

        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.

        +

        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
        +            
        +
        #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.

        +

        Once the author name is confirmed to be valid we can move on to check the follow status of that author.

        -

        4. Follow status

        +

        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.

        +

        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
        +            
        +
        #result from previous step
         if result :
         	#check for author name in the current following list
         	follow = s.get_following(username, author, 'blog', 1)
        @@ -411,22 +448,28 @@ 

        4. Follow status

        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.

        +

        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
        +            
        +
        #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.

        +

        Once we know what the user wants to do, we can move on to the actual commit to the blockchain.

        -

        5. Follow/Unfollow commit

        +

        5. Follow/Unfollow commit + +

        -

        Once the user has selected which action to take we user another if statement to execute that selection.

        +

        Once the user has selected which action to take we user another if statement to execute that selection.

        -
        if option == 'Follow' :
        +            
        +
        if option == 'Follow' :
         	s.commit.follow(author, ['blog'], username)
         	print(author + ' is now being followed')
         else:
        @@ -435,39 +478,40 @@ 

        5. Follow/Unfollow commit< print(author + ' has now been unfollowed') else: print('Action Cancelled') -

        +
        +
        -

        A simple confirmation of the chosen action is printed on the screen.

        +

        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.

        +

        You can also check on the testportal for a list of the authors being followed by the demo account.

        -

        To Run the tutorial

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/get_account_comments.html b/docs/tutorials-python/get_account_comments.html index 389086c2..6bf7256d 100644 --- a/docs/tutorials-python/get_account_comments.html +++ b/docs/tutorials-python/get_account_comments.html @@ -1,365 +1,391 @@ + - - - - - - - - - - - - - - - -PY: Get Account Comments | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Get Account Comments | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        - + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/get_account_replies.html b/docs/tutorials-python/get_account_replies.html index b0b35cbc..91da231d 100644 --- a/docs/tutorials-python/get_account_replies.html +++ b/docs/tutorials-python/get_account_replies.html @@ -1,365 +1,388 @@ + - - - - - - - - - - - - - - - -PY: Get Account Replies | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Get Account Replies | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        - - -
        - - + + + +

        To Run the tutorial

        + +
          +
        1. review dev requirements
        2. +
        3. clone this repo
        4. +
        5. cd tutorials/08_get_account_replies
        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/get_delegations_by_user.html b/docs/tutorials-python/get_delegations_by_user.html index 0de49caf..246ae2eb 100644 --- a/docs/tutorials-python/get_delegations_by_user.html +++ b/docs/tutorials-python/get_delegations_by_user.html @@ -1,379 +1,404 @@ + - - - - - - - - - - - - - - - -PY: Get Delegations By User | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Get Delegations By User | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Get Delegations By User -

        - -

        How to get a list of active or expiring vesting delegations using Python.

        +

        + +

        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.

        +

        Full, runnable src of Get Delegations By User can be downloaded as part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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 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:

        -

        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.

        +
          +
        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. +
        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 2 package:

        +

        1. App setup + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        • pick - helps select the query type interactively
        • -
        +

        In this tutorial we use 2 package:

        -

        We import the libraries and connect to the production server.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        • pick - helps select the query type interactively
        • +
        -
        from pick import pick
        +            

        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

        +

        pprint is used to print the query results in an easier to read format

        -

        2. User input

        +

        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.

        +

        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
        +            
        +
        #capture username
         username = input('Username: ')
         
         #check username
        @@ -384,24 +409,30 @@ 

        2. User input

        #capture list limit limit = input('Max number of vesting delegations to display: ') -
        +
        +
        -

        3. Delegation lists

        +

        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.

        +

        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
        +            
        +
        #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.

        +

        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' :
        +            
        +
        if option=='Active Vesting Delegations' :
             #active delegations
         	delegations = client.get_vesting_delegations(username, '', limit)
         	if len(delegations) == 0:
        @@ -415,39 +446,40 @@ 

        3. Delegation lists

        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.

        +

        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!

        +

        That’s it!

        -

        To Run the tutorial

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/get_follower_and_following_list.html b/docs/tutorials-python/get_follower_and_following_list.html index 9d702abd..3c110d70 100644 --- a/docs/tutorials-python/get_follower_and_following_list.html +++ b/docs/tutorials-python/get_follower_and_following_list.html @@ -1,394 +1,425 @@ + - - - - - - - - - - - - - - - -PY: Get Follower And Following List | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Get Follower And Following List | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Get Follower And Following List can be downloaded as part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        Steps

        +
          +
        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. +
        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 2 packages, pick - helps us to select the query type interactively. steem - steem-python library, interaction with Blockchain.

        +

        1. App setup + +

        -

        First we import both libraries and initialize Steem class

        +

        In this tutorial we use 2 packages, pick - helps us to select the query type interactively. steem - steem-python library, interaction with Blockchain.

        -
        from pick import pick
        +            

        First we import both libraries and initialize Steem class

        + +
        +
        from pick import pick
         from steem import Steem
         
         s = Steem()
        -
        +
        +
        -

        2. Input variables

        +

        2. Input variables + +

        -

        We assign two of the variables via a simple input from the UI.

        +

        We assign two of the variables via a simple input from the UI.

        -
        #capture username
        +            
        +
        #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.

        +

        Next we make a list of the two list options available to the user, following or followers and setup pick.

        -
        #list type
        +            
        +
        #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.

        +

        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

        +

        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.

        +

        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" :
        +            
        +
        if option=="Follower" :
             follow = s.get_followers(username, '', 'blog', limit)
             # for follower in follow:
             #     lists.append(follower["follower"])
        @@ -398,15 +429,19 @@ 

        3. Get followers/following # 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.

        +

        The output is displayed using the same if statement and will be discussed in the next step.

        -

        4. Print output

        +

        4. Print output + +

        -

        Next, we will print the result.

        +

        Next, we will print the result.

        -
        if option=="Follower" :
        +            
        +
        if option=="Follower" :
             # follow = s.get_followers(username, '', 'blog', limit)
             for follower in follow:
                 lists.append(follower["follower"])
        @@ -416,46 +451,50 @@ 

        4. Print output

        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.

        +

        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.

        +

        We also do a check for when the list is empty to display the proper message.

        -
        #check if follower(ing) list is empty
        +            
        +
        #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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/get_post_comments.html b/docs/tutorials-python/get_post_comments.html index 8282b877..a18fe47f 100644 --- a/docs/tutorials-python/get_post_comments.html +++ b/docs/tutorials-python/get_post_comments.html @@ -1,365 +1,390 @@ + - - - - - - - - - - - - - - - -PY: Get Post Comments | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Get Post Comments | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Get Post Comments -

        - -

        Fetch comments made on each content or post using Python.

        +

        + +

        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.

        +

        Full, runnable src of Get Post Comments can be + downloaded as part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        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.

        +

        1. App setup + +

        -

        First we import all three library and initialize Steem class

        +

        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.

        -
            import pprint
        +            

        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

        +

        2. Post list + +

        -

        Next we will fetch and make list of posts and setup pick properly.

        +

        Next we will fetch and make list of posts and setup pick properly.

        -
            query = {
        +            
        +
            query = {
                 "limit":5, #number of posts
                 "tag":"" #tag of posts
                 }
        @@ -373,31 +398,41 @@ 

        2. Post list

        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.

        +

        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

        +

        3. Replies list + +

        -

        Next we will replies on selected post with get_content_replies.

        +

        Next we will replies on selected post with get_content_replies.

        -
          # get replies for given post
        +            
        +
          # get replies for given post
           replies = s.get_content_replies(posts[index]["author"],posts[index]["permlink"])
        -
        +
        +
        -

        4. Print output

        +

        4. Print output + +

        -

        Next, we will print result, replies on selected post, selected post details and number of replies.

        +

        Next, we will print result, replies on selected post, selected post details and number of replies.

        -
          # print post details for selected post
        +            
        +
          # 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:

        +

        The example of result returned from the service is a JSON object with the following properties:

        -
        [{'abs_rshares': 0,
        +            
        +
        [{'abs_rshares': 0,
           'active': '2018-06-15T10:43:36',
           'active_votes': [],
           'allow_curation_rewards': True,
        @@ -490,39 +525,40 @@ 

        4. Print output

        '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.

        +

        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!

        +

        That’s it!

        -

        To Run the tutorial

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/get_post_details.html b/docs/tutorials-python/get_post_details.html index 8dfe961e..4ff293e6 100644 --- a/docs/tutorials-python/get_post_details.html +++ b/docs/tutorials-python/get_post_details.html @@ -1,365 +1,390 @@ + - - - - - - - - - - - - - - - -PY: Get Post Details | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Get Post Details | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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

        +

        Full, runnable src of Get Post Details can be downloaded + as part of the PY tutorials repository. +

        -

        Intro

        +

        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

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        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.

        +

        1. App setup + +

        -

        First we import all three library and initialize Steem class

        +

        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.

        -
            import pprint
        +            

        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

        +

        2. Post list + +

        -

        Next we will fetch and make list of posts and setup pick properly.

        +

        Next we will fetch and make list of posts and setup pick properly.

        -
            query = {
        +            
        +
            query = {
                 "limit":5, #number of posts
                 "tag":"" #tag of posts
                 }
        @@ -373,30 +398,41 @@ 

        2. Post list

        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.

        +

        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

        +

        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.

        +

        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

        +

        4. Print output + +

        -

        Next, we will print result, details of selected post.

        +

        Next, we will print result, details of selected post.

        -
            # print post details for 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:

        +

        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",
        @@ -462,39 +498,40 @@ 

        4. Print output

        "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.

        +

        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!

        +

        That’s it!

        -

        To Run the tutorial

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/get_posts.html b/docs/tutorials-python/get_posts.html index ac15f5d7..675d10fa 100644 --- a/docs/tutorials-python/get_posts.html +++ b/docs/tutorials-python/get_posts.html @@ -1,383 +1,411 @@ + - - - - - - - - - - - - - - - -PY: Get Posts | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Get Posts | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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

        +

        Full, runnable src of Get Posts can be downloaded as part + of the PY tutorials repository. +

        -

        Intro

        +

        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

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        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.

        +

        1. App setup + +

        -

        First we import all three library and initialize Steem class

        +

        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.

        -
            import pprint
        +            

        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

        +

        2. Filters list + +

        -

        Next we will make list of filters and setup pick properly.

        +

        Next we will make list of filters and setup pick properly.

        -
            title = 'Please choose filter: '
        +            
        +
            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.

        +

        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

        +

        3. Query details + +

        -

        Next we will form a query. In Steem,

        +

        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
        • -
        +
          +
        • 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 = {
        +            
        +
        query = {
             "limit":2, #number of posts
             "tag":"" #tag of posts
             }
        @@ -388,22 +416,28 @@ 

        3. Query details

        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.

        +

        Above code shows example of query and simple list of function that will fetch post list with user selected filter.

        -

        4. Print output

        +

        4. Print output + +

        -

        Next, we will print result, post list and selected filter name.

        +

        Next, we will print result, post list and selected filter name.

        -
            # print post list for selected filter
        +            
        +
            # 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:

        +

        The example of result returned from the service is a JSON object with the following properties:

        -
        [
        +            
        +
        [
             {
                 "id": 37338948,
                 "author": "steemitblog",
        @@ -474,39 +508,40 @@ 

        4. Print output

        } ] '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.

        +

        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!

        +

        That’s it!

        -

        To Run the tutorial

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/get_voters_list_on_post.html b/docs/tutorials-python/get_voters_list_on_post.html index a376f030..0f203380 100644 --- a/docs/tutorials-python/get_voters_list_on_post.html +++ b/docs/tutorials-python/get_voters_list_on_post.html @@ -1,365 +1,390 @@ + - - - - - - - - - - - - - - - -PY: Get Voters List On Post | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Get Voters List On Post | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Get Voters List On Post -

        - -

        Voters list and detail of each vote on selected content.

        +

        + +

        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.

        +

        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

        +

        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.

        +

        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

        +

        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 - 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

        +

        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.

        +

        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

        +

        First we import all three library and initialize Steem class

        -
            import pprint
        +            
        +
            import pprint
             from pick import pick
             # initialize Steem class
             from steem import Steem
         
             s = Steem()
        -
        +
        +
        -

        2. Post list

        +

        2. Post list + +

        -

        Next we will fetch and make list of posts and setup pick properly.

        +

        Next we will fetch and make list of posts and setup pick properly.

        -
            query = {
        +            
        +
            query = {
                 "limit":5, #number of posts
                 "tag":"" #tag of posts
                 }
        @@ -373,30 +398,40 @@ 

        2. Post list

        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.

        +

        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

        +

        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.

        +

        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

        +

        4. Print output + +

        -

        Next, we will print result, details of selected post.

        +

        Next, we will print result, details of selected post.

        -
            # print voters list for 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:

        +

        The example of result returned from the service is a JSON object with the following properties:

        -
        [{'percent': 100,
        +            
        +
        [{'percent': 100,
           'reputation': '4675452335798',
           'rshares': 174045922,
           'time': '2018-06-13T05:27:06',
        @@ -416,39 +451,41 @@ 

        4. Print output

        '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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/getting_started.html b/docs/tutorials-python/getting_started.html index 5f1d00c1..148f4e6a 100644 --- a/docs/tutorials-python/getting_started.html +++ b/docs/tutorials-python/getting_started.html @@ -1,381 +1,397 @@ + - - - - - - - - - - - - - - - -PY: Getting Started | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Getting Started | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Getting Started can be downloaded + as part of the PY tutorials repository. +

        -

        Currently steem-python documentation is generated in the standard pydoc format.

        +

        The library was designed to allow Python developers to easily access the network as well as build utilities and applications.

        -

        Documentation is available at: Official steem-python Docs.

        +

        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.

        +

        Dev requirements

        -
          -
        • -

          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

          -
        • -
        +

        In our Python tutorials we recommend developers to be familiar with following requirements/libraries.

        -

        To get started with Python, you can also check official Python installation and Python tutorial.

        +
          +
        • +

          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 our Python tutorials, checkout our first tutorial here.

        +

        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.

        -
        +
        -
        - - + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/grant_active_permission.html b/docs/tutorials-python/grant_active_permission.html index 00ddfbe3..f9aba55a 100644 --- a/docs/tutorials-python/grant_active_permission.html +++ b/docs/tutorials-python/grant_active_permission.html @@ -1,397 +1,429 @@ + - - - - - - - - - - - - - - - -PY: Grant Active Permission | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Grant Active Permission | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Grant Active Permission -

        - -

        How to give another user active permission on your account using Python.

        +

        + +

        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.

        +

        Full, runnable src of Grant Active Permission can be downloaded as part of the PY tutorials repository. +

        -

        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.

        +

        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.

        -

        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.

        +

        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.

        -

        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.

        +

        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.

        -

        this article has more detail around active authorities

        +

        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.

        -

        Intro

        +

        this article has more detail around active authorities

        -

        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:

        +

        Intro

        -
          -
        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 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:

        -

        The disallow method uses the same parameters except for weight which is not required.

        +
          +
        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. +
        -

        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.

        +

        The disallow method uses the same parameters except for weight which is not required.

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup and connection

        +
          +
        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. +
        -

        In this tutorial we use 2 packages:

        +

        1. App setup and connection + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        • pick - helps select the query type interactively
        • -
        +

        In this tutorial we use 2 packages:

        -

        We import the libraries for the application.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        • pick - helps select the query type interactively
        • +
        -
        import steembase
        +            

        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.

        +

        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
        +            
        +
        #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

        +

        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.

        +

        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
        +            
        +
        #check valid user
         userinfo = client.get_account(username)
         if(userinfo is None) :
             print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!')
        @@ -406,13 +438,20 @@ 

        2. Username validation if(foreign_userinfo is None) : print('Oops. Looks like user ' + foreign_acc + ' doesn\'t exist on this chain!') exit() -

        +
        +
        -

        3. Check permission status

        +

        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.

        +

        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
        +            
        +
        #check if foreign_account already has active auth
         _data = []
         title = ''
         for i in range(len(userinfo['active']['account_auths'])) :
        @@ -424,13 +463,18 @@ 

        3. Check permission status if (title == '') : title = (foreign_acc + ' does not yet active permission. Please choose option from below list') options = ['ALLOW', 'CANCEL'] -

        +
        +
        -

        4. Commit to blockchain

        +

        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.

        +

        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)
        +            
        +
        option, index = pick(options, title)
         
         if (option == 'CANCEL') :
             print('operation cancelled')
        @@ -444,37 +488,38 @@ 

        4. Commit to blockchain #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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/grant_posting_permission.html b/docs/tutorials-python/grant_posting_permission.html index 14e30f5c..a848a1e1 100644 --- a/docs/tutorials-python/grant_posting_permission.html +++ b/docs/tutorials-python/grant_posting_permission.html @@ -1,391 +1,420 @@ + - - - - - - - - - - - - - - - -PY: Grant Posting Permission | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Grant Posting Permission | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Grant Posting Permission -

        - -

        How to give another user posting permission on your account using Python.

        +

        + +

        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.

        +

        Full, runnable src of Grant Posting Permission can be downloaded as part of the PY tutorials repository. +

        -

        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.

        +

        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.

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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 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:

        -

        The disallow method uses the same parameters except for weight which is not required.

        +
          +
        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. +
        -

        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.

        +

        The disallow method uses the same parameters except for weight which is not required.

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup and connection

        +
          +
        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. +
        -

        In this tutorial we use 2 packages:

        +

        1. App setup and connection + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        • pick - helps select the query type interactively
        • -
        +

        In this tutorial we use 2 packages:

        -

        We import the libraries for the application.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        • pick - helps select the query type interactively
        • +
        -
        import steembase
        +            

        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.

        +

        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
        +            
        +
        #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

        +

        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.

        +

        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
        +            
        +
        #check valid user
         userinfo = client.get_account(username)
         if(userinfo is None) :
             print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!')
        @@ -400,13 +429,20 @@ 

        2. Username validation if(foreign_userinfo is None) : print('Oops. Looks like user ' + foreign_acc + ' doesn\'t exist on this chain!') exit() -

        +
        +
        -

        3. Check permission status

        +

        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.

        +

        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
        +            
        +
        #check if foreign_account already has posting auth
         _data = []
         title = ''
         for i in range(len(userinfo['posting']['account_auths'])) :
        @@ -418,13 +454,18 @@ 

        3. Check permission status if (title == '') : title = (foreign_acc + ' does not yet posting permission. Please choose option from below list') options = ['ALLOW', 'CANCEL'] -

        +
        +
        -

        4. Commit to blockchain

        +

        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.

        +

        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)
        +            
        +
        option, index = pick(options, title)
         
         if (option == 'CANCEL') :
             print('operation cancelled')
        @@ -438,37 +479,38 @@ 

        4. Commit to blockchain #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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/password_key_change.html b/docs/tutorials-python/password_key_change.html index c9c8b4fb..63649aea 100644 --- a/docs/tutorials-python/password_key_change.html +++ b/docs/tutorials-python/password_key_change.html @@ -1,399 +1,431 @@ + - - - - - - - - - - - - - - - -PY: Password Key Change | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Password Key Change | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Password Key Change -

        - -

        How to change your accounts password and keys

        +

        + +

        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.

        +

        Full, runnable src of Password Key Change can + be downloaded as part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        Caution: -This functionality does not work on the TestNet so we will be modifying the live blockchain.

        +
          +
        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. +
        -

        Steps

        +

        Caution: This functionality does not work on the TestNet so we will be modifying the live blockchain.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 2 package:

        +

        1. App setup + +

        -
          -
        • 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
        • -
        +

        In this tutorial we use 2 package:

        -

        We import the libraries and get parameters from the user.

        +
          +
        • 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
        • +
        -
        import steem
        +            

        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

        +

        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.

        +

        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: ')
        +            
        +
        account = input('Account: ')
         old_password = input('Current password: ')
         new_password = input('New password: ')
        -
        +
        +
        -

        3. Connect to the blockchain

        +

        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.

        +

        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(
        +            
        +
        old_owner_key = str(
             PasswordKey(account, old_password, "owner").get_private_key()
         )
         
         client = steem.Steem(keys=[old_owner_key])
        -
        +
        +
        -

        4. Configure new keys

        +

        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.

        +

        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 = {}
        +            
        +
        new_public_keys = {}
         
         for role in ["owner", "active", "posting", "memo"]:
             private_key = PasswordKey(account, new_password, role).get_private_key()
        @@ -428,57 +460,64 @@ 

        4. Configure new keys

        print("New data:") print(new_data) -
        +
        +
        -

        5. Commit changes to blockchain

        +

        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.

        +

        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.

        +

        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)
        +            
        +
        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.

        +

        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.
        -
        +
        +
        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.

        +

        You will need to wait at least an hour before attempting this again.

        -

        That’s it!

        +

        That’s it!

        -

        To Run the tutorial

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/power_down.html b/docs/tutorials-python/power_down.html index f8e55310..8c00c3e9 100644 --- a/docs/tutorials-python/power_down.html +++ b/docs/tutorials-python/power_down.html @@ -1,363 +1,387 @@ + - - - - - - - - - - - - - - - -PY: Power Down | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Power Down | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Power Down -

        - -

        How to power down (withdraw) your vesting shares using Python.

        +

        + +

        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.

        +

        Full, runnable src of Power Down can be downloaded as + part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        Steps

        +
          +
        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. +
        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 2 packages:

        +

        1. App setup + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        • pick - helps select the query type interactively
        • -
        +

        In this tutorial we use 2 packages:

        -

        We import the libraries and connect to the testnet.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        • pick - helps select the query type interactively
        • +
        -
        import steembase
        +            

        We import the libraries and connect to the testnet.

        + +
        +
        import steembase
         import steem
         from pick import pick
         from steem.amount import Amount
        @@ -366,27 +390,35 @@ 

        1. App setup

        '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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #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

        +

        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.

        +

        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
        +            
        +
        #get account balance for vesting shares
         userinfo = client.get_account(username)
         delegated_vests = userinfo['delegated_vesting_shares']
         vesting_shares = userinfo['vesting_shares']
        @@ -400,23 +432,33 @@ 

        3. Check balance

        '\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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #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.

        +

        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
        +            
        +
        #parameters: amount, account
         if (option == 'Cancel Transaction') :
             print('transaction cancelled')
             exit()
        @@ -438,39 +480,40 @@ 

        4. Conversion amount and commit print('No change to withdraw amount') else : print('insufficient funds available') -

        +
        +
        -

        The result is displayed on the console/terminal.

        +

        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.

        +

        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

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/power_up_steem.html b/docs/tutorials-python/power_up_steem.html index 4e63705e..bfa7f970 100644 --- a/docs/tutorials-python/power_up_steem.html +++ b/docs/tutorials-python/power_up_steem.html @@ -1,365 +1,386 @@ + - - - - - - - - - - - - - - - -PY: Power Up Steem | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Power Up Steem | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Power Up Steem -

        - -

        How to power up your STEEM to STEEM POWER using Python.

        +

        + +

        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.

        +

        Full, runnable src of Power Up Steem can be downloaded + as part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        Steps

        +
          +
        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. +
        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 2 packages:

        +

        1. App setup + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        • pick - helps select the query type interactively
        • -
        +

        In this tutorial we use 2 packages:

        -

        We import the libraries and connect to the testnet.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        • pick - helps select the query type interactively
        • +
        -
        import steembase
        +            

        We import the libraries and connect to the testnet.

        + +
        +
        import steembase
         import steem
         from steem.amount import Amount
         from pick import pick
        @@ -368,27 +389,36 @@ 

        1. App setup

        '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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #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

        +

        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.

        +

        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
        +            
        +
        #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!')
        @@ -398,15 +428,21 @@ 

        3. Check balance

        print('Available STEEM balance: ' + balance + '\n') input('Press any key to continue') -
        +
        +
        -

        The results of the query are displayed in the console/terminal.

        +

        The results of the query are displayed in the console/terminal.

        -

        4. Conversion amount

        +

        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.

        +

        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
        +            
        +
        #choice of account
         title = 'Please choose an option for an account to transfer to: '
         options = ['SELF', 'OTHER']
         option, index = pick(options, title)
        @@ -425,13 +461,17 @@ 

        4. Conversion amount

        #amount to power up amount = float(input('Please enter the amount of STEEM to power up: ')) -
        +
        +
        -

        5. Commit to blockchain

        +

        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.

        +

        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
        +            
        +
        #parameters: amount, to, account
         if (amount == 0) :
             print('\n' + 'No STEEM entered for powering up')
             exit()
        @@ -442,47 +482,50 @@ 

        5. Commit to blockchain 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.

        +

        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

        +

        As an added check we also display the new STEEM balance of the user on the terminal/console

        -
        #get new account balance
        +            
        +
        #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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/reblogging_post.html b/docs/tutorials-python/reblogging_post.html index 4879a14d..7456e8a2 100644 --- a/docs/tutorials-python/reblogging_post.html +++ b/docs/tutorials-python/reblogging_post.html @@ -1,364 +1,387 @@ + - - - - - - - - - - - - - - - -PY: Reblogging Post | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Reblogging Post | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Reblogging Post can be downloaded + as part of the PY tutorials repository. +

        -

        Intro

        +

        Tutorial will also explain and show you how to sign/broadcast transaction on Steem blockchain using the steem-python library.

        -

        Steem python library has built-in function to commit transaction and broadcast it to the network.

        +

        Intro

        -

        Steps

        +

        Steem python library has built-in function to commit transaction and broadcast it to the network.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        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.

        +

        1. App setup + +

        -

        First we import all three library and initialize Steem class

        +

        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.

        -
            import pprint
        +            

        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

        +

        2. Post list + +

        -

        Next we will fetch and make list of accounts and setup pick properly.

        +

        Next we will fetch and make list of accounts and setup pick properly.

        -
            query = {
        +            
        +
            query = {
               "limit":5, #number of posts
               "tag":"" #tag of posts
             }
        @@ -371,15 +394,19 @@ 

        2. 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.

        +

        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

        +

        3. Enter user credentials + +

        -

        Next in order to sign transaction, application asks for username and posting private key to sign transaction and broadcast it.

        +

        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
        +            
        +
          # get index and selected post
           option, index = pick(options, title)
           pprint.pprint("You selected: "+option)
         
        @@ -392,37 +419,38 @@ 

        3. Enter user credentials # 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.

        +

        That’s it, if transaction is successful you shouldn’t see any error messages, otherwise you will be notified.

        -

        To Run the tutorial

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/search_accounts.html b/docs/tutorials-python/search_accounts.html index edca9426..a9a1b1a4 100644 --- a/docs/tutorials-python/search_accounts.html +++ b/docs/tutorials-python/search_accounts.html @@ -1,383 +1,413 @@ + - - - - - - - - - - - - - - - -PY: Search Accounts | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Search Accounts | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        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

        +

        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:

        +

        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. -
        +
          +
        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

        +

        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 - 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

        +

        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.

        +

        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

        +

        First we import both libraries and initialize Steem class

        -
        from steem import Steem
        +            
        +
        from steem import Steem
         from pick import pick
         
         
         s = Steem()
        -
        +
        +
        -

        2. List selection

        +

        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.

        +

        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
        +            
        +
        #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.

        +

        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

        +

        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.

        +

        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' :
        +            
        +
        if option=='Active Account names' :
         	#capture starting account
         	account = input("Enter account name to start search from: ")
         	#input list limit
        @@ -385,15 +415,19 @@ 

        3. Get and display account nameslists = 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.

        +

        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.

        +

        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 :
        +            
        +
        else :
         	#capture starting tag
         	aftertag = input("Enter tag name to start search from: ")
         	#capture list limit
        @@ -402,39 +436,41 @@ 
        - -

        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/search_tags.html b/docs/tutorials-python/search_tags.html index be7f21c5..2db8f398 100644 --- a/docs/tutorials-python/search_tags.html +++ b/docs/tutorials-python/search_tags.html @@ -1,349 +1,365 @@ + - - - - - - - - - - - - - - - -PY: Search Tags | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Search Tags | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Search Tags -

        - -

        How to pull a list of the trending tags from the blockchain using Python.

        +

        + +

        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.

        +

        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.

        -
        +
        -
        - - + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/stream_blockchain_transactions.html b/docs/tutorials-python/stream_blockchain_transactions.html index 1c81016c..a271409f 100644 --- a/docs/tutorials-python/stream_blockchain_transactions.html +++ b/docs/tutorials-python/stream_blockchain_transactions.html @@ -1,373 +1,401 @@ + - - - - - - - - - - - - - - - -PY: Stream Blockchain Transactions | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Stream Blockchain Transactions | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Stream Blockchain Transactions -

        - -

        How to stream transactions on the live Steem blockchain

        +

        + +

        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.

        +

        Full, runnable src of Stream Blockchain Transactions can be downloaded as part of the PY tutorials repository. +

        -

        Intro

        +

        In this tutorial we show you how to stream transactions on the Steem blockchain using the blockchain class found within the steem-python library.

        -

        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.

        +

        Intro

        -

        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.

        +

        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.

        -

        Steps

        +

        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.

        -
          -
        1. App setup Configure imports and initialization of libraries
        2. -
        3. Stream blocks Stream blocks
        4. -
        5. Sample result Stream blocks
        6. -
        +

        Steps

        -

        1. App setup

        +
          +
        1. App setup Configure imports and initialization of libraries
        2. +
        3. Stream blocks Stream blocks
        4. +
        5. Sample result Stream blocks
        6. +
        -

        In this tutorial we use 1 package:

        +

        1. App setup + +

        -

        steem - steem-python library and interaction with Blockchain

        +

        In this tutorial we use 1 package:

        -
        from steem.blockain import Blockchain
        +            

        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.

        +

        Above we create an instance of Blockchain which will give us the ability to stream the live transactions from the blockchain.

        -

        2. Stream blocks

        +

        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.

        +

        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()
        +            
        +
        stream = blockchain.stream()
         
         for post in stream:
         	print(post)
        -
        +
        +
        -

        3. Sample result

        +

        3. Sample result + +

        -
        {
        +            
        +
        {
           "curator": "idx",
           "reward": "4.042446 VESTS",
           "comment_author": "blackbunny",
        @@ -378,37 +406,38 @@ 

        3. Sample result

        "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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/submit_comment_reply.html b/docs/tutorials-python/submit_comment_reply.html index ecc323de..ff77ed16 100644 --- a/docs/tutorials-python/submit_comment_reply.html +++ b/docs/tutorials-python/submit_comment_reply.html @@ -1,377 +1,399 @@ + - - - - - - - - - - - - - - - -PY: Submit Comment Reply | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Submit Comment Reply | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Submit Comment Reply -

        - -

        How to submit a comment on a post to the Steem blockchain.

        +

        + +

        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.

        +

        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

        +

        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:

        +

        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. -
        +
          +
        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.

        +

        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.

        +

        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

        +

        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 - 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

        +

        1. App setup + +

        -

        In this tutorial we use 4 packages:

        +

        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
        • -
        +
          +
        • 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.

        +

        We import the libraries and connect to the testnet.

        -
        import random
        +            
        +
        import random
         import string
         import steembase
         import steem
        @@ -380,83 +402,104 @@ 

        1. App setup

        '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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #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

        +

        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
        +            
        +
        #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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #connect node and private posting key
         client = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])
        -
        +
        +
        -

        4. Post submission and result

        +

        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.

        +

        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
        +            
        +
        #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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/submit_post.html b/docs/tutorials-python/submit_post.html index b01b0b47..32629960 100644 --- a/docs/tutorials-python/submit_post.html +++ b/docs/tutorials-python/submit_post.html @@ -1,374 +1,395 @@ + - - - - - - - - - - - - - - - -PY: Submit Post | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Submit Post | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Submit Post -

        - -

        How to submit post on Steem blockchain using Python.

        +

        + +

        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.

        +

        Full, runnable src of Submit Post can be downloaded as + part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        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.

        +
          +
        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. +
        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 4 packages:

        +

        1. App setup + +

        -
          -
        • 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
        • -
        +

        In this tutorial we use 4 packages:

        -

        We import the libraries, connect to the testnet and initialize the Steem class.

        +
          +
        • 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
        • +
        -
        import random
        +            

        We import the libraries, connect to the testnet and initialize the Steem class.

        + +
        +
        import random
         import string
         import steembase
         import steem
        @@ -380,15 +401,20 @@ 

        1. App setup

        #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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #capture variables
         author = input('Username: ')
         title = input('Post Title: ')
         body = input('Post Body: ')
        @@ -400,58 +426,67 @@ 

        2. Variable input and formatprint(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

        +

        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
        +            
        +
        " ".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.

        +

        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

        +

        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.

        +

        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)
        +            
        +
        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.

        +

        A simple confirmation is printed on the screen if the post is committed successfully.

        -

        You can also check on the testportal for the post.

        +

        You can also check on the testportal for the post.

        -

        To Run the tutorial

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/transfer_steem_and_sbd.html b/docs/tutorials-python/transfer_steem_and_sbd.html index fe169ba2..72063136 100644 --- a/docs/tutorials-python/transfer_steem_and_sbd.html +++ b/docs/tutorials-python/transfer_steem_and_sbd.html @@ -1,368 +1,389 @@ + - - - - - - - - - - - - - - - -PY: Transfer Steem And Sbd | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Transfer Steem And Sbd | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Transfer Steem And Sbd -

        - -

        How to transfer STEEM and SBD to another account using Python.

        +

        + +

        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.

        +

        Full, runnable src of Transfer Steem And Sbd can be downloaded as part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        Steps

        +
          +
        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. +
        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 2 packages:

        +

        1. App setup + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        • pick - helps select the query type interactively
        • -
        +

        In this tutorial we use 2 packages:

        -

        We import the libraries and connect to the testnet.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        • pick - helps select the query type interactively
        • +
        -
        import steembase
        +            

        We import the libraries and connect to the testnet.

        + +
        +
        import steembase
         import steem
         from pick import pick
         
        @@ -370,54 +391,70 @@ 

        1. App setup

        '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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #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

        +

        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.

        +

        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
        +            
        +
        #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.

        +

        The result of the query is displayed in the console/terminal.

        -

        4. Recipient input

        +

        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.

        +

        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
        +            
        +
        #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.

        +

        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

        +

        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 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:
        +            
        +
        if result:
             #choice of transfer
             title = 'Please choose transfer type: '
             options = ['STEEM', 'SBD', 'Cancel Transfer']
        @@ -426,11 +463,13 @@ 

        5. Transfer type and amount 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.

        +

        Once the user chooses the type of transfer we proceed to assign the amount as well as the asset parameter.

        -
        -

        6. Transfer commit

        +

        6. Transfer commit + +

        -

        Once all the parameters have been assigned we can proceed with the actual commit to the blockchain.

        +

        Once all the parameters have been assigned we can proceed with the actual commit to the blockchain.

        -
        #parameters: to, amount, asset, memo='', account
        +            
        +
        #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.

        +

        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
        +            
        +
        #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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file 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 index 8612dba0..12b4bb9e 100644 --- a/docs/tutorials-python/transfer_steem_and_sbd_to_savings_balance.html +++ b/docs/tutorials-python/transfer_steem_and_sbd_to_savings_balance.html @@ -1,385 +1,409 @@ + - - - - - - - - - - - - - - - -PY: Transfer Steem And Sbd To Savings Balance | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Transfer Steem And Sbd To Savings Balance | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Transfer Steem And Sbd To Savings Balance -

        - -

        How to transfer STEEM and SBD to savings using Python.

        +

        + +

        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.

        +

        Full, runnable src of Transfer Steem And Sbd To Savings Balance can be downloaded as part of the PY tutorials repository. +

        -

        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.

        +

        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.

        -

        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.

        +

        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.

        -

        Intro

        +

        Steemlogin 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://steemlogin.com/sign/transfer-to-savings?from=username&to=username&amount=0.000%20STEEM&memo=text + This is similar to the steemlogin links that have been covered in previous tutorials. For a list of signing operations that work in this manner you can go to https://steemlogin.com/sign. There is also a steemlogin link for withdrawing + funds. +

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        and transfer_from_savings has 6 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. +
        -
          -
        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. -
        +

        and transfer_from_savings has 6 parameters:

        -

        Steps

        +
          +
        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. +
        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 3 packages:

        +

        1. App setup + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        • pick - helps select the query type interactively
        • -
        • random - use to create random numbers
        • -
        +

        In this tutorial we use 3 packages:

        -

        We import the libraries and connect to the testnet.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        • pick - helps select the query type interactively
        • +
        • random - use to create random numbers
        • +
        -
        import steembase
        +            

        We import the libraries and connect to the testnet.

        + +
        +
        import steembase
         import steem
         from pick import pick
         import random
        @@ -388,27 +412,36 @@ 

        1. App setup

        '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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #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

        +

        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.

        +

        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
        +            
        +
        #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!')
        @@ -423,15 +456,20 @@ 

        3. Check balance

        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.

        +

        The result of the query is displayed in the console/terminal.

        -

        4. Transfer type and amount

        +

        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.

        +

        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
        +            
        +
        #choice of transfer/withdrawal
         title1 = 'Please choose transfer type: '
         options1 = ['Transfer', 'Withdrawal', 'Cancel']
         #get index and selected transfer type
        @@ -454,13 +492,17 @@ 

        4. Transfer type and amount #get SBD transfer amount amount = input('Enter amount of SBD to transfer: ') asset = 'SBD' -

        +
        +
        -

        5. Transfer commit

        +

        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.

        +

        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':
        +            
        +
        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')
        @@ -470,13 +512,16 @@ 

        5. Transfer commit

        #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.

        +

        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.

        +

        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
        +            
        +
        #get remaining account balance for STEEM and SBD
         userinfo = client.get_account(username)
         total_steem = userinfo['balance']
         total_sbd = userinfo['sbd_balance']
        @@ -485,37 +530,38 @@ 

        5. Transfer commit

        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. -
        - -
        - -
        - -
        - - + + + +

        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. +
        + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/using_keys_securely.html b/docs/tutorials-python/using_keys_securely.html index 643d2865..567bf307 100644 --- a/docs/tutorials-python/using_keys_securely.html +++ b/docs/tutorials-python/using_keys_securely.html @@ -1,432 +1,461 @@ + - - - - - - - - - - - - - - - -PY: Using Keys Securely | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Using Keys Securely | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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

        +

        Full, runnable src of Using Keys Securely can + be downloaded as part of the PY tutorials repository. +

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        1. App setup - Library install and import
        2. -
        3. Key usage example - Example showing how to import keys
        4. -
        +

        Steps

        -

        1. App setup

        +
          +
        1. App setup - Library install and import
        2. +
        3. Key usage example - Example showing how to import keys
        4. +
        -

        In this tutorial we are only using steem package - steem-python library.

        +

        1. App setup + +

        -
          # initialize Steem class
        +            

        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.

        +

        Last line from above snippet shows how to define private keys for account that’s going to transact using script.

        -

        2. Key usage example

        +

        2. Key usage example + +

        -

        After defining private keys inside Steem class, we can quickly sign any transaction and broadcast it to the network.

        +

        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
        +            
        +
          # 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.

        +

        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:

        +

        You can type following to learn more about steempy commands:

        -
          steempy -h
        -
        +
        +
          steempy -h
        +
        +
        -

        steempy lets you leverage your BIP38 encrypted wallet to perform various actions on your accounts.

        +

        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.

        +

        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:

        +

        You can import your Steem username with following command:

        -

        steempy importaccount username

        +

        steempy importaccount username

        -

        Next you can import individual private keys:

        +

        Next you can import individual private keys:

        -

        steempy addkey <private_key>

        +

        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.

        +

        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
        +            
        +
          # 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.

        +

        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 also allows you to sign and broadcast transactions from terminal. For example:

        -

        steempy transfer --account <account_name> <recipient_name> 1 STEEM memo

        +

        steempy transfer --account <account_name> <recipient_name> 1 STEEM memo

        -

        would sign and broadcast transfer operation,

        +

        would sign and broadcast transfer operation,

        -

        steempy upvote --account <account_name> link

        +

        steempy upvote --account <account_name> link

        -

        would sing and broadcast vote operation, etc.

        +

        would sing and broadcast vote operation, etc.

        -

        That’s it!

        +

        That’s it!

        -

        To Run the tutorial

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/vote_on_content.html b/docs/tutorials-python/vote_on_content.html index 5d2687de..c932e840 100644 --- a/docs/tutorials-python/vote_on_content.html +++ b/docs/tutorials-python/vote_on_content.html @@ -1,364 +1,388 @@ + - - - - - - - - - - - - - - - -PY: Vote On Content | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Vote On Content | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + PY: Vote On Content -

        - -

        How to vote on a post/comment using Python.

        +

        + +

        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.

        +

        Full, runnable src of Vote On Content can be downloaded + as part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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. -
        +

        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:

        -

        Steps

        +
          +
        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. +
        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 3 packages:

        +

        1. App setup + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        • pick - helps select the query type interactively
        • -
        +

        In this tutorial we use 3 packages:

        -

        We import the libraries and connect to the testnet.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        • pick - helps select the query type interactively
        • +
        -
        import steembase
        +            

        We import the libraries and connect to the testnet.

        + +
        +
        import steembase
         import steem
         from pick import pick
         
        @@ -366,41 +390,55 @@ 

        1. App setup

        '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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #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

        +

        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.

        +

        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
        +            
        +
        #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.

        +

        The vote status check is done with a simple query to the blockchain.

        -
        #check vote status
        +            
        +
        #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.

        +

        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:
        +            
        +
        if result:
         	for vote in result :
         		if vote['voter'] == username:
         			title = "This post/comment has already been voted for"
        @@ -409,21 +447,28 @@ 

        3. Check vote status

        title = "No vote for this post/comment has been submitted" else: title = "No vote for this post/comment has been submitted" -
        +
        +
        -

        4. Commit vote

        +

        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.

        +

        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
        +            
        +
        #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.

        +

        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
        +            

        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)
        @@ -436,39 +481,40 @@ 

        4. Commit vote

        else: print('Voting has been cancelled') -
        +
        +
        -

        When the function is executed the selected vote weight overrides any value previously recorded on the blockchain.

        +

        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.

        +

        A simple confirmation of the chosen action is printed on the screen.

        -

        To Run the tutorial

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-python/witness_listing_and_voting.html b/docs/tutorials-python/witness_listing_and_voting.html index 5df25563..c2058d3b 100644 --- a/docs/tutorials-python/witness_listing_and_voting.html +++ b/docs/tutorials-python/witness_listing_and_voting.html @@ -1,367 +1,387 @@ + - - - - - - - - - - - - - - - -PY: Witness Listing And Voting | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + PY: Witness Listing And Voting | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Witness Listing And Voting can be downloaded as part of the PY tutorials repository. +

        -

        Intro

        +

        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.

        -

        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:

        +

        Intro

        -
          -
        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 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:

        -

        The disapprove_witness has the same parameters except for _approve_ which is not required.

        +
          +
        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. +
        -

        Steps

        +

        The disapprove_witness has the same parameters except for _approve_ which is not required.

        -
          -
        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. -
        +

        Steps

        -

        1. App setup

        +
          +
        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. +
        -

        In this tutorial we use 3 packages:

        +

        1. App setup + +

        -
          -
        • steem - steem-python library and interaction with Blockchain
        • -
        • pick - helps select the query type interactively
        • -
        • pprint - print results in better format
        • -
        +

        In this tutorial we use 3 packages:

        -

        We import the libraries and connect to the testnet.

        +
          +
        • steem - steem-python library and interaction with Blockchain
        • +
        • pick - helps select the query type interactively
        • +
        • pprint - print results in better format
        • +
        -
        import steembase
        +            

        We import the libraries and connect to the testnet.

        + +
        +
        import steembase
         import steem
         from pick import pick
         import pprint
        @@ -370,15 +390,20 @@ 

        1. App setup

        '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.

        +

        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

        +

        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.

        +

        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
        +            
        +
        #capture user information
         username = input('Enter username: ') #demo account: cdemo
         wif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3
         
        @@ -390,33 +415,46 @@ 

        2. User information and steem node < if(userinfo is None) : print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!') exit() -

        +
        +
        -

        3. Active witness list

        +

        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.

        +

        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 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.

        +

        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 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

        +

        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.

        +

        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
        +            
        +
        #choice of action
         title = ('Please choose action')
         options = ['VOTE', 'UNVOTE', 'CANCEL']
         option, index = pick(options, title)
        @@ -424,11 +462,13 @@ 

        4. Vote / Unvote

        if (option == 'CANCEL') : print('\n' + 'operation cancelled') exit() -
        +
        +
        -

        VOTE :

        +

        VOTE :

        -
        if (option == '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 :
        @@ -439,11 +479,13 @@ 

        4. Vote / Unvote

        exit() client.approve_witness(witness=witness_vote, account=username, approve=True) print('\n' + witness_vote + ' has been successfully voted for') -
        +
        +
        -

        UNVOTE :

        +

        UNVOTE :

        -
        else :
        +            
        +
        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 :
        @@ -451,39 +493,40 @@ 

        4. Vote / Unvote

        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.

        +

        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.

        +

        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

        +

        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. -
        +
          +
        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. +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-recipes/account-creation-process.html b/docs/tutorials-recipes/account-creation-process.html index ebf477c6..0142f15e 100644 --- a/docs/tutorials-recipes/account-creation-process.html +++ b/docs/tutorials-recipes/account-creation-process.html @@ -1,370 +1,391 @@ + - - - - - - - - - - - - - - - -Account creation process | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Account creation process | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        - - -
        - - + + + +

        You can follow this tutorial to see a working example of how to create accounts.

        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-recipes/calculate_rc_recipe.html b/docs/tutorials-recipes/calculate_rc_recipe.html index 7020bd74..f2f6a261 100644 --- a/docs/tutorials-recipes/calculate_rc_recipe.html +++ b/docs/tutorials-recipes/calculate_rc_recipe.html @@ -1,345 +1,366 @@ + - - - - - - - - - - - - - - - -Calculating RC costs | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Calculating RC costs | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + Calculating RC costs -

        - -

        How to calculate resource credit cost for transactions.

        +

        + +

        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

        +

        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.

        -

        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.

        +

        Intro

        -

        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.

        +

        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 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.

        +

        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.

        -

        There are applications available to check an account’s status, like steemd.com, but here we will look at how calculate the values manually.

        +

        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.

        -

        Calculating available RC

        +

        There are applications available to check an account’s status, like steemd.com, but here we will look at how calculate the values manually.

        -

        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.

        +

        Calculating available RC

        -
        //capture account
        +            

        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()
        @@ -359,13 +380,16 @@ 

        Calculating available RC

        var currentManaPerc = currentMana * 100 / maxMana; console.log(currentManaPerc); -
        +
        +
        -

        Calculating transaction cost

        +

        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.

        +

        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
        +            
        +
        import beem
         from beem.rc import RC
         
         client = beem.Steem()
        @@ -375,11 +399,15 @@ 

        Calculating transaction cost

        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.

        +

        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 = {
        +            
        +
        opdata = {
             'voter': 'steemit',
             'author': 'r1s2g3',
             'permlink': 'rc-calculations-according-to-your-need-part-1',
        @@ -392,29 +420,29 @@ 

        Calculating transaction cost

        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

        +

        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

        +

        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

        +

        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

        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-recipes/estimate_upvote.html b/docs/tutorials-recipes/estimate_upvote.html index 0d8d3daa..cc828d85 100644 --- a/docs/tutorials-recipes/estimate_upvote.html +++ b/docs/tutorials-recipes/estimate_upvote.html @@ -1,352 +1,369 @@ + - - - - - - - - - - - - - - - -Estimate the value of an upvote | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Estimate the value of an upvote | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + Estimate the value of an upvote -

        - -

        Calculate the approximate value of an upvote on Steem

        +

        + +

        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.

        +

        By the end of this recipe you should know how to estimate value of each vote on Steem.

        -

        Intro

        +

        This recipe will take you through the process of fetching necessary data and formulating estimation.

        -

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. Get Reward Fund

        +
          +
        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. +
        -

        Getting Reward Fund information is simply calling get_reward_fund('post') api call, it will give us reward_balance and recent_claims.

        +

        1. Get Reward Fund

        -

        The response we’re working with will look like:

        +

        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",
        @@ -358,15 +375,18 @@ 

        1. Get Reward Fund

        "author_reward_curve":"linear", "curation_reward_curve":"square_root" } -
        +
        +
        -

        2. Get Account

        +

        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.

        +

        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:

        +

        The response example will look like:

        -
        [
        +            
        +
        [
           {
             "id": 9660,
             "name": "steemitblog",
        @@ -490,47 +510,52 @@ 

        2. Get Account

        "guest_bloggers": [] } ] -
        +
        +
        -

        3. Feed history

        +

        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.

        +

        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:

        +

        The response example will look like:

        -
        {
        +            
        +
        {
           "base": "3.029 SBD",
           "quote": "1.000 STEEM"
         }
        -
        +
        +
        -

        4. Final calculation

        +

        4. Final calculation

        -

        After getting all these variables, all we have to do is to calculate estimation

        +

        After getting all these variables, all we have to do is to calculate estimation

        -
        total_vests = vesting_shares + received_vesting_shares - delegated_vesting_shares
        +            
        +
        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.

        - -
        - -
        - - + + + +

        That’s all there is to it.

        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-recipes/forum-market-bandwidth.html b/docs/tutorials-recipes/forum-market-bandwidth.html index 58cb588b..1a890a6b 100644 --- a/docs/tutorials-recipes/forum-market-bandwidth.html +++ b/docs/tutorials-recipes/forum-market-bandwidth.html @@ -1,359 +1,373 @@ + - - - - - - - - - - - - - - - -Forum/Market Bandwidth | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Forum/Market Bandwidth | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + Forum/Market Bandwidth -

        - -

        How to interpret raw bandwidth data.

        +

        + +

        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 -

        +

        Intro

        -

        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:

        +

        + 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 +

        -
        -

        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.

        -
        +

        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 is specific to each account and depends on account activity.

        +
        +

        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.

        +
        -

        Sections

        +

        Bandwidth is specific to each account and depends on account activity.

        -
          -
        1. Getting Account Bandwidth
        2. -
        3. Dynamic Global Properties
        4. -
        5. Account STEEM Power
        6. -
        7. Calculate
        8. -
        +

        Sections

        -

        Getting Account Bandwidth

        +
          +
        1. Getting Account Bandwidth
        2. +
        3. Dynamic Global Properties
        4. +
        5. Account STEEM Power
        6. +
        7. Calculate
        8. +
        -
        curl -s --data '{
        +            

        Getting Account Bandwidth

        + +
        +
        curl -s --data '{
            "jsonrpc":"2.0",
            "method":"condenser_api.get_account_bandwidth",
            "params":[
        @@ -362,9 +376,11 @@ 

        Getting Account Bandwidth

        ], "id":1 }'
        https://api.steemit.com -
        +
        +
        -
        {
        +            
        +
        {
            "jsonrpc":"2.0",
            "result":{
               "id":20846,
        @@ -376,20 +392,24 @@ 

        Getting Account Bandwidth

        }, "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.

        +

        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.

        +

        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

        +

        Dynamic Global Properties

        -

        To do the calculation, we need max_virtual_bandwidth and total_vesting_shares from the global properties, e.g.:

        +

        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
        -
        +
        +
        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":{
        @@ -423,16 +443,20 @@ 

        Dynamic Global Properties

        "max_virtual_bandwidth":"264241152000000000000" } } -
        +
        +
        -

        Account STEEM Power

        +

        Account STEEM Power

        -

        We also need to know how much the account has in STEEM Power from vesting_shares and received_vesting_shares:

        +

        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
        -
        +
        +
        curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_accounts", "params":[["cheetah"]], "id":1}' https://api.steemit.com
        +
        +
        -
        {
        +            
        +
        {
            "jsonrpc":"2.0",
            "result":[
               {
        @@ -542,46 +566,47 @@ 

        Account STEEM Power

        ], "id":1 } -
        +
        +
        -

        Calculate

        +

        Calculate

        -

        Now, we can derive bandwidth_allocated:

        +

        Now, we can derive bandwidth_allocated:

        -

        bandwidth_allocated = max_virtual_bandwidth * (vesting_shares + received_vesting_shares) / total_vesting_shares

        +

        bandwidth_allocated = max_virtual_bandwidth * (vesting_shares + received_vesting_shares) / total_vesting_shares

        -

        bandwidth_allocated = bandwidth_allocated / 1000000

        +

        bandwidth_allocated = bandwidth_allocated / 1000000

        -

        In our example, bandwidth_allocated = 14034118993.

        +

        In our example, bandwidth_allocated = 14034118993.

        -

        Now that we have both bandwidth_allocated and average_bandwidth, we can determine the percentages.

        +

        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:

        +

        First, we need average_bandwidth on the same scale as bandwidth_allocated:

        -

        average_bandwidth = average_bandwidth / 1000000

        +

        average_bandwidth = average_bandwidth / 1000000

        -

        Then we can get the percentages:

        +

        Then we can get the percentages:

        -

        bandwidth_used = 100 * average_bandwidth / bandwidth_allocated

        +

        bandwidth_used = 100 * average_bandwidth / bandwidth_allocated

        -

        bandwidth_remaining = 100 - (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.

        +

        We can see that cheetah has used 0.053 % bandwidth and has 99.946 % remaining as of last_bandwidth_update.

        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-recipes/jussi-multiplexer.html b/docs/tutorials-recipes/jussi-multiplexer.html index eff5db2c..702677a8 100644 --- a/docs/tutorials-recipes/jussi-multiplexer.html +++ b/docs/tutorials-recipes/jussi-multiplexer.html @@ -1,424 +1,458 @@ + - - - - - - - - - - - - - - - -Using jussi as a Multiplexer | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Using jussi as a Multiplexer | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + Using jussi as a Multiplexer -

        - -

        Optimize your local applications with jussi

        +

        + +

        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.

        +

        By the end of this recipe you should know how to install jussi on your local subnet to take advantage of its features.

        -

        Intro

        +

        This recipe will take you through the process of setting up jussi for a small infrastructure like a home network.

        -

        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.

        +

        Intro

        -

        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.

        +

        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.

        -
        - Network Diagram -
        +

        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.

        -

        Steps

        +
        + Network Diagram +
        -
          -
        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. -
        +

        Steps

        -

        1. Setting Up Docker

        +
          +
        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. +
        -

        Although it’s possible to set up jussi to run natively without virtualization, docker is recommended. Setting up docker depends on your operating system:

        +

        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
        +            

        2. Install jussi + +

        + +
        +
        git clone https://github.com/steemit/jussi.git
         cd jussi
        -
        +
        +
        -

        Edit the file DEV_config.json and change all:

        +

        Edit the file DEV_config.json and change all:

        -

        https://steemd.steemitdev.com

        +

        https://steemd.steemitdev.com

        -

        … to …

        +

        … to …

        -

        https://api.steemit.com

        +

        https://api.steemit.com

        -

        Also consider adding the retries element to your DEV_config.json.

        +

        Also consider adding the retries element to your DEV_config.json.

        -

        Then build and run:

        +

        Then build and run:

        -
        docker build -t="$USER/jussi:$(git rev-parse --abbrev-ref HEAD)" .
        +            
        +
        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

        +

        3. Configure Your Apps + +

        -

        Now, you can use your new jussi node as if it’s a full node running locally. For example:

        +

        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
        -
        +
        +
        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.

        +

        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.

        +

        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

        +

        Troubleshooting / Updating

        -

        Error: invalid argument "/jussi:master" for t=/jussi:master: invalid reference format

        +

        Error: invalid argument "/jussi:master" for t=/jussi:master: invalid reference format

        -

        Solution:

        +

        Solution:

        -

        You’re probably trying to run on a raspberry pi. Just replace $USER in the command with the current user.

        +

        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:

        +

        If you would like to update jussi to the latest version, here’s a quick way:

        -
        git stash && git pull && git stash pop
        -
        +
        +
        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.

        +

        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.

        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-recipes/plugin_and_api_list.html b/docs/tutorials-recipes/plugin_and_api_list.html index 50f3e305..cfb43a7a 100644 --- a/docs/tutorials-recipes/plugin_and_api_list.html +++ b/docs/tutorials-recipes/plugin_and_api_list.html @@ -1,765 +1,781 @@ + - - - - - - - - - - - - - - - -Enable SteemD Node APIs | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Enable SteemD Node APIs | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + Enable SteemD Node APIs -

        - -

        Run a SteemD Node with your preferred 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
        • -
        - -
        - -
        - - + + +

        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
        • +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-recipes/understanding-configuration-values.html b/docs/tutorials-recipes/understanding-configuration-values.html index 9e4c9225..fcbdcedb 100644 --- a/docs/tutorials-recipes/understanding-configuration-values.html +++ b/docs/tutorials-recipes/understanding-configuration-values.html @@ -1,864 +1,892 @@ + - - - - - - - - - - - - - - - -Understanding Configuration Values | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Understanding Configuration Values | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + Understanding Configuration Values -

        - -

        Low level blockchain constants

        +

        + +

        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).

        +

        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

        +

        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.

        +

        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

        +

        Sections

        - + -

        IS_TEST_NET

        +

        IS_TEST_NET

        -

        Indicates if this node is running on testnet. See: Steem Testnet

        +

        Indicates if this node is running on testnet. See: Steem Testnet

        -

        STEEM_ENABLE_SMT

        +

        STEEM_ENABLE_SMT

        -

        Indicates if Smart Media Tokens have been enabled (future hardfork).

        +

        Indicates if Smart Media Tokens have been enabled (future hardfork).

        -

        STEEM_INITIAL_VOTE_POWER_RATE

        +

        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).

        +

        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

        +

        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).

        +

        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

        +

        STEEM_ADDRESS_PREFIX

        -

        Address prefix used on mainnet is STM and on testnet is TST. See: Steem Testnet

        +

        Address prefix used on mainnet is STM and on testnet is TST. See: Steem Testnet

        -

        STEEM_BLOCK_INTERVAL

        +

        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

        - -
        {
        +            

        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":{
        @@ -1026,22 +1054,23 @@ 

        Example Output< "STEEM_DELEGATION_RETURN_PERIOD_HF20":864000 } } -

        - -
        - -
        - - + + + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-recipes/understanding-dynamic-global-properties.html b/docs/tutorials-recipes/understanding-dynamic-global-properties.html index 0667f740..01936280 100644 --- a/docs/tutorials-recipes/understanding-dynamic-global-properties.html +++ b/docs/tutorials-recipes/understanding-dynamic-global-properties.html @@ -1,602 +1,622 @@ + - - - - - - - - - - - - - - - -Understanding Dynamic Global Properties | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Understanding Dynamic Global Properties | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + Understanding Dynamic Global Properties -

        - -

        Maintains global state information

        +

        + +

        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.

        +

        Intro

        -

        The API returns an object containing information that changes every block interval such as the head block number, the total vesting fund, etc.

        +

        Dynamic Global Properties represents a set of values that are calculated during normal chain operations and reflect the current values of global blockchain properties.

        -

        Sections

        +

        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.

        +

        head_block_number

        -
          -
        • example: 24155032
        • -
        +

        Block height at the head of the blockchain. This represents the latest block produced by witnesses.

        -

        head_block_id

        +
          +
        • example: 24155032
        • +
        -

        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.

        +

        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.

        +

        time

        -

        Used to synchronize events like Hard Fork activation.

        +

        Point in time (UTC) that the block was included in the chain.

        -

        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.

        +

        Used to synchronize events like Hard Fork activation.

        -

        For new transactions, expirations originate from this time.

        +

        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.

        -
          -
        • example: 2018-07-14T01:19:51
        • -
        +

        For new transactions, expirations originate from this time.

        -

        current_witness

        +
          +
        • example: 2018-07-14T01:19:51
        • +
        -

        Account name of the current witness.

        +

        current_witness

        -
          -
        • example: blocktrades
        • -
        +

        Account name of the current witness.

        -

        total_powDeprecated

        +
          +
        • example: blocktrades
        • +
        -

        The total POW accumulated, aka the sum of num_pow_witness at the time new POW is added.

        +

        total_powDeprecated

        -
          -
        • example: 514415
        • -
        +

        The total POW accumulated, aka the sum of num_pow_witness at the time new POW is added.

        -

        num_pow_witnessesDeprecated

        +
          +
        • example: 514415
        • +
        -

        The current count of how many pending POW witnesses there are, determines the difficulty of doing pow.

        +

        num_pow_witnessesDeprecated

        -
          -
        • example: 172
        • -
        +

        The current count of how many pending POW witnesses there are, determines the difficulty of doing pow.

        -

        virtual_supply

        +
          +
        • example: 172
        • +
        -

        The virtual supply is the supply of all STEEM + all SBD if all SBD were converted to STEEM at the current median price.

        +

        virtual_supply

        -
          -
        • example: 283290592.652 STEEM
        • -
        +

        The virtual supply is the supply of all STEEM + all SBD if all SBD were converted to STEEM at the current median price.

        -

        current_supply

        +
          +
        • example: 283290592.652 STEEM
        • +
        -

        STEEM currently in existence.

        +

        current_supply

        -
          -
        • example: 271546371.129 STEEM
        • -
        +

        STEEM currently in existence.

        -

        confidential_supply

        +
          +
        • example: 271546371.129 STEEM
        • +
        -

        Total asset held in confidential balances.

        +

        confidential_supply

        -
          -
        • example: 0.000 STEEM
        • -
        +

        Total asset held in confidential balances.

        -

        current_sbd_supply

        +
          +
        • example: 0.000 STEEM
        • +
        -

        SBD currently in existence.

        +

        current_sbd_supply

        -
          -
        • example: 15478883.968 SBD
        • -
        +

        SBD currently in existence.

        -

        confidential_sbd_supply

        +
          +
        • example: 15478883.968 SBD
        • +
        -

        Total asset held in confidential balances.

        +

        confidential_sbd_supply

        -
          -
        • example: 0.000 SBD
        • -
        +

        Total asset held in confidential balances.

        -

        total_vesting_fund_steem Deprecated

        +
          +
        • example: 0.000 SBD
        • +
        -

        Now deprecated way to get STEEM that is invested in STEEM POWER (powered up).

        +

        total_vesting_fund_steem Deprecated

        -

        Use condenser_api.get_reward_fund instead.

        +

        Now deprecated way to get STEEM that is invested in STEEM POWER (powered up).

        -
          -
        • example: 192713261.007 STEEM
        • -
        +

        Use condenser_api.get_reward_fund instead.

        -

        total_vesting_shares

        +
          +
        • example: 192713261.007 STEEM
        • +
        -

        VESTS that are invested in STEEM POWER (powered up).

        +

        total_vesting_shares

        -
          -
        • example: 390950506702.452773 VESTS
        • -
        +

        VESTS that are invested in STEEM POWER (powered up).

        -

        total_reward_fund_steem

        +
          +
        • example: 390950506702.452773 VESTS
        • +
        -

        STEEM available in the reward pool.

        +

        total_reward_fund_steem

        -
          -
        • example: 0.000 STEEM
        • -
        +

        STEEM available in the reward pool.

        -

        total_reward_shares2 Deprecated

        +
          +
        • example: 0.000 STEEM
        • +
        -

        Now deprecated way to get the number of shares in the pool.

        +

        total_reward_shares2 Deprecated

        -

        Use condenser_api.get_reward_fund instead.

        +

        Now deprecated way to get the number of shares in the pool.

        -
          -
        • example: 0
        • -
        +

        Use condenser_api.get_reward_fund instead.

        -

        sbd_interest_rate

        +
          +
        • example: 0
        • +
        -

        This property defines the interest rate that SBD deposits receive.

        +

        sbd_interest_rate

        -
          -
        • example: 0
        • -
        +

        This property defines the interest rate that SBD deposits receive.

        -

        maximum_block_size

        +
          +
        • example: 0
        • +
        -

        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.

        +

        maximum_block_size

        -

        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.

        +

        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.

        -
          -
        • example: 65536
        • -
        +

        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.

        -

        current_aslot

        +
          +
        • example: 65536
        • +
        -

        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.

        +

        current_aslot

        -
          -
        • example: 24231997
        • -
        +

        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.

        -

        recent_slots_filled

        +
          +
        • example: 24231997
        • +
        -

        Used to compute witness participation.

        +

        recent_slots_filled

        -
          -
        • example: 340282366920938463463374607431768211455
        • -
        +

        Used to compute witness participation.

        -

        last_irreversible_block_num

        +
          +
        • example: 340282366920938463463374607431768211455
        • +
        -

        The latest block number that has been confirmed by two thirds of all block producers and is thus irreversible.

        +

        last_irreversible_block_num

        -
          -
        • example: 24155017
        • -
        +

        The latest block number that has been confirmed by two thirds of all block producers and is thus irreversible.

        -

        vote_power_reserve_rate

        +
          +
        • example: 24155017
        • +
        -

        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.

        +

        vote_power_reserve_rate

        -
          -
        • example: 10
        • -
        +

        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.

        -

        average_block_size Removed

        +
          +
        • example: 10
        • +
        -

        Removed in 0.20.6, see: #3029

        +

        average_block_size Removed

        -

        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.

        +

        Removed in 0.20.6, see: #3029

        -
          -
        • example: 9309
        • -
        +

        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.

        -

        current_reserve_ratio Removed

        +
          +
        • example: 9309
        • +
        -

        Removed in 0.20.6, see: #3029

        +

        current_reserve_ratio Removed

        -

        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.

        +

        Removed in 0.20.6, see: #3029

        -
          -
        • example: 200000000
        • -
        +

        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.

        -

        max_virtual_bandwidth Removed

        +
          +
        • example: 200000000
        • +
        -

        Removed in 0.20.6, see: #3029

        +

        max_virtual_bandwidth Removed

        -

        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

        +

        Removed in 0.20.6, see: #3029

        -
          -
        • example: 264241152000000000000
        • -
        +

        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

        -

        Not Covered

        +
          +
        • example: 264241152000000000000
        • +
        -

        Fields not covered in this recipe are:

        +

        Not Covered

        -
          -
        • confidential_supply
        • -
        • confidential_sbd_supply
        • -
        • pending_rewarded_vesting_shares
        • -
        • pending_rewarded_vesting_steem
        • -
        • sbd_print_rate
        • -
        • participation_count
        • -
        +

        Fields not covered in this recipe are:

        -

        Example Method Call

        +
          +
        • confidential_supply
        • +
        • confidential_sbd_supply
        • +
        • pending_rewarded_vesting_shares
        • +
        • pending_rewarded_vesting_steem
        • +
        • sbd_print_rate
        • +
        • participation_count
        • +
        -

        To retrieve the current results for condenser_api.get_dynamic_global_properties, we can retrieve the current state information using curl:

        +

        Example Method Call

        -
        curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}' https://api.steemit.com
        -
        +

        To retrieve the current results for condenser_api.get_dynamic_global_properties, we can retrieve the + current state information using curl:

        -

        Example Output

        +
        +
        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":{
        @@ -627,22 +647,23 @@ 

        Example Output< "vote_power_reserve_rate":10 } } -

        - -
        - -
        - - + + + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-recipes/vest-to-steem.html b/docs/tutorials-recipes/vest-to-steem.html index fcc960ac..afff3011 100644 --- a/docs/tutorials-recipes/vest-to-steem.html +++ b/docs/tutorials-recipes/vest-to-steem.html @@ -1,349 +1,370 @@ + - - - - - - - - - - - - - - - -Converting VESTS to STEEM | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Converting VESTS to STEEM | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + Converting VESTS to STEEM -

        - -

        How to convert VESTS to STEEM or STEEM POWER

        +

        + +

        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.

        +

        Intro

        -

        Steps

        +

        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.

        -
          -
        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. -
        +

        Steps

        -

        1. Get Dynamic Global Properties

        +
          +
        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. +
        -

        Following method can be used to fetch global values

        +

        1. Get Dynamic Global Properties + +

        -
        curl -s --data '{"jsonrpc":"2.0", "method":"condenser_api.get_dynamic_global_properties", "params":[], "id":1}' https://api.steemit.com
        -
        +

        Following method can be used to fetch global values

        -
        Example Output
        +
        +
        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":{
        @@ -377,33 +398,37 @@ 
        Example Output"max_virtual_bandwidth":"264241152000000000000" } } -
        +
        +
        -

        2. Formulate VESTS_TO_STEEM

        +

        2. Formulate VESTS_TO_STEEM +

        -

        From above results we have everything we need to calculate STEEM from given VESTS value.

        +

        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:

        +

        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
        -
        +
        +
        vestSteem = ( result.total_vesting_fund_steem x availableVESTS ) / result.total_vesting_shares
        +
        +
        -

        That’s it!

        +

        That’s it!

        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-recipes/virtual-operations-when-streaming-blockchain-transactions.html b/docs/tutorials-recipes/virtual-operations-when-streaming-blockchain-transactions.html index ed69bce4..07eee709 100644 --- a/docs/tutorials-recipes/virtual-operations-when-streaming-blockchain-transactions.html +++ b/docs/tutorials-recipes/virtual-operations-when-streaming-blockchain-transactions.html @@ -1,358 +1,385 @@ + - - - - - - - - - - - - - - - -Streaming blockchain transactions | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Streaming blockchain transactions | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + Streaming blockchain transactions -

        - -

        Including virtual operations when 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

        +

        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.

        -

        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.

        +

        Intro

        -

        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.

        +

        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.

        -

        Steps

        +

        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.

        -
          -
        1. Blocks, transactions and operations
        2. -
        3. Virtual operation streaming
        4. -
        +

        Steps

        -

        1. Blocks, transactions and operations

        +
          +
        1. Blocks, transactions and operations
        2. +
        3. Virtual operation streaming
        4. +
        -

        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.

        +

        1. Blocks, transactions and operations + +

        -
        stream = client.blockchain.getBlockStream();
        +            

        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:

        +

        Below is an example of what a block looks like:

        -
        {
        +            
        +
        {
           "block_id":"017fa2a9b142cd8d3607b7e7421412402bf97957",
           "extensions":[],
           "previous":"017fa2a867978140e7553bbfd65396a5a8136d53",
        @@ -364,11 +391,13 @@ 

        1. Blocks, transactions and opera "witness":"smooth.witness", "witness_signature":"204e00e747ce75b24fc26b5d18f12992197c61de0bf27c830416761bd25648238239c5eb26a5e392d474e27c601842e2ccf105ffb47f5a5712727412a18f106dbb" } -

        +
        +
        -

        Each block contains transactions:

        +

        Each block contains transactions:

        -
        {
        +            
        +
        {
           "block_num": 25141929,
           "expiration": "2018-08-17T08:41:42",
           "extensions": [],
        @@ -379,11 +408,13 @@ 

        1. Blocks, transactions and opera "transaction_id": "a972aef3388908f8a4b4a8d889fb89c83d2b8eb3", "transaction_num": 0 } -

        +
        +
        -

        And each transaction contains operations:

        +

        And each transaction contains operations:

        -
        [
        +            
        +
        [
           "vote", 
           {
             "author":"skmedia",
        @@ -392,15 +423,21 @@ 

        1. Blocks, transactions and opera "weight":4700 } ] -

        +
        +
        -

        2. Virtual operation streaming

        +

        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.

        +

        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:

        +

        steem-python provides a very simple method to stream virtual or any other operations directly:

        -
        from steem import Steem
        +            
        +
        from steem import Steem
         from steem.blockchain import Blockchain
         import pprint
         s = Steem()
        @@ -409,11 +446,13 @@ 

        2. Virtual operation streaming for op in b.stream('author_reward'): pprint.pprint(op) # break -

        +
        +
        -

        With result:

        +

        With result:

        -
        -

        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.

        +

        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.

        -
        - -
        - - + + + +

        That’s all there is to it.

        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/blog_feed.html b/docs/tutorials-ruby/blog_feed.html index ab89a7be..1bc9dabc 100644 --- a/docs/tutorials-ruby/blog_feed.html +++ b/docs/tutorials-ruby/blog_feed.html @@ -1,354 +1,373 @@ + - - - - - - - - - - - - - - - -RB: Blog Feed | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Blog Feed | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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

        +

        Full, runnable src of Blog Feed can be downloaded as part + of the RB tutorials repository. +

        -

        The script parses the creation date, assuming Zulu timezone (AKA UTC).

        +

        Script

        -

        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.

        +

        The script parses the creation date, assuming Zulu timezone (AKA UTC).

        -

        It also counts the words in the content body by splitting the text into an array of strings, delimited by whitespace.

        +

        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.

        -

        Finally, it creates the canonical URL by combining parent_permlink, author, and permlink.

        +

        It also counts the words in the content body by splitting the text into an array of strings, delimited by whitespace.

        -

        To Run

        +

        Finally, it creates the canonical URL by combining parent_permlink, author, and permlink.

        -

        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):

        +

        To Run

        -
        git clone git@github.com:steemit/devportal-tutorials-rb.git
        +            

        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

        +

        Example Output

        -
        2018-03-24 17:30:36 UTC
        +            
        +
        2018-03-24 17:30:36 UTC
           Post: Happy 2nd Birthday Steem Blockchain
           By: steemitblog
           Words: 301
        @@ -373,24 +392,25 @@ 

        Example Output

        By: steemitblog Words: 317 https://steemit.com/gopax/@steemitblog/steem-sbd-gopa -
        +
        +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/edit_content_patching.html b/docs/tutorials-ruby/edit_content_patching.html index 81513e13..848f3231 100644 --- a/docs/tutorials-ruby/edit_content_patching.html +++ b/docs/tutorials-ruby/edit_content_patching.html @@ -1,373 +1,386 @@ + - - - - - - - - - - - - - - - -RB: Edit Content Patching | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Edit Content Patching | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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 -—

        +

        Full, runnable src of Edit Content Patching can be downloaded as part of the RB tutorials repository. +

        -

        Intro

        +

        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 — +

        -

        This tutorial will show a technique for efficiently editing a post by only broadcasting changes to the post body.

        +

        Intro

        -

        Script

        +

        This tutorial will show a technique for efficiently editing a post by only broadcasting changes to the post body.

        -

        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.

        +

        Script

        -

        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.

        +

        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.

        -

        As stated earlier, you will need to change broadcast to true. You can also set other values to test this script on other post:

        +

        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.

        -
          -
        • 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.
        • -
        +

        As stated earlier, you will need to change broadcast to true. You can also set other values to test this script on other post:

        -

        To Run

        +
          +
        • 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.
        • +
        -

        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):

        +

        To Run

        -
        git clone git@github.com:steemit/devportal-tutorials-rb.git
        +            

        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

        +

        Example Output

        -
        Changes:
        +            
        +
        Changes:
         @@ -26,8 +26,26 @@
           edited)
         +%0AAppended content.
        @@ -381,24 +394,25 @@ 

        Example Output

        }, "id": 1 } -
        +
        +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/follow_another_user.html b/docs/tutorials-ruby/follow_another_user.html index 9dd414e8..b74ed01d 100644 --- a/docs/tutorials-ruby/follow_another_user.html +++ b/docs/tutorials-ruby/follow_another_user.html @@ -1,392 +1,418 @@ + - - - - - - - - - - - - - - - -RB: Follow Another User | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Follow Another User | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + RB: Follow Another User -

        - -

        How to follow/unfollow 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.

        +

        Full, runnable src of Follow Another User can + be downloaded as part of the RB tutorials repository. +

        -

        Sections

        +

        This tutorial will take you through the process of following/muting/unfollowing/ummuting an author and checking the follow status of an author.

        -
          -
        1. Follow
        2. -
        3. Check Follow
        4. -
        5. To Run - Running the example.
        6. -
        +

        Sections

        -

        Follow

        +
          +
        1. Follow
        2. +
        3. Check Follow
        4. +
        5. To Run - Running the example.
        6. +
        -

        In the first example script, we can modify the initial configuration then run:

        +

        Follow

        -
        ruby follow.rb
        -
        +

        In the first example script, we can modify the initial configuration then run:

        -

        Follows (and mutes) are expressed by custom_json with id=follow (mutes also use id=follow).

        +
        +
        ruby follow.rb
        +
        +
        -

        Example custom_json operation:

        +

        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:

        +

        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. -
        +
          +
        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

        +

        Check Follow

        -

        In the second example script:

        +

        In the second example script:

        -
        ruby check_follow.rb
        -
        +
        +
        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).

        +

        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).

        +

        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

        +

        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):

        +

        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
        +            
        +
        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

        +

        Example Output

        -
        {
        +            
        +
        {
           "jsonrpc": "2.0",
           "result": {
             "id": "025688e27999d3aa514f1f0b77c9f8d8dae31d72",
        @@ -396,24 +422,25 @@ 

        Example Output

        }, "id": 3 } -
        - -
        - -
        - -
        - - + + + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/get_account_comments.html b/docs/tutorials-ruby/get_account_comments.html index 9befc693..68f927af 100644 --- a/docs/tutorials-ruby/get_account_comments.html +++ b/docs/tutorials-ruby/get_account_comments.html @@ -1,352 +1,370 @@ + - - - - - - - - - - - - - - - -RB: Get Account Comments | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Get Account Comments | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        - - -
        - - + + + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/get_account_replies.html b/docs/tutorials-ruby/get_account_replies.html index b65ae18a..d14e2678 100644 --- a/docs/tutorials-ruby/get_account_replies.html +++ b/docs/tutorials-ruby/get_account_replies.html @@ -1,352 +1,370 @@ + - - - - - - - - - - - - - - - -RB: Get Account Replies | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Get Account Replies | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        - - -
        - - + + + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/get_follower_and_following_list.html b/docs/tutorials-ruby/get_follower_and_following_list.html index 9da3ccf8..82beeaf8 100644 --- a/docs/tutorials-ruby/get_follower_and_following_list.html +++ b/docs/tutorials-ruby/get_follower_and_following_list.html @@ -1,428 +1,464 @@ + - - - - - - - - - - - - - - - -RB: Get Follower And Following List | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Get Follower And Following List | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Get Follower And Following List can be downloaded as part of the RB tutorials repository. +

        -

        Intro

        +

        This tutorial will take you through the process of requesting either the follower or following list for an account on the blockchain.

        -

        In radiator, we can request follow results using condenser_api.get_following or condenser_api.get_follows methods. These methods take the following arguments:

        +

        Intro

        -
          -
        • 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)
        • -
        +

        In radiator, we can request follow results using condenser_api.get_following or condenser_api.get_follows methods. These methods + take the following arguments:

        -

        Steps

        +
          +
        • 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)
        • +
        -
          -
        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. -
        +

        Steps

        -

        1. Configure connection

        +
          +
        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. +
        -

        In the first few lines we initialize the configured library and packages (libraries are described in Gemfile):

        +

        1. Configure connection + +

        -
        require 'rubygems'
        +            

        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.:

        +

        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')
        -
        +
        +
        api = Radiator::Api.new(url: 'https://testnet.steemitdev.com')
        +
        +
        -

        2. Input variables

        +

        2. Input variables + +

        -

        Capture the arguments from the command line.

        +

        Capture the arguments from the command line.

        -
        account = ARGV[0]
        +            
        +
        account = ARGV[0]
         type = ARGV[1] || 'following'
         limit = (ARGV[2] || '-1').to_i
        -
        +
        +
        -

        3. Get followers/following

        +

        3. Get followers/following + +

        -

        Depending on the arguments passed, we call the corresponding method and the element name of what we are requesting:

        +

        Depending on the arguments passed, we call the corresponding method and the element name of what we are requesting:

        -
        method = "get_#{type}"
        +            
        +
        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.

        +

        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

        +

        4. Display + +

        -

        Iterate multiple calls to capture all of the results.

        +

        Iterate multiple calls to capture all of the results.

        -
        until count >= result.size
        +            
        +
        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

        +

        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):

        +

        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
        +            
        +
        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
        -
        - -
        - -
        - -
        - - + + + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/get_post_comments.html b/docs/tutorials-ruby/get_post_comments.html index eb10c1a4..faf51027 100644 --- a/docs/tutorials-ruby/get_post_comments.html +++ b/docs/tutorials-ruby/get_post_comments.html @@ -1,348 +1,367 @@ + - - - - - - - - - - - - - - - -RB: Get Post Comments | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Get Post Comments | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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

        +

        Full, runnable src of Get Post Comments can be + downloaded as part of the RB tutorials repository. +

        -

        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.

        +

        Script

        -

        To Run

        +

        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.

        -

        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):

        +

        To Run

        -
        git clone git@github.com:steemit/devportal-tutorials-rb.git
        +            

        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

        +

        Example Output

        -
        Replies by:
        +            
        +
        Replies by:
         	shahabshah
         	mumin007
         	bigblueleadsled
        @@ -364,24 +383,25 @@ 

        Example Output

        vsf badribireuen Total replies: 20 -
        +
        +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/get_post_details.html b/docs/tutorials-ruby/get_post_details.html index 8976e2bc..6e550bb4 100644 --- a/docs/tutorials-ruby/get_post_details.html +++ b/docs/tutorials-ruby/get_post_details.html @@ -1,389 +1,412 @@ + - - - - - - - - - - - - - - - -RB: Get Post Details | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Get Post Details | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + RB: Get Post Details -

        - -

        Understand and use the most common fields of the requested content.

        +

        + +

        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

        +

        Full, runnable src of Get Post Details can be downloaded + as part of the RB tutorials repository. +

        -

        This tutorial fetches the contents of a single post and explains all data related to that post.

        +

        Intro

        -

        We will also describe the most commonly used fields from the response object.

        +

        This tutorial fetches the contents of a single post and explains all data related to that post.

        -

        Sections

        +

        We will also describe the most commonly used fields from the response object.

        -
          -
        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. -
        +

        Sections

        -

        Making the api call

        +
          +
        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. +
        -

        To request a specific post we use the get_content method:

        +

        Making the api call

        -
        api = Radiator::Api.new
        +            

        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

        +

        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 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

        +

        Example Output

        -

        From the example we get the following output from our script

        +

        From the example we get the following output from our script

        -
        Post by steemitdev
        +            
        +
        Post by steemitdev
         	title: Announcing the Steem Developer Portal!
         	permlink: announcing-the-steem-developer-portal
         	category: steemdev
        @@ -409,136 +432,160 @@ 

        Example Output

        author_reputation: 14487360227924 tags: steemdev, steem, dev app: steemit/0.1 -
        +
        +
        -

        Post fields

        +

        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:

        +

        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

        +

        parent_author

        -

        In our script (get_post_details.rb), we use the ruby statement:

        +

        In our script (get_post_details.rb), we use the ruby statement:

        -
        content.parent_author.empty?
        -
        +
        +
        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.

        +

        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.

        +

        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

        +

        last_update and created

        -

        In our script, we use the ruby statement:

        +

        In our script, we use the ruby statement:

        -
        content.last_update == content.created
        -
        +
        +
        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.

        +

        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

        +

        cashout_time

        -

        In our script, we use the ruby statement:

        +

        In our script, we use the ruby statement:

        -
        (cashout = Time.parse(content.cashout_time + 'Z') - Time.now.utc) > 0
        -
        +
        +
        (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.

        +

        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.

        +

        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:

        +

        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
        • -
        +
          +
        • 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:

        +

        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
        • -
        +
          +
        • 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.

        +

        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

        +

        beneficiaries

        -

        In our script, we use the ruby statement:

        +

        In our script, we use the ruby statement:

        -
        content.beneficiaries.any?
        -
        +
        +
        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.

        +

        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:

        +

        To display a list of who the beneficiaries are, use the following ruby code, as seen in the example:

        -
        content.beneficiaries.each do |beneficiary|
        +            
        +
        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:

        +

        Note, if you just want an array of beneficiary account names, this will work in a pinch:

        -
        accounts = content.beneficiaries.map do |beneficiary|
        +            
        +
        accounts = content.beneficiaries.map do |beneficiary|
           beneficiary.account
         end
        -
        +
        +
        -

        active_votes

        +

        active_votes

        -

        In our script, we use the ruby statements:

        +

        In our script, we use the ruby statements:

        -
        votes = content.active_votes
        +            
        +
        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).

        +

        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

        +

        json_metadata

        -

        In our script, we use the ruby statements:

        +

        In our script, we use the ruby statements:

        -
        metadata = JSON[content.json_metadata || '{}'] rescue {}
        +            
        +
        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.

        +

        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.

        +

        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

        +

        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):

        +

        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>

        +

        *<content-url>

        -
        git clone git@github.com:steemit/devportal-tutorials-rb.git
        +            
        +
        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>
        -
        - -
        - -
        - -
        - - + + + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/get_posts.html b/docs/tutorials-ruby/get_posts.html index 3add2e8c..f4797dc5 100644 --- a/docs/tutorials-ruby/get_posts.html +++ b/docs/tutorials-ruby/get_posts.html @@ -1,375 +1,394 @@ + - - - - - - - - - - - - - - - -RB: Get Posts | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Get Posts | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + RB: Get Posts -

        - -

        This example will output posts depending on which category is provided as the arguments.

        +

        + +

        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

        +

        Full, runnable src of Get Posts can be downloaded as part + of the RB tutorials repository. +

        -

        Create a filed called get_posts_by_category.rb.

        +

        Script

        -

        This script will pick a method to call based on the arguments passed. The expected categories are:

        +

        Create a filed called get_posts_by_category.rb.

        -
          -
        • trending
        • -
        • hot
        • -
        • active
        • -
        • created
        • -
        • votes
        • -
        • promoted
        • -
        • children
        • -
        +

        This script will pick a method to call based on the arguments passed. The expected categories are:

        -

        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: ''.

        +
          +
        • trending
        • +
        • hot
        • +
        • active
        • +
        • created
        • +
        • votes
        • +
        • promoted
        • +
        • children
        • +
        -

        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:

        +

        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: ''.

        -
          -
        • Creation Timestamp
        • -
        • Title
        • -
        • Author
        • -
        • Net Votes
        • -
        • Number of replies
        • -
        • If it’s promoted
        • -
        • Number of words in the body
        • -
        • Canonical URL
        • -
        +

        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:

        -

        To Run

        +
          +
        • Creation Timestamp
        • +
        • Title
        • +
        • Author
        • +
        • Net Votes
        • +
        • Number of replies
        • +
        • If it’s promoted
        • +
        • Number of words in the body
        • +
        • Canonical URL
        • +
        -

        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):

        +

        To Run

        -
        git clone git@github.com:steemit/devportal-tutorials-rb.git
        +            

        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

        +

        Example Output

        -
        2018-05-24 06:38:33 UTC
        +            
        +
        2018-05-24 06:38:33 UTC
           Post: New Phone App For Steemit - Wow!
           By: happymoneyman
           Votes: 1087
        @@ -377,28 +396,29 @@ 

        Example Output

        Promoted: 0.001 SBD Words: 190 https://steemit.com/steemit/@happymoneyman/new-phone-app-for-steemit-wow -
        +
        +
        -

        Error Handling

        +

        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.

        +

        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.

        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/get_voters_list_on_post.html b/docs/tutorials-ruby/get_voters_list_on_post.html index 2815b051..82911eda 100644 --- a/docs/tutorials-ruby/get_voters_list_on_post.html +++ b/docs/tutorials-ruby/get_voters_list_on_post.html @@ -1,372 +1,391 @@ + - - - - - - - - - - - - - - - -RB: Get Voters List On Post | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Get Voters List On Post | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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

        +

        Full, runnable src of Get Voters List On Post can be downloaded as part of the RB tutorials repository. +

        -

        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).

        +

        Script

        -

        Then, we sort the votes by rshares to find the top voter.

        +

        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).

        -

        To Run

        +

        Then, we sort the votes by rshares to find the top voter.

        -

        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):

        +

        To Run

        -
        git clone git@github.com:steemit/devportal-tutorials-rb.git
        +            

        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

        +

        Example Output

        -
        Upvotes: 231
        +            
        +
        Upvotes: 231
         Downvotes: 1
         Unvotes: 0
         Total: 232
         Top Voter: thejohalfiles
        -
        +
        +
        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/getting_started.html b/docs/tutorials-ruby/getting_started.html index 01318419..6f95c564 100644 --- a/docs/tutorials-ruby/getting_started.html +++ b/docs/tutorials-ruby/getting_started.html @@ -1,385 +1,416 @@ + - - - - - - - - - - - - - - - -RB: Getting Started | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Getting Started | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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

        +

        Full, runnable src of Getting Started can be downloaded + as part of the RB tutorials repository. +

        -

        The following is a minimal Gemfile for running .rb files in these examples.

        +

        Setup

        -

        Add gem 'radiator' to your Gemfile. Then install the gem:

        +

        The following is a minimal Gemfile for running .rb files in these examples.

        -
        bundle install
        -
        +

        Add gem 'radiator' to your Gemfile. Then install the gem:

        -

        It is also possible to install radiator directly with gem:

        +
        +
        bundle install
        +
        +
        -
        gem install radiator
        -
        +

        It is also possible to install radiator directly with gem:

        -

        Then, to execute a script without a Gemfile, add to the top of your .rb files:

        +
        +
        gem install radiator
        +
        +
        -
        require 'radiator'
        -
        +

        Then, to execute a script without a Gemfile, add to the top of your .rb files:

        -

        Then, use the ruby command with radiator specified:

        +
        +
        require 'radiator'
        +
        +
        -
        ruby -r radiator myscript.rb
        -
        +

        Then, use the ruby command with radiator specified:

        -

        Examples

        +
        +
        ruby -r radiator myscript.rb
        +
        +
        -

        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.

        +

        Examples

        -

        From there, you can see all of the .rb files referenced on this site.

        +

        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.

        -
        git clone https://github.com/steemit/devportal.git
        +            

        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

        +

        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.

        +

        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.

        +

        Radiator also internally supports failover by specifying the failover_urls option.

        -

        To use the defaults:

        +

        To use the defaults:

        -
        api = Radiator::Api.new
        -
        +
        +
        api = Radiator::Api.new
        +
        +
        -

        To override the url option:

        +

        To override the url option:

        -
        api = Radiator::Api.new(url: 'https://rpc.steemliberator.com')
        -
        +
        +
        api = Radiator::Api.new(url: 'https://rpc.steemliberator.com')
        +
        +
        -

        To override both url and failover_urls options:

        +

        To override both url and failover_urls options:

        -
        options = {
        +            
        +
        options = {
           url: 'https://rpc.steemliberator.com',
           failover_urls: [
             'https://gtg.steem.house:8090',
        @@ -388,28 +419,29 @@ 

        Typical-Usage

        ] } api = Radiator::Api.new(options) -
        +
        +
        -

        Next Step

        +

        Next Step

        -

        If you’d like to dive right into the first tutorial, have a look at: Blog Feed

        +

        If you’d like to dive right into the first tutorial, have a look at: Blog Feed

        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/reblogging_post.html b/docs/tutorials-ruby/reblogging_post.html index c6595538..da0bf891 100644 --- a/docs/tutorials-ruby/reblogging_post.html +++ b/docs/tutorials-ruby/reblogging_post.html @@ -1,365 +1,385 @@ + - - - - - - - - - - - - - - - -RB: Reblogging Post | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Reblogging Post | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        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

        +

        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. -
        +
          +
        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

        +

        Making the api call

        -

        To broadcast the operation, we can use a Radiator::Transaction instance:

        +

        To broadcast the operation, we can use a Radiator::Transaction instance:

        -
        tx = Radiator::Transaction.new
        +            
        +
        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.

        +

        Passing true to Radiator::Transaction#process will broadcast the operations queued in the operations array of the transaction.

        -

        Example api call

        +

        Example api call

        -

        If we want to reblog, we need to form the json properly, for example:

        +

        If we want to reblog, we need to form the json properly, for example:

        -
        data = [
        +            
        +
        data = [
           :reblog, {
             account: reblogger,
             author: author,
        @@ -374,20 +394,24 @@ 

        Example api call

        required_posting_auths: [reblogger], json: data.to_json } -
        +
        +
        -

        Example api call using script

        +

        Example api call using script

        -

        And to do the same with our tutorial script:

        +

        And to do the same with our tutorial script:

        -
        ruby reblogging_post.rb https://steemit.com/@inertia/kinda-spooky
        -
        +
        +
        ruby reblogging_post.rb https://steemit.com/@inertia/kinda-spooky
        +
        +
        -

        Example Output

        +

        Example Output

        -

        From the example we get the following output from our script:

        +

        From the example we get the following output from our script:

        -
        {
        +            
        +
        {
           "jsonrpc": "2.0",
           "result": {
             "id": "0aa41e06b2612315d32cadeb671eb1201f266dd7",
        @@ -397,15 +421,18 @@ 

        Example Output

        }, "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).

        +

        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

        +

        Example Error

        -

        If a post has already been reblogged by the account, we will get back an error:

        +

        If a post has already been reblogged by the account, we will get back an error:

        -
        {
        +            
        +
        {
           "jsonrpc": "2.0",
           "error": {
             "code": -32000,
        @@ -578,62 +605,65 @@ 

        Example Error

        }, "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
        +
        +
        + +

        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>
        -
        - -
        - -
        - -
        - - + + + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/search_accounts.html b/docs/tutorials-ruby/search_accounts.html index c0f287eb..bcbd997b 100644 --- a/docs/tutorials-ruby/search_accounts.html +++ b/docs/tutorials-ruby/search_accounts.html @@ -1,411 +1,437 @@ + - - - - - - - - - - - - - - - -RB: Search Accounts | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Search Accounts | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + RB: Search Accounts -

        - -

        Performing a search on account by names starting with a given input.

        +

        + +

        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.

        +

        Full, runnable src of Search Accounts can be downloaded + as part of the RB tutorials repository. +

        -

        Sections

        +

        This tutorial will return account names matching the input given, up to a specified limit.

        -
          -
        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. -
        +

        Sections

        -

        Making the api call

        +
          +
        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. +
        -

        To request the a list of accounts starting with a particular lookup pattern, we can use the lookup_accounts method:

        +

        Making the api call

        -
        api = Radiator::Api.new
        +            

        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.

        +

        Notice, the above example can request up to 1000 accounts as an array.

        -

        Example api call

        +

        Example api call

        -

        If we want to get the accounts starting with “alice” …

        +

        If we want to get the accounts starting with “alice” …

        -
        api.lookup_accounts("alice", 10) do |content| ...
        -
        +
        +
        api.lookup_accounts("alice", 10) do |content| ...
        +
        +
        -

        Example api call using script

        +

        Example api call using script

        -

        And to do the same with our tutorial script, which has its own default limit of 10:

        +

        And to do the same with our tutorial script, which has its own default limit of 10:

        -
        ruby search_accounts.rb alice
        -
        +
        +
        ruby search_accounts.rb alice
        +
        +
        -

        Example Output

        +

        Example Output

        -

        From the example we get the following output from our script:

        +

        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
        -
        +
        +
        alice alice-22 alice-is alice-labardo alice-mikhaylova alice-n-chains alice-radster alice-sandra alice-thuigh alice-way
        +
        +
        -

        To Run

        +

        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):

        +

        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)
        • -
        +
          +
        • <lower-bound-name>
        • +
        • [limit] (optional)
        • +
        -
        git clone git@github.com:steemit/devportal-tutorials-rb.git
        +            
        +
        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]
        -
        - -
        - -
        - -
        - - + + + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/search_tags.html b/docs/tutorials-ruby/search_tags.html index f5ad2b6a..06e2745b 100644 --- a/docs/tutorials-ruby/search_tags.html +++ b/docs/tutorials-ruby/search_tags.html @@ -1,379 +1,402 @@ + - - - - - - - - - - - - - - - -RB: Search Tags | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Search Tags | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + RB: Search Tags -

        - -

        Performing a search for 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.

        +

        Full, runnable src of Search Tags can be downloaded as + part of the RB tutorials repository. +

        -

        Sections

        +

        This tutorial will return tags sorted by trending, up to a specified limit.

        -
          -
        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. -
        +

        Sections

        -

        Making the api call

        +
          +
        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. +
        -

        To request the a list of tags, we can use the get_trending_tags method:

        +

        Making the api call

        -
        api = Radiator::Api.new
        +            

        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.

        +

        Notice, the above example can request up to 100 tags as an array.

        -

        Example api call

        +

        Example api call

        -

        If we want to get 10 tags starting from the tag named “music” …

        +

        If we want to get 10 tags starting from the tag named “music” …

        -
        api.get_trending_tags("music", 10) do |content| ...
        -
        +
        +
        api.get_trending_tags("music", 10) do |content| ...
        +
        +
        -

        Example api call using script

        +

        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:

        +

        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
        -
        +
        +
        ruby search_tags.rb
        +
        +
        -

        Example Output

        +

        Example Output

        -

        From the example we get the following output from our script:

        +

        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: <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
        @@ -383,51 +406,54 @@ 

        Example Output

        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

        +

        Tag fields

        -

        Tags in the results of get_trending_tags returns the following 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.
        • -
        +
          +
        • 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

        +

        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):

        +

        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)
        • -
        +
          +
        • [limit] (optional)
        • +
        -
        git clone git@github.com:steemit/devportal-tutorials-rb.git
        +            
        +
        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]
        -
        - -
        - -
        - -
        - - + + + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/stream_blockchain_transactions.html b/docs/tutorials-ruby/stream_blockchain_transactions.html index 1f2665d8..9afb5921 100644 --- a/docs/tutorials-ruby/stream_blockchain_transactions.html +++ b/docs/tutorials-ruby/stream_blockchain_transactions.html @@ -1,407 +1,442 @@ + - - - - - - - - - - - - - - - -RB: Stream Blockchain Transactions | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Stream Blockchain Transactions | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +
        +

        + RB: Stream Blockchain Transactions -

        - -

        How to stream transactions and operations from Steem blockchain.

        +

        + +

        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.

        +

        Full, runnable src of Stream Blockchain Transactions can be downloaded as part of the RB tutorials repository. +

        -

        Sections

        +

        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.

        -
          -
        1. Streaming Transactions
        2. -
        3. Streaming Operations
        4. -
        5. To Run - Running the example.
        6. -
        +

        Sections

        -

        Streaming Transactions

        +
          +
        1. Streaming Transactions
        2. +
        3. Streaming Operations
        4. +
        5. To Run - Running the example.
        6. +
        -

        In the example script, we can stream transactions with the following arguments:

        +

        Streaming Transactions

        -
        ruby stream_blockchain_transactions.rb head transactions
        -
        +

        In the example script, we can stream transactions with the following arguments:

        -

        This will instruct the script to follow transactions at head block_num instead of irreversible.

        +
        +
        ruby stream_blockchain_transactions.rb head transactions
        +
        +
        -

        See: head_block_number vs. last_irreversible_block_num

        +

        This will instruct the script to follow transactions at head block_num instead of irreversible.

        -

        This is done by using the following ruby:

        +

        See: head_block_number vs. + last_irreversible_block_num +

        -
        stream.transactions(*args) do |trx|
        +            

        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).

        +

        The args variable contains the start (block_num to start from) and mode (head or irreversible).

        -

        Streaming Operations

        +

        Streaming Operations

        -

        In the example script, we can also pass the following arguments:

        +

        In the example script, we can also pass the following arguments:

        -
        ruby stream_blockchain_transactions.rb head ops comment
        -
        +
        +
        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.

        +

        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:

        +

        The script will allow multiple operation types:

        -
        ruby stream_blockchain_transactions.rb head ops comment vote
        -
        +
        +
        ruby stream_blockchain_transactions.rb head ops comment vote
        +
        +
        -

        Virtual operations are also allowed, but make sure to pass irreversible instead of head:

        +

        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
        -
        +
        +
        ruby stream_blockchain_transactions.rb irreversible ops producer_reward author_reward
        +
        +
        -

        Or, if you pass no operation types, the script will stream all types:

        +

        Or, if you pass no operation types, the script will stream all types:

        -
        ruby stream_blockchain_transactions.rb head ops
        -
        +
        +
        ruby stream_blockchain_transactions.rb head ops
        +
        +
        -

        This is done by using the following ruby:

        +

        This is done by using the following ruby:

        -
        stream.operations(type, *args) do |op|
        +            
        +
        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).

        +

        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

        +

        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):

        +

        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
        +            
        +
        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

        +

        Example Output

        -
        {"voter":"piggypet","author":"tanama","permlink":"daily-2018-9-12","weight":10000}
        +            
        +
        {"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}
        @@ -414,24 +449,25 @@ 

        Example Output

        {"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} -
        - -
        - -
        - -
        - - + + + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/submit_comment_reply.html b/docs/tutorials-ruby/submit_comment_reply.html index 80f1c6a0..9c2fa9d3 100644 --- a/docs/tutorials-ruby/submit_comment_reply.html +++ b/docs/tutorials-ruby/submit_comment_reply.html @@ -1,364 +1,386 @@ + - - - - - - - - - - - - - - - -RB: Submit Comment Reply | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Submit Comment Reply | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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

        +

        Full, runnable src of Submit Comment Reply can + be downloaded as part of the RB tutorials repository. +

        -

        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.

        +

        Intro

        -

        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).

        +

        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.

        -

        Script

        +

        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).

        -

        You should change wif to the posting key that matches your author. This script will pass along the values as a comment operation:

        +

        Script

        -
          -
        • 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.
        • -
        +

        You should change wif to the posting key that matches your author. This script will pass along the values as a + comment operation:

        -

        To Run

        +
          +
        • 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.
        • +
        -

        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):

        +

        To Run

        -
        git clone git@github.com:steemit/devportal-tutorials-rb.git
        +            

        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

        +

        Example Output

        -
        {
        +            
        +
        {
           "jsonrpc": "2.0",
           "result": {
             "id": "3fef14cac921e9baa7b31e43245e5380f3fb4332",
        @@ -368,30 +390,32 @@ 

        Example Output

        }, "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).

        +

        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

        +

        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.

        +

        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.

        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/submit_post.html b/docs/tutorials-ruby/submit_post.html index 1acb647e..bc639351 100644 --- a/docs/tutorials-ruby/submit_post.html +++ b/docs/tutorials-ruby/submit_post.html @@ -1,360 +1,382 @@ + - - - - - - - - - - - - - - - -RB: Submit Post | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Submit Post | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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.

        +

        + +

        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.

        +

        Full, runnable src of Submit Post can be downloaded as + part of the RB tutorials repository. +

        -

        Script

        +

        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.

        -

        You should change wif to the posting key that matches your author. This script will pass along the values as a comment operation:

        +

        Script

        -
          -
        • 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.
        • -
        +

        You should change wif to the posting key that matches your author. This script will pass along the values as a + comment operation:

        -

        To Run

        +
          +
        • 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.
        • +
        -

        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):

        +

        To Run

        -
        git clone git@github.com:steemit/devportal-tutorials-rb.git
        +            

        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

        +

        Example Output

        -
        {
        +            
        +
        {
           "jsonrpc": "2.0",
           "result": {
             "id": "768f7f64cee94413da0017ef79f592bb4da86baf",
        @@ -364,30 +386,32 @@ 

        Example Output

        }, "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).

        +

        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

        +

        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.

        +

        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.

        -
        +
        -
        + -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/tutorials-ruby/vote_on_content.html b/docs/tutorials-ruby/vote_on_content.html index b1fc74a7..07403716 100644 --- a/docs/tutorials-ruby/vote_on_content.html +++ b/docs/tutorials-ruby/vote_on_content.html @@ -1,383 +1,406 @@ + - - - - - - - - - - - - - - - -RB: Vote On Content | Steem Developer - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + RB: Vote On Content | Steem Developer + + + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -
        -

        - +
        +

        + + 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).

        +

        + +

        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

        +

        Full, runnable src of Vote On Content can be downloaded + as part of the RB tutorials repository. +

        -
          -
        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. -
        +

        Sections

        -

        Making the api call

        +
          +
        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. +
        -

        To broadcast the operation, we can use a Radiator::Transaction instance:

        +

        Making the api call

        -
        tx = Radiator::Transaction.new
        +            

        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.

        +

        Passing true to Radiator::Transaction#process will broadcast the operations queued in the operations array of the transaction.

        -

        Example api call

        +

        Example api call

        -

        If we want to vote, for example:

        +

        If we want to vote, for example:

        -
        tx.operations << {
        +            
        +
        tx.operations << {
           type: :vote,
           voter: voter,
           author: author,
           permlink: permlink,
           weight: weight
         }
        -
        +
        +
        -

        Example api call using script

        +

        Example api call using script

        -

        And to do the same with our tutorial script:

        +

        And to do the same with our tutorial script:

        -
        ruby vote_on_content.rb https://steemit.com/@inertia/kinda-spooky
        -
        +
        +
        ruby vote_on_content.rb https://steemit.com/@inertia/kinda-spooky
        +
        +
        -

        Example Output

        +

        Example Output

        -

        From the example we get the following output from our script:

        +

        From the example we get the following output from our script:

        -
        {
        +            
        +
        {
           "jsonrpc": "2.0",
           "result": {
             "id": "244a67bf1e64f05fb2ab52a0652a8edd30c5d273",
        @@ -387,20 +410,25 @@ 

        Example Output

        }, "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).

        +

        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 %:

        +

        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
        -
        +
        +
        ruby vote_on_content.rb https://steemit.com/@inertia/kinda-spooky 50
        +
        +
        -

        Example Error

        +

        Example Error

        -

        If an invalid vote weight is given (e.g.: 101 %), we will get back an error:

        +

        If an invalid vote weight is given (e.g.: 101 %), we will get back an error:

        -
        {
        +            
        +
        {
           "jsonrpc": "2.0",
           "error": {
             "code": -32000,
        @@ -498,52 +526,57 @@ 

        Example Error

        }, "id": 3 } -
        +
        +
        -

        This indicates that the operation was not included in the blockchain because it was given an invalid weight argument.

        +

        This indicates that the operation was not included in the blockchain because it was given an invalid weight argument.

        -

        Vote Fields

        +

        Vote Fields

        -

        Broadcasting a vote operation will require the following 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)
        • -
        +
          +
        • 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

        +

        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:

        +

        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 %)
        • -
        +
          +
        • <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
        +            
        +
        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]
        -
        - -
        - -
        - -
        - - + + + +
        + + + + + + - + - + \ No newline at end of file diff --git a/docs/tutorials/index.html b/docs/tutorials/index.html index dbe03065..ed750a6c 100644 --- a/docs/tutorials/index.html +++ b/docs/tutorials/index.html @@ -1,941 +1,952 @@ + - - - - - - - - - - - - - - - -Tutorials | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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

        - - - - -
        -
        - -
        - - +
        +

        + + 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: Steemlogin +

          Understand the basics of using Steemlogin 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 Steemlogin as well as client signing method.

          +
          +
        • + +
        • + JS: Power Up Steem +

          Power up an account’s Steem using either Steemlogin or a client-side signing.

          +
          +
        • + +
        • + JS: Power Down +

          Perform a power down on all or part of an account’s VESTS using either Steemlogin or client-side signing.

          +
          +
        • + +
        • + JS: Create Account +

          Create Steem account using Steemlogin as well as with client-side signing.

          +
          +
        • + +
        • + JS: Delegate Power +

          Delegate power to other users using Steemlogin 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

        + + + + +
        +
        + +
        + + - + - + \ No newline at end of file diff --git a/docs/unused/community.html b/docs/unused/community.html index 2885e79d..255e6693 100644 --- a/docs/unused/community.html +++ b/docs/unused/community.html @@ -1,346 +1,357 @@ + - - - - - - - - - - - - - - - -Community | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Community | Steem Developer + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -

        Steemdata

        - -

        Mongo database for accessing steem data.

        - -
        Host: mongo0.steemdata.com
        +    
        +

        + + 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

        +

        Official site: steemdata

        -

        SteemSQL

        +

        SteemSQL

        -

        Microsoft SQL database for accessing steem data

        +

        Microsoft SQL database for accessing steem data

        -

        Official site: steemsql

        +

        Official site: steemsql

        -
        - - + + + - + - + \ No newline at end of file diff --git a/docs/unused/database_api.html b/docs/unused/database_api.html index ad41ffee..f591fe90 100644 --- a/docs/unused/database_api.html +++ b/docs/unused/database_api.html @@ -1,348 +1,365 @@ + - - - - - - - - - - - - - - - -Database API | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Database API | Steem Developer + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -

        Subscription examples

        - -
        steem.api.setSubscribeCallback(callback, clearFilter, function(err, result) {
        +    
        +

        + + 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) {
        +        
        +
        steem.api.setPendingTransactionCallback(cb, function(err, result) {
           console.log(err, result);
         });
        -
        +
        +
        -
        steem.api.setBlockAppliedCallback(cb, function(err, result) {
        +        
        +
        steem.api.setBlockAppliedCallback(cb, function(err, result) {
           console.log(err, result);
         });
        -
        +
        +
        -
        steem.api.cancelAllSubscriptions(function(err, result) {
        +        
        +
        steem.api.cancelAllSubscriptions(function(err, result) {
           console.log(err, result);
         });
        -
        - -
        - - +
        +
        + + + + - + - + \ No newline at end of file diff --git a/docs/unused/docker.html b/docs/unused/docker.html index 5ea750c4..d8654607 100644 --- a/docs/unused/docker.html +++ b/docs/unused/docker.html @@ -1,364 +1,374 @@ + - - - - - - - - - - - - - - - -Docker | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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 \
        +    
        +

        + + 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

        +

        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:

        +

        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 \
        +        
        +
        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).

        - -
        - - +
        +
        + +

        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).

        + + + + - + - + \ No newline at end of file diff --git a/docs/unused/steemd.html b/docs/unused/steemd.html index a1e8f514..a7f1f504 100644 --- a/docs/unused/steemd.html +++ b/docs/unused/steemd.html @@ -1,328 +1,337 @@ + - - - - - - - - - - - - - - - -Steemd | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Steemd | Steem Developer + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        - - -
        - - +
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        + + +
        + + - + - + \ No newline at end of file diff --git a/docs/unused/tags.html b/docs/unused/tags.html index 574ee9e0..6b2d47fc 100644 --- a/docs/unused/tags.html +++ b/docs/unused/tags.html @@ -1,333 +1,344 @@ + - - - - - - - - - - - - - - - -Tags | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Tags | Steem Developer + + + + + + + + + + + + + + -
        -

        - - Steem Developer logo -

        - - -
        - - -
        - - - - - - - - - - - -
        -
        -
        -

        Steem Developer Portal

        - - - -
        -

        Tags examples

        - -
        steem.api.setSubscribeCallback(callback, clearFilter, function(err, result) {
        +    
        +

        + + Steem Developer logo +

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

        Steem Developer Portal

        + + + +
        +

        Tags examples

        + +
        +
        steem.api.setSubscribeCallback(callback, clearFilter, function(err, result) {
           console.log(err, result);
         });
        -
        - -
        - - +
        +
        + +
        + + - + - + \ No newline at end of file diff --git a/docs/unused/tutorials.html b/docs/unused/tutorials.html index aa6c3a89..5d02a766 100644 --- a/docs/unused/tutorials.html +++ b/docs/unused/tutorials.html @@ -1,358 +1,375 @@ + - - - - - - - - - - - - - - - -Tutorials | Steem Developer - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 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
        +    
        +

        + + 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:

        +
        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.

        +
        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:

        +
        Operation Stream
        +

        Example for operation Stream:

        -
        Decentralized Exchange
        -

        Example for decentralized exchange:

        +
        Decentralized Exchange
        +

        Example for decentralized exchange:

        -
        from steem import Steem
        +        
        +
        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 steem.blockchain import Blockchain
         from pprint import pprint
         
         for a in blockchain.blocks()
             pprint(a)
        -
        +
        +
        -
        from steem.blockchain import Blockchain
        +        
        +
        from steem.blockchain import Blockchain
         from pprint import pprint
         
         for a in blockchain.ops()
             pprint(a)
        -
        +
        +
        -
        from pprint import pprint
        +        
        +
        from pprint import pprint
         from steem import Steem
         from steem.dex import Dex
         
        @@ -371,21 +388,22 @@ 
        Decentralized Exchange
        pprint(dex.get_lowest_ask()) pprint(dex.get_higest_bid()) pprint(dex.transfer(10, "SBD", "fabian", "foobar")) -
        - - -
        - - +
        +
        + + + + + - + - + \ No newline at end of file