referrer="vel-ma",
                           referrer_percent=50,
                           owner_key=None,
                           active_key=None,
                           memo_key=None,
                           owner_account="vel-ma",
                           active_account=None,
                           password="******",
                           additional_owner_keys=[],
                           additional_active_keys=[],
                           additional_owner_accounts=["vel-ma", "oatrick1995"],
                           additional_active_accounts=[],
                           proxy_account="proxy-to-self",
                           storekeys=True))

testnet.broadcast()

##allow - change threashold
foreign_account = format(
    PasswordKey("mutual-insurance-fund-993", "somethingstupid",
                "active").get_public(), "TEST")
print_tx(
    testnet.allow(
        foreign_account,
        weight=1,
        account="vel-ma",
        permission="active",
        threshold=2,
    ))

##transfer funds
示例#2
0
account = "alfredo-worker"
proposer = "oxarbitrage.a699"
vesting_id = "1.13.1608"

bitshares = BitShares(
    nobroadcast=False,
    bundle=True,
    proposer=proposer,
    proposal_expiration=60 * 60 * 24 * 2,
)
set_shared_bitshares_instance(bitshares)
market = Market("USD:BTS")
price = market.ticker()["quoteSettlement_price"]

bitshares.wallet.unlock(getpass())
vesting = Vesting(vesting_id)

print("Claiming Vesting Balance: %s" % vesting.claimable)
bitshares.vesting_balance_withdraw(vesting["id"],
                                   amount=vesting.claimable,
                                   account=account)

print("Buying as much bitUSD at price up to %s or %s" %
      (price * 0.90, (price * 0.90).copy().invert()))
market.buy(price * 0.9, Amount(3200, "USD"), killfill=True, account=account)

print("Worker alfredo payment - 15 days")
bitshares.transfer("oxarbitrage.a699", 3200, "USD", account=account)

pprint(bitshares.broadcast())
    print(binascii.hexlify(signData).decode())

    dongle = getDongle(True)
    offset = 0
    first = True
    singSize = len(signData)
    while offset != singSize:
        if singSize - offset > 200:
            chunk = signData[offset:offset + 200]
        else:
            chunk = signData[offset:]

        if first:
            totalSize = len(donglePath) + 1 + len(chunk)
            apdu = binascii.unhexlify("B5040000" + "{:02x}".format(
                totalSize) + "{:02x}".format(pathSize)) + donglePath + chunk
            first = False
        else:
            totalSize = len(chunk)
            apdu = binascii.unhexlify("B5048000" +
                                      "{:02x}".format(totalSize)) + chunk

        offset += len(chunk)
        result = dongle.exchange(apdu)
        print(binascii.hexlify(result).decode())
    if args.broadcast:
        tx_sig = blockchain.new_tx(json.loads(str(tx)))
        tx_sig["signatures"].extend([binascii.hexlify(result).decode()])
        print(tx_sig)
        print(blockchain.broadcast(tx=tx_sig))