Created
April 11, 2018 11:09
-
-
Save xeroc/1d41db979d0d89cff05404fc49f687a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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