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'])
...
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 ...
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://...
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())
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
2
votes
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 ...
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/
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....
1
vote
Account' object has no attribute 'sign_decorated
You should sign the transaction with Keypair.
transaction.sign(funding_keypair)
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 = ...
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 ...
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, ...
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 ...
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(...
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 ...
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 ...
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
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
python-sdk × 29horizon × 6
stellar-sdk × 6
transactions × 5
trustline × 4
accounts × 2
operations × 2
stellar-laboratory × 2
testnet × 2
anchor × 2
xdr × 2
new-developer × 2
stellar-core × 1
assets × 1
javascript-sdk × 1
java-sdk × 1
payments × 1
docker × 1
offer × 1
seed × 1