steems.top更新,添加修改密码功能,一些BUG修正

in STEEM CN/中文4 months ago

http://wallet.steems.top/
更新,添加密码计算器,一些BUG修正

更新内容
1.添加修改密码功能
2.修正了各种各样的BUG

image.png

修改密码的主要核心代码:

from beem.steem import Steem
from beembase import operations
from beem.transactionbuilder import TransactionBuilder
from beem.account import Account
from beemgraphenebase.account import PasswordKey


nodes = 'https://cn.steems.top'  # 节点

player = "iwantgotodie"  # 用户名

old_password = "hahajojo"  # 老主密码
password = "haddfdsfdsfhajojo"  # 要改的密码





# 从新密码生成KEY
owner_key = PasswordKey(player, password, role="owner")
posting_key = PasswordKey(player, password, role="posting")
active_key = PasswordKey(player, password, role="active")
memo_key = PasswordKey(player, password, role="memo")

# 新密码
owner_key2 = owner_key.get_private()
posting_key2 = posting_key.get_private()
active_key2 = active_key.get_private()
memo_key2 = memo_key.get_private()

print("新密码")
print("主密码:", password)
print("owner_key:", owner_key2)
print("posting_key:", posting_key2)
print("active_key:", active_key2)
print("memo_key:", memo_key2)

owner_key = owner_key.get_public()
print("公钥:", owner_key)
posting_key = posting_key.get_public()
active_key = active_key.get_public()
memo_key = memo_key.get_public()

key = PasswordKey(player, old_password, role="owner")  # owner key
# key2=key.get_private()
# key3=key.get_public_key()

key = key.get_private()
key = str(key)
# print("老密码",key2,key3)

s = Steem(keys=[key], node=nodes)
account = Account(player, steem_instance=s)

who_owner = {'weight_threshold': 1, 'account_auths': [], 'key_auths': [[str(owner_key), 1]]}
who_active = {'weight_threshold': 1, 'account_auths': [], 'key_auths': [[str(active_key), 1]]}
who_posting = {'weight_threshold': 1, 'account_auths': [], 'key_auths': [[str(posting_key), 1]]}

op = operations.Account_update(
    **{
        "account": account["name"],
        "json_metadata": account["json_metadata"],
        "owner": who_owner,
        "active": who_active,
        "posting": who_posting,
        "memo_key": str(memo_key)
    })

tx = TransactionBuilder(steem_instance=s)

tx.appendOps(op)
# 把签名添加并签名
tx.appendSigner(player, "owner")
# tx.appendSigner(player2, "owner")
tx.sign()

# 广播
tx.broadcast()
print("密码修改完成")


Sort:  

Your Post has been voted by steem communication project led by @steem-supporter

Use #codeonsteem on your posts

Steem Has a lot of Posibilities , Lets harnesh this together

Steem Has a lot of Posibilities , Lets harnesh this together

Coin Marketplace

STEEM 0.16
TRX 0.03
JST 0.027
BTC 11641.54
ETH 379.53
USDT 1.00
SBD 1.00