4

Stellar JavaScript SDK features one undeniable advantage – it gives an ability to create a Stellar app that will work directly in a browser. Browser-based apps are easier to promote (no need to install anything on your smartphone/laptop), easier to support (single implementation for all modern browsers), and you can safely forget about versions hell (users ...


4

It is possible to decode XDR objects by using the stellar_base.stellarxdr module. from stellar_base.stellarxdr import Xdr result_bytes = base64.b64decode(response['result_xdr']) tx_result = Xdr.StellarXDRUnpacker(result_bytes).unpack_TransactionResult() To get a hold of the contents as readable text: import jsonpickle p = jsonpickle.Pickler(keys=True) ...


2

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.


2

It turns out to be pretty simple: from stellar_base.keypair import Keypair print('address: %s' % Keypair.from_seed(my_seed).address().decode())


2

Make sure you've installed the Python dev package. sudo apt-get install python3.6-dev


2

stellar-base is an earlier version, it is no longer maintained, please use stellar-sdk. You can find the development documentation here: https://stellar-sdk.readthedocs.org/


1

First, make sure your pip installation is for Python 3. If you have python3.3 or higher installed, you can test with a non-system pip by creating a virtual environment. mkdir test cd test python3 -m venv .venv . .venv/bin/activate pip install django-polaris --index-url=https://pypi.org/simple If it works, something is wrong with your system pip or pip3 ...


1

At first, I recommend you read this article, which describes the composition of a transaction. Hope this example helps. from stellar_sdk import TransactionEnvelope, Network, TextMemo, IdMemo, HashMemo, ReturnHashMemo, Payment envelope_xdr = 'AAAAAD11sXdkWzZ8LQrxr5zWXdrI6CK5Pz/+...


1

A stellar transaction consists of one or more operations such as payment, createAccount, setOptions. I'm not familiar with python-sdk but I think like in other sdk's the transaction object should also have a operations method or property which should deliver all related operations. You have to iterate through the operations of a given transaction (for op in ...


1

I'll admit, I am not the most familiar with the Python Stellar Base, however I have heard great things about it! Gave it a quick look and saw that it does have methods for parsing XDR. Take the Asset class for example. Here you can see we have a from_xdr_object method that takes in XDR and outputs an Asset. I believe this is the type of functionality you ...


1

It's contained in the horizon response which can be decoded like this: response = builder.submit() result_bytes = base64.b64decode(response['result_xdr']) tx_result = Xdr.StellarXDRUnpacker(result_bytes).unpack_TransactionResult() offerId = tx_result.result.results[0].tr.manageOfferResult.success.offer.offer.offerID print(offerId)


1

504 means that a proxy server between you and the horizon server could connect to horizon but did not get a response in time. The /metrics shows completely different values on every reload. So actually they run a bunch of horizon servers behind a load balancer, you are connected with a different server each time, the one that causes 504 is supposedly under ...


1

I'm not 100% sure if I understood you correctly, but you may be mixing up two concepts: The offers within the Address class are giving you the offers that one Account has made, regardless of the actual asset (the naming is a bit off in the sdk, as an Address is pointing to an Account, in this case it's the same). Example: Account X wants to buy 10 Gold ...


1

The issue is you signed the transaction using ALICE. it need to be alice_seed. Alice is a key pair where alice_seed is the private key


1

I don't see Alice source Address in your above code as you have commented that in the transaction envelope, can you add that and then try to send the payment. Something you need to know :- The error op_bad_auth usually occurs when you send payment either using incorrect private key or sending an asset you are not authorized to send. Check Bob's account is ...


1

At the moment, there are no stellar-django packages. Not sure what you mean here by "seed" but user data shouldn't be stored on any public facing endpoints/public facing endpoints. I think the answer you may be looking for is try implementing in browser signing instead.


Only top voted, non community-wiki answers of a minimum length are eligible