I hate asking for help in this manner, but am frustrated beyond belief now. Does anyone have any example code of how to create and sign a bitcoin transaction in Rust? I don't care which crate, I just need it to work.
Don't get me wrong, I know the bitcoin protocol inside and out, and have developed my own wallet software that creates and signs raw transactions before, but only in PHP. However, I already know me trying to sign a raw tx with the ECDSA secp256k1 curve is also going to be a headache, so would rather just get some crate to do that for me. However, can't seem to find any decent example code on the internet, and Chat GPT is useless when it comes to questions like that.
Is my best bet just to use "createrawtransaction" commany of bitcoin-cli via RPC? I would prefer not to go that route though, and simply want to create and sign a raw tx in Rust. Done this many times in both, Python and PHP but struggling in Rust for some reason.
For example, take previous input of:
And simply send it all, minus fees to: mq2vj6BtNuMyHiniiAGRkWBMXM1s5sfdpN
With the private key: cPf4eE7eFY6XWyQ8YnSaZ7cdcikx5tdqSbdNkpCUrT4jRQz8r6c9
How do I do that in Rust? Any help would be greatly appreciated, as I'm about ready to throw my laptop out the window.