This is a collection of various snippets for steem.
This is intended to be a collection where people can come, search for a specific functionality and have a working code snippet associated.
If you try a snippet and it ends up not working/is outdated, please open an issue or a pull request :)
Don't hesitate to submit a pull request if you want to contribute to the collection.
Made by @howo : https://steemit.com/@howo
Active snippets (add things to the blockchain)
- How to use @almost-digital's testnet https://testnet.steem.vc/
- How to create an account
- How to post an article
- How to comment on an article
- How to cast a vote/flag
- How to transfer steem/sbd
- How to resteem a post
- How to power up steem
Passive snippets (read from the blockchain) :
- How to test if an username/password or username/privatekey is correct
- How to get recent posts
- How to get the steem power of an user
- How to get the number of followers and follows of an user
- How to test if a post exists or not
- How to get the voting power of an user
- How to get the downvoting power of an user
- Convert simplified reputation to an approximate raw score
- How to get the main post author and permlink from a comment
- How to get the simplified and raw reputation of an user
- How to post an article
- How to claim a discounted account
- How to comment on an article
- How to cast a vote/flag
- block stream skeleton to easily act on various operations as they go live on the blockchain
- How to claim discounted accounts
- How to create a discounted account
- How to get all the comments from a post in a tree structure
- How to get active votes of an user
- How to power up steem
- How to get the downvoting power of an user
I obviously accept external pull requests. Look up github's documentation on How to create a pull request on how to do so. But make sure you follow these rules :
- The function must be small and must only do one action (post an article, broadcast a vote etc).
- The function must be fully commented jsdoc/python docstring style
- The files must follow the directory structure :
- /library/nameofthesnippet/nameofhtesnippet.js/.py
- The file must include an installation file with all the dependencies. Aka a requirements.txt for python or a package.json for nodejs. This must be placed next to the source code file.