5 votes

How to decode XDR of the result_xdr

It is possible to decode XDR objects by using the stellar_base.stellarxdr module. from stellar_base.stellarxdr import Xdr import base64 result_bytes = base64.b64decode(response['result_xdr']) ...
user avatar
  • 1,366
4 votes
Accepted

Python vs Java(script) for stellar apps. Is it worth learning a new language?

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 ...
user avatar
  • 6,836
2 votes

Python Stellar SDK Test Net

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://...
user avatar
  • 3,357
2 votes
Accepted

How to extract the public address from the private seed in python?

It turns out to be pretty simple: from stellar_base.keypair import Keypair print('address: %s' % Keypair.from_seed(my_seed).address().decode())
user avatar
  • 1,581
2 votes
Accepted

Error while setting up Stellar Python SDK on Amazon EC2

Make sure you've installed the Python dev package. sudo apt-get install python3.6-dev
user avatar
2 votes
Accepted

Python SDK - What's the difference between stellar-base and stellar-sdk?

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/
user avatar
  • 81
1 vote

How do I retrieve the source account, memo, and amount using python?

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 ...
user avatar
  • 627
1 vote
Accepted

Get existing offer id pysdk

You can get a list of existing offers submitted by a particular account with the following methods: offers().for_seller(self.account_id) Example code: offers = server.offers().for_seller(self....
user avatar
  • 131
1 vote

Account' object has no attribute 'sign_decorated

You should sign the transaction with Keypair. transaction.sign(funding_keypair)
user avatar
  • 81
1 vote
Accepted

xdrlib.Error: value=-915689825 not in enum ClaimableBalanceIDType, when I try to claim the created balance

def get_balance_id(create_claimable_balance_resp): effects_link = create_claimable_balance_resp["_links"]["effects"]["href"].split("{")[0] resp = ...
user avatar
  • 111
1 vote

Error when django-polaris installation

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 ...
user avatar
  • 31
1 vote

How can I get the value of the Stellar Transaction?

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, ...
user avatar
  • 81
1 vote

How can I get the value of the Stellar Transaction?

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 ...
user avatar
  • 2,514
1 vote
Accepted

Python: Retrieve Offer_id from a manage offer operation?

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(...
user avatar
  • 2,514
1 vote
Accepted

horizon.stellar.org | 504: Gateway time-out errors are FREQUENT!

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 ...
user avatar
  • 2,514
1 vote

horizon orderbook calls using py-stellar-base

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 ...
user avatar
  • 316
1 vote
Accepted

Error in transaction creation

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
user avatar
  • 421
1 vote

Error in transaction creation

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 ...
user avatar
  • 236
1 vote

Python / Django - Accept payements ? Seed storage?

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 ...
user avatar

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