Hi friends,.
I’m trying to do a simple thing. After a deposit
or close
call in a Channel I would like to track the number of confirmations onchain. I know those methods receive a callback function where I can get -if successful- the posted TX.
I’m properly getting this information, for example, in triggering a close. But I tried to use getTxInfo
with that returned object and 404 resulted. Inspecting with more detail, I realized that I need the hash of the transaction, not the TX object itself.
In the “API usage” for Channels I see, in fact:
Tracking the progress of the onchain transaction
After calculating the hash of the mutually authenticated
channel_close_mutual_tx
parties can track its progress as they would do with any on-chain transactioncurl 'http://127.0.0.1:3013/v2/transactions/th_2qkN973cNJiejXVJoXkXbttf1iKetWJCSY1W5VUBh3pnRS1kCC'
if the
block_hash
isnone
- then the transaction is still in the mempool.
How I can get/calculate that hash? Thanks.