0

Trying to find some way to make that serialization but I do not know if it is possible. I try bdk or bitcoin crates and I am not able to get anything right. I would like that my function would do the following one:

Add as input the txId (8bb6c7d11f1d67c2e5d8163acdf3367a773d8e31eea94e48090a6ceae5986426) and get back the HEX format of the transaction:

02000000000101727aa4315b4008f5507965ca55bd4a9f5a443b18b5961103ff8f5fabfb15d6ba000000001716001472cdc8f1b9f4e7b957a3dad9031611ab5139d143ffffffff03630000000000000017a914b55fa91d62df13a59988a5e6b939e9bb19d2a58187010000000000000017a9146f30d4172b17685939e0c3c1f51129e5535be35d875a2f0f000000000017a914c9a656017460c2b1a9445c62d8b8b816d843a9ff8702483045022100879c613ccdd7d12476b6a50a4afec76268532e0e707db616b1345bdfb2c1ba18022055c90abe522f4a09a8d935bed145a44afa83146c923cd3e3fe562cb6a4cfda500121029d41c6fef894258983254c6b35700b2f0e3254d25f0544535634ee7a66b0c04000000000
RedGrittyBrick
  • 24,039
  • 3
  • 23
  • 47
  • 1
    The problem isn't the serializing, that's easy, but where would the library you're using *get* the transaction data? – Pieter Wuille Aug 21 '23 at 14:00
  • 1
    Ok, I think I see the problem now! (Im still learning the tx creation theory). I cannot go back to the HEX format because the txId that I have, previously it was applied twice sha256 function and now I cannot go back. So, in that case to get the hex string, first I would need to make a query against some node or some API endpoint? – DustInTheSilence Aug 21 '23 at 14:06

0 Answers0