Claiming & Creating Discounted Hive Accounts | Showcase Monday
Hive accounts are not free. Currently, it costs 3 Hive to create a Hive account. The account registration fee is set by witnesses, and this can change based on what witnesses set this parameter to. As Hive prices fluctuate, the cost for creating Hive accounts in USD change too. When Hive prices are high, the USD value of account creating goes up too. In such situations witnesses can act to change to registration fee and still keep Hive account creation fees affordable.
Hive also has discounted account creation tokens. Anybody who has decent amount of RC, can claim these tokens. Transactions on Hive aren't free either. They cost resource credits. The more Hive Power the account has, the more resource credits are available for the account. Since interacting with the blockchain doesn't require too much of resource credits, most of the time resource credits get unused. One of the ways to use them is to claim account creation tokens.
Some front-end apps like peakD provide options to claim these tokens. We can also claim account creation tokens using Beem. After claiming available tokens, resource credits get depleted and takes few days for RC fully recharge. One RC is full again, we can claim tokens again. Some may choose to automate this process.
Let's take a look how we can claim accounts using Beem.
from beem import Hive
from beem.nodelist import NodeList
from beem.account import Account
from beem.rc import RC
import pprint
import getpass
import time
if __name__ == "__main__":
nodelist = NodeList()
nodelist.update_nodes()
nodes = nodelist.get_hive_nodes()
wif = getpass.getpass(prompt='Enter your Hive active key:')
hive = Hive(node=nodes, keys=[wif])
creator = hive.wallet.getAccountFromPrivateKey(wif)
creator = Account(creator)
rc = RC(blockchain_instance=hive)
current_costs = hive.get_rc_cost(rc.get_resource_count(tx_size=250, new_account_op_count=1, execution_time_count=1))
current_mana = creator.get_rc_manabar()["current_mana"]
last_mana = current_mana
print("Current costs %.2f G RC - current mana %.2f G RC" % (current_costs / 1e9, current_mana / 1e9))
while current_costs + 10 < last_mana:
hive.claim_account(creator)
time.sleep(10)
creator.refresh()
current_mana = creator.get_rc_manabar()["current_mana"]
print("Account claimed and %.2f G RC paid." % ((last_mana - current_mana) / 1e9))
last_mana = current_mana
print("Not enough RC for a claim!")
The code will calculate the current resource credits and keeps claiming account creation tokens until there aren't enough resource credits left to claim a token. This way we can claim multiple account creation tokens.
After having account creation tokens in the account, we can create accounts using these tokens. Let's see how that can be done using Beem.
from beem import Hive
from beem.nodelist import NodeList
from beem.account import Account
from beem.rc import RC
import pprint
import getpass
import time
if __name__ == "__main__":
new_account_name = 'mynewhiveaccount'
new_account_pass = 'XXXXXXXXXXXXXXXXXXXXXXXXX'
#if account already exists, throws account exists exception.
nodelist = NodeList()
nodelist.update_nodes()
nodes = nodelist.get_hive_nodes()
wif = getpass.getpass(prompt="Enter your account creator's Hive active key:")
hive = Hive(node=nodes, keys=[wif])
creator = hive.wallet.getAccountFromPrivateKey(wif)
creator = Account(creator)
result = hive.create_claimed_account(new_account_name, creator=creator, password=new_account_pass)
print(result)
time.sleep(10)
new_account = Account(new_account_name)
new_account.print_info()
As you can see creating claimed accounts is even easier than claiming tokens. Using discounted or free account creation tokens can help apps and front-ends with onboarding new participants without a need to spend a lot of Hive.
Posted Using LeoFinance Beta
This post has been manually curated by @bhattg from Indiaunited community. Join us on our Discord Server.
Do you know that you can earn a passive income by delegating your Leo power to @india-leo account? We share 100 % of the curation rewards with the delegators.
Please contribute to the community by upvoting this comment and posts made by @indiaunited.
cool!
@tipu curate
Upvoted 👌 (Mana: 0/80) Liquid rewards.
Thanks for sh6this initiative
@geekgirl
I am a newbie here. I don't think I understand how to claim these tokens you talk about. I am not familiar with code, and those codes have left me confused. Could you shed some more light, please 🥺?
Same here honestly
You would need at least about 4-5k HP to claim at least one account claim token. The purpose of these is to let Apps create accounts for free based on how much HP they have.
This is awesome ❤️ Does it need to be run from a vps, or does Beem host the script?
You can run the code on any computer that can run python. Dependencies would need to be installed first thought.
I've always been curious about python, I might look into it when things settle down for me :) ... But my coding skills are very limited 😂
!PIZZA !ALIVE !LOL
lolztoken.com
Or what the judge called a “restraining order”
Credit: reddit
@geekgirl, I sent you an $LOLZ on behalf of @wrestlingdesires
Use the !LOL or !LOLZ command to share a joke and an $LOLZ. (4/4)
I have always wondered why people claimed accounts, I did not know there was an earning model behind it. Thanks for the wrap up
Whats the minimum amount needed to start claiming?
About 5K HP. Maybe a little more. The cost in RC changes from time to time.
So, you just run this python in an IDE?
anywhere the python can be run.
So he's pulling the account by himself. Interesting.
getting the account based on a private key.
That's a very interesting way of doing it. So if you lose your private KEY, your Attacker just has your account as well at the same time.
I believe so
I learn something new everyday on HIVE, because honestly; I'm noob-centric with a lot of this stuff. Hey, if anyone can show us ways to save some of our HIVE; that's a WIN! Thanks @geekgirl for the knowledge.
Thank you Jimmy!
Informative post.. I never knew about Beem before now.
That is some good advice and solution to getting more hive accounts created. I would think that 3 HIVE cost would really add up.
Wow there is always something new to learn. It will take me alittle knowledge on coding to understand this. I am learning about right now. hopefully i can take advantage of this in the future.
Thanks for the great post
Just wondering but are the costs of claiming tokens a fixed RC amount or is it variable based on how many people are claiming? Also do you know how much HP is needed to claim an account right now?
Posted Using LeoFinance Beta
Yes, the cost in RC changes. I normally can claim between 9 and 12 tokens. I just ran the script and this is what is showed:
Current cost 11908.37 G RC - current mana 107380.56 G RC
I have 58K HP, and looks like that equals to 107380.56 G RC.
This is cool! Could you explain how to generate random "new_account_pass"? Thanks!
When using above code to create an account, for `new_account_pass" you come up with your own password and it serves as a master key and a phrase to generate the other private keys. The other private keys are generated for you.
I see. Thank you so much!
Thank you for explaining this in a digestible way for noobs like me 😄
The more I read people's posts the more I learn, hive is amazing.
Awesome! I have been wanting to claim extra account tokens for a while now but never have enough RC's I should check again now! Thanks for the reminder!
New day, new information
Posted Using LeoFinance Beta
This post is a whole class itself.
Something New I have to learn.
Thanks @geekgirl
How i can input these codes in beem ?
beem.io website or beem dapp
Posted Using LeoFinance Beta
Beem is a python library. You need to know python.
This is quite an education on claiming accounts using Beem. Hive creates opportunities to learn new things and with time, this coding and all will no longer be new, thanks.
I didn't know that. I have been telling people it is free to join the Hive. Nobody has ever told me I was wrong. Thanks for the info.
It is free for most people, because others provide services to create accounts. Not sure who is creating accounts for free these days.
You are full of so much interesting information! I knew there was a software way to create/claim accounts, but, so far, I only made this one and my Splinterlands account for free using ecency, which requires email verification.
I have a comp sci degree from the year cough. I am currently learning Python. Early days, but, you know, when you know a few languages...