Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't submit offline signed transaction to my ripple node #8

Open
skinderis opened this issue Feb 26, 2019 · 3 comments
Open

Can't submit offline signed transaction to my ripple node #8

skinderis opened this issue Feb 26, 2019 · 3 comments

Comments

@skinderis
Copy link

skinderis commented Feb 26, 2019

I am testing transaction submitting operations with my ripple testnet node, but I can't submit offline signed transaction to my testnet node. Firstly I prepare some transaction data:

{ 'Account': 'rU6sW4Vp8FFeoobZaxMpbDYuCkJyVG8DMf', 'Amount': '12345599', 'Destination': 'rw47Lr3B1hFvTC2vXFBb6nyZGjntKGDNPf', 'TransactionType': 'Payment', 'Sequence': 1, 'Fee': '12' }

Then call sign_transaction(tx, secret_key) method. It returns:

{'Account': 'rU6sW4Vp8FFeoobZaxMpbDYuCkJyVG8DMf', 'Amount': '12345599', 'Destination': 'rw47Lr3B1hFvTC2vXFBb6nyZGjntKGDNPf', 'TransactionType': 'Payment', 'Sequence': 1, 'Fee': '12', 'Flags': 2147483648, 'SigningPubKey': '02A1E296BFBF7F06DF12F0D093AE350FCB1766A16BF1042F870F6B46BBEBB4EA4C', 'TxnSignature': '3044022047C37B978457D653911EF9A55F537AEDAADE434C7EE80B090D50911CCC7BC6950220512530903CF534638C86A1DEDE630D9D6C24D17A99559860B9E5925644182D6D' }

After I get TxnSignature value, I call Ripple RPC method submit and provide tx_blob with TxnSignature value:

'{ "method": "submit", "params": [{ "tx_blob": "3044022001069CB1E37DFF7EE5735686E3B8B71E5A85452E0C8794B23813523F3F8515C70220503D1B2A31AAC319241D003813A9F9AF2BD2C722C5FD8A1D9547900A8057C9AD" }] }'

The result is this error:

{'result': {'error': 'invalidTransaction', 'error_exception': 'Non-object in array', 'request': {'command': 'submit', 'tx_blob': '3044022001069CB1E37DFF7EE5735686E3B8B71E5A85452E0C8794B23813523F3F8515C70220503D1B2A31AAC319241D003813A9F9AF2BD2C722C5FD8A1D9547900A8057C9AD'}, 'status': 'error'}}

What I do wrong? And how can I fix this problem? Thank you for you help very much!

@skinderis
Copy link
Author

@miracle2k maybe you have some ideas?

@skinderis skinderis changed the title Can submit offline signed transaction to my ripple node Can't submit offline signed transaction to my ripple node Feb 26, 2019
@skinderis
Copy link
Author

UPDATE: I found out, that tx_blob is not TxnSignature. But gotta find out how to get tx_blob value when I have TxnSignature and SigningPubKey values.

@skinderis
Copy link
Author

SOLVED:

from ripple.serialize import serialize_object
tx_blob = serialize_object(tx)

serialize_object method returns tx_blob value which can be passed to Ripple submit RPC method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant