I'm confused on how to use the Stellar Testnet for python. I have set up the friendbot to create an account. ('https://friendbot.stellar.org') How do we set up a balance on the testnet using the bot?
1 Answer
Creating and funding a test account using py-stellar-base:
from stellar_base.keypair import Keypair
kp = Keypair.random()
publickey = kp.address().decode()
import requests
r = requests.get('https://friendbot.stellar.org/?addr=' + publickey)
publicKey
'GCID6D7HMFPXGKQI5CCLKDGH4UL2X2XUUOAFN6ZAYO5XCMUK4CT3SBHJ'
Resulted in this funded testnet account.