How can I retrieve:
- transaction amount
- source Account
from envelope_xdr using the python sdk?
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
I believe this is the type of functionality you are looking for.
Here is some rough Python Code (just skimmed repo to get something to work and threw this together as POC:
import stellar_base.transaction_envelope as TxEnv import stellar_base.transaction as Tx xdr_object = TxEnv.TransactionEnvelope.from_xdr(INSERT_XDR_HERE).to_xdr_object() tx_object = Tx.Transaction.from_xdr_object(xdr_object) source_account = tx_object.source
TLDR: functionality is all there!