How to get the original transaction info from the data of RequestAnnounce?

Hi,
Now I’ using the api “/transaction/announce” to send transaction to the NIS network. If I want to get the original transaction metadata from RequestAnnounce json object, do you know the which methods(or apis) should I use?

Besides, if we get the transactionHash after using the api “/transaction/announce”, is there some way to get the original transaction info like the Block Explorers “http://chain.nem.ninja/#/search/transactionHash”?

It’s possible to get transaction by hash.
/transaction/get?hash=
This api call is depends on hash retention configured in config.properties. By default only hashes which in 36hours will be returned.

Not sure if this is what you are looking.

@CryptoBeliever
Hi pawelm, I want to get the transaction info before sending the transaction to the NIS network. Like Bitcoin we can use “decoderawtransaction” to decode the transaction info before sending.

RequestAnnounce object has the value data, which is converted from the transaction byte array to hexadecimal string. Do you know the way from data reverse to transaction info?

In nanowallet code you have:

  1. var result = _serialization2.default.serializeTransaction(entity);
  2. var signature = kp.sign(result);
  3. var obj = {
  4. ‘data’: _convert2.default.ua2hex(result),
  5. ‘signature’: signature.toString()
  6. };

I guess you doing pretty same in your code. So you have entity (transaction data) before serialization.
If you want decrypt data from line4 it’s necessary to have two methods _convert2.default.hex2ua and deserializeTransaction. First one is available in js library, I don’t see the second one. Looks like no one needed it. For sure it must be present on node side to deserialize transaction.