Skip to content

Instantly share code, notes, and snippets.

@xeroc
Created April 11, 2018 11:09
Show Gist options
  • Save xeroc/1d41db979d0d89cff05404fc49f687a3 to your computer and use it in GitHub Desktop.
Save xeroc/1d41db979d0d89cff05404fc49f687a3 to your computer and use it in GitHub Desktop.
from peerplays import PeerPlays
from peerplays.account import Account
from peerplaysbase.operations import Account_update
from pprint import pprint
from getpass import getpass
pwd = getpass()
ppy = PeerPlays(nobroadcast=True)
ppy.wallet.unlock(pwd)
keys = {
"init0": "PPY71qUw2FmDTFu3xRNztdypc1CFdFHQYbfKgzsyNtBLvdHg7q5qG",
"init1": "PPY64UgQ1p3ddDHSczjtVVkVaCxAtiGmXUPJHPDqbnMKDQNd3GnT7",
}
ops = list()
for name in keys.keys():
account = Account(name)
perm = {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [[keys[name], 1]],
"address_auths": []
}
ops.append(Account_update(**{
"fee": {"amount": 0, "asset_id": "1.3.0"},
"account": account["id"],
"owner": perm,
"active": perm,
"extensions": {},
}))
tx = ppy.finalizeOp(ops, account, "owner")
pprint(tx)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment