- If you want search transaction with hashes from wallet context you can use:
/account/transfers/all (https://nemproject.github.io/#requesting-transaction-data-for-an-account)
For example:
http://192.3.61.243:7890/account/transfers/all?address=TCUPVQC77TAMH7QKPFP5OT3TLUV4JYRPV6CEGJXW
{“data”:[{“meta”:{“innerHash”:{},“id”:330885,“hash”:{“data”:“3c5d5b4d953be13ae823ece7a8eb6ec660487f52af6f511125c212084b814ba4”},“height”:1686550},“transaction”:{“timeStamp”:112306547,“amount”:500000000,“signature”:“8076ac247152caa088a593df5ad960b4400aa64094711750f5bcb1ace8307c1245f2ef4c696d38533e75256cbdf2f0ceb8141e687b4d2441db5b5876163c8d0a”,“fee”:100000,“recipient”:“TCKLLG2MDSL5LENA7TEE2J3D357HXG3GWO5MPVVR”,“type”:257,“deadline”:112310147,“message”:{“payload”:“676f6f64206c75636b21”,“type”:1},“version”:-1744830463,“signer”:“cba08dd72505e0c6aa0b7521598c7c63ecef72bd48175355f9dd977664e4fcd1”}},{“meta”:{“innerHash”:{},“id”:329991,“hash”:{“data”:“8d9f3fc0df81a934afdeeed0a6067d7a2147f287b8c7722dfcd68400826f2677”},“height”:1684747},“transaction”:{“timeStamp”:112196725,“amount”:1000000,“signature”:“c3fc923aa241e200ee5b95532e42058a927809dd638baf70d7de780551494705a9e1f2c7b288c1587a946554d246bf7207a8e51f2dda7c1ee83a1d1cb5846b0a”,“fee”:50000,“recipient”:“TBXQJ5TLYF27JZUJXAXY2NLUTO5IS46IS3DKSMNI”,“mosaics”:[{“quantity”:30000000,“mosaicId”:{“namespaceId”:“prx”,“name”:“xpx”}}],“type”:257,“deadline”:112200325,“message”:{},“version”:-1744830462,“signer”:“cba08dd72505e0c6aa0b7521598c7c63ecef72bd48175355f9dd977664e4fcd1”}}…
So you have in this way valid transaction hash (http://bob.nem.ninja:8765/#/search/3c5d5b4d953be13ae823ece7a8eb6ec660487f52af6f511125c212084b814ba4)
Response for this call is https://nemproject.github.io/#transactionMetaDataPair
- If you want fetch block hash using public api… Maybe you can call /block/at/public with height+1. In such situation in previousBLockHash you have hash.
So to fetch hash for block 1686550 do:
curl -i -H “Content-Type: application/json” -X POST -d “{height”:“1686551}” http://192.3.61.243:7890/block/at/public
{“timeStamp”:112306682,“signature”:“85ff78f4b26308c60ca8bb5b0ae1031629d25f4afcd11e1f90ec48087242db721dd02f0c50fd30d4aee9219b9983423317515ecb720494775ed7d5a688de630f”,“prevBlockHash”:{“data”:“2077d86763f64204ade1fa72b841e75dac6d7ce0c5f99f3ec667582c51b48adc”},“type”:1,“transactions”:[],“version”:-1744830463,“signer”:“76164494236c9aa3e4731dddfa67f28b4cb0be077690abe52a664302e3e57d24”,“height”:1686551}
http://bob.nem.ninja:8765/#/block/1686550
Of course you need to wait to next block generation.
Not sure if this will be helpful