BitShares Forum

Main => Technical Support => Topic started by: akashic on June 15, 2018, 10:18:56 pm

Title: pybitshares: relationship between wallet and from-account specified in transfer
Post by: akashic on June 15, 2018, 10:18:56 pm
In looking at the following code:

Code: [Select]
from pprint import pprint
from bitshares import BitShares

testnet = BitShares(
    "wss://node.testnet.bitshares.eu",
    nobroadcast=True,
    bundle=True,
)

testnet.wallet.unlock("supersecret")

testnet.transfer("init0", 1, "TEST", account="xeroc")
testnet.transfer("init1", 1, "TEST", account="xeroc")
testnet.transfer("init2", 1, "TEST", account="xeroc")
testnet.transfer("init3", 1, "TEST", account="xeroc")

pprint(testnet.broadcast())

We see that assets are transferred from the account xeroc to init0, init1, init2, and init3.

My questions are:
Title: Re: pybitshares: relationship between wallet and from-account specified in transfer
Post by: sschiessl on June 20, 2018, 11:22:55 am
1. Yes, precisely
2./3./4. Every account in BitShares has permissions that are granted by holding the corresponding private key. By adding the private key to the wallet you grant the corresponding permission. The wallet recognizes itself if this key belongs to an account.