I am trying to send a transaction via http call without Horizon. Here is the tx information

http://localhost:11626/tx?blob=QUFBQUFINHhLV3NXalNsUWRHeFM0QWNWdmdDUGlzenZReWVabjQwWGdlQVVrNmtlQUFBQVpBQUFBQUFBQUFBQkFBQUFBQUFBQUFBQUFBQUJBQUFBQVFBQUFBQitNU2xyRm8wcFVIUnNVdUFIRmI0QWo0ck03ME1ubVorTkY0SGdGSk9wSGdBQUFBQUFBQUFBMDEzQllJallsQ0g2MWxSaU96TDRpS3ZBVitJQXNUa2dLQklIa0tsa2dad0FBQUFBZHpXVUFBQUFBQUFBQUFBQkZKT3BIZ0FBQUVDY1M2NGJPL1RGM1NESndKY2o4QmtaTFcxTFdKUWJTcVY3RUk2K3YxbzFaRlY2bzYwOUI5S1FXU0txb3lIRmlVSGJHdmJqZG5NTUo0YU1mbzAyYlk4Tw==

but I am getting error:

{"exception": "bad value of type in PublicKey"}

I tried to debug the code. It is throwing this error in this line xdr::xdr_from_opaque(binBlob, envelope); which I am not sure what it is.

TIA!


Edit:

I am using custom network.

up vote 1 down vote accepted

There are a few ways to debug it, my samples are in python, but use whatever suits you.

View your TX in the stellar laboratory

Base64 decode your blob:

>>> from base64 import b64decode
>>> b64decode('QUFBQUFINHhLV3NXalNsUWRHeFM0QWNWdmdDUGlzenZReWVabjQwWGdlQVVrNmtlQUFBQVpBQUFBQUFBQUFBQkFBQUFBQUFBQUFBQUFBQUJBQUFBQVFBQUFBQitNU2xyRm8wcFVIUnNVdUFIRmI0QWo0ck03ME1ubVorTkY0SGdGSk9wSGdBQUFBQUFBQUFBMDEzQllJallsQ0g2MWxSaU96TDRpS3ZBVitJQXNUa2dLQklIa0tsa2dad0FBQUFBZHpXVUFBQUFBQUFBQUFBQkZKT3BIZ0FBQUVDY1M2NGJPL1RGM1NESndKY2o4QmtaTFcxTFdKUWJTcVY3RUk2K3YxbzFaRlY2bzYwOUI5S1FXU0txb3lIRmlVSGJHdmJqZG5NTUo0YU1mbzAyYlk4Tw==')
b'AAAAAH4xKWsWjSlQdGxS4AcVvgCPiszvQyeZn40XgeAUk6keAAAAZAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAB+MSlrFo0pUHRsUuAHFb4Aj4rM70MnmZ+NF4HgFJOpHgAAAAAAAAAA013BYIjYlCH61lRiOzL4iKvAV+IAsTkgKBIHkKlkgZwAAAAAdzWUAAAAAAAAAAABFJOpHgAAAECcS64bO/TF3SDJwJcj8BkZLW1LWJQbSqV7EI6+v1o1ZFV6o609B9KQWSKqoyHFiUHbGvbjdnMMJ4aMfo02bY8O'

Take it to the lab.

Note that there is a problem with the signature.

Fire your TX to horizon to get a better error

>>> from stellar_base.builder import Builder
>>> b = Builder(address='GB7DCKLLC2GSSUDUNRJOABYVXYAI7CWM55BSPGM7RULYDYAUSOUR4WA4')
>>> b.import_from_xdr('AAAAAH4xKWsWjSlQdGxS4AcVvgCPiszvQyeZn40XgeAUk6keAAAAZAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAB+MSlrFo0pUHRsUuAHFb4Aj4rM70MnmZ+NF4HgFJOpHgAAAAAAAAAA013BYIjYlCH61lRiOzL4iKvAV+IAsTkgKBIHkKlkgZwAAAAAdzWUAAAAAAAAAAABFJOpHgAAAECcS64bO/TF3SDJwJcj8BkZLW1LWJQbSqV7EI6+v1o1ZFV6o609B9KQWSKqoyHFiUHbGvbjdnMMJ4aMfo02bY8O')
>>> b.submit()

Check the output - the problem in question is 'result_codes': {'transaction': 'tx_bad_seq'} - you'd run into this once you fixed your signature problem - bumb up the sequence.

  • thanks for the reply. Sorry forgot to mention in my question that, I am using custom network not test or public. I think you have checked in the test/public network that is why you've got bad_seq error. For me every thing seems to be correct in laboratory. but still throwing error when called stellar-core. :( – Vishwas Bhushan Dec 5 at 6:22
  • 1
    Closing this question as I figured out this happened because of build problem. and accepting this answer as well. – Vishwas Bhushan Dec 6 at 5:11

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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