steem and hive account creator

in #steem4 years ago

Hi there,

here a simple python code I wrote recently to help me in creating new accounts from claimed account tokens both in the steem blockchain and in the hive one.

It works with beem library, and you just need to insert the new account name, and the script will check its availability on the blockchain, than a solid password and the account will be created.

It is important that you understand that the script uses the account creation ticket you should already have created to claim the new account.

#!/usr/bin/python
from beem import Steem
from beem.account import Account
from beem.rc import RC
from beem.vote import Vote
from beem.instance import set_shared_steem_instance
from beem.exceptions import ContentDoesNotExistsException
from beem.comment import Comment
import time


def name():
    new_account=input('Enter the new account name:')
    try:
        acc=Account(str.lower(new_account),steem_instance=stm)
        print  (acc.name+' is UNAVAILABLE!')
        name()
    except Exception as e:
        print (new_account+' is AVAILABLE!')
        return new_account

def password_():  
    password = input('Enter the new password for the new account:')
    password2= input('Re-Enter the new password for the new account:')
    if password==password2:
        print(stm.create_claimed_account(new_account_name, creator='[account creator]', password=password))
        time.sleep(4)
        new_account = Account(new_account_name)
        new_account.print_info()
        print('CREATED')
    else:
        print ('Passwords are different please re-try')
        password_()

stm = Steem("https://anyx.io",keys='')#insert hive private active key
set_shared_steem_instance(stm)
account=Account("[YOUR ACCOUNT NAME]",steem_instance=stm)
new_account_name=name()
password_()
stm=0
stm = Steem("https://api.steemit.com",keys='')#insert steem private active key
set_shared_steem_instance(stm)
account=Account("[YOUR ACCOUNT NAME]",steem_instance=stm)
new_account_name=name()
password_()

This is the repo on github: https://github.com/digital-mine/steem-and-hive-account-creator

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.032
BTC 63313.23
ETH 3079.99
USDT 1.00
SBD 3.89