nimiq / ledger-api

Api for communication with the Ledger Hardware Wallet Nimiq App.
https://nimiq.github.io/ledger-api/
6 stars 2 forks source link

Question: How to get the transaction hex to be used as input when signing Bitcoin transaction #9

Open arceus03 opened 3 years ago

arceus03 commented 3 years ago

I found a bit of description about this "transaction" data, but honestly I'm not sure how to generate it from my input address and previous tx hash and hex. (sorry I'm not much experienced with bitcoin) https://github.com/nimiq/ledger-api/blob/master/src/high-level-api/requests/bitcoin/request-sign-transaction-bitcoin.ts#L19-L21

image

arceus03 commented 3 years ago

@danimoh Can you please help with this?

sisou commented 3 years ago

@arceus03 You need the whole transaction in HEX format. You can get that either from the blockchain via the tx hash that you have, or manually from tools that allow to get the raw transaction, like this one: https://chainquery.com/bitcoin-cli/getrawtransaction