0

I checked in public.offers from the core database. The sellingasset and buyingasset are base64 encoded.

Here's what I get from database and horizon api:

database

select buyingasset from offers where offerid=147863991;

AAAAAVNMVAAAAAAAlA8rrxQ89pexgEv3wGm0Tu9RxisitWx4ONyNc5Xn7qg=

horizon api

"buying": {
          "asset_type": "credit_alphanum4",
          "asset_code": "SLT",
          "asset_issuer": "GCKA6K5PCQ6PNF5RQBF7PQDJWRHO6UOGFMRLK3DYHDOI244V47XKQ4GP"
        },

Question: how can I decode the XDR string to a readable string like the Horizon API is doing? Hopefully in Python code.

0

get it!

xdrstr='AAAAAVNMVAAAAAAAlA8rrxQ89pexgEv3wGm0Tu9RxisitWx4ONyNc5Xn7qg='

tx_result = Xdr.StellarXDRUnpacker(base64.b64decode(xdrstr)).unpack_Asset()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.