btcsuite / btcd

An alternative full node bitcoin implementation written in Go (golang)
https://github.com/btcsuite/btcd/blob/master/README.md
ISC License
6.1k stars 2.31k forks source link

rpcclient: no way to set 'verbosity' parameter on GetBlock rpc call #2092

Open Avionic23 opened 6 months ago

joseguru commented 4 months ago

Hey @Avionic23 , I would like to pick up on this issue. Any progress on your end?

joseguru commented 3 months ago

@Avionic23 Just went through the docs and I found GetBlockVerbose function which returns a data structure from the server with information about a block given its hash. I think this should help

Avionic23 commented 3 months ago

Hey @joseguru. Sorry, I was busy, couldn't respond you. There is a possibility to set verbose parameter '3' for block rpc and the response data structure is different from '2' (the input of the transaction includes previous PK script with all related info). I didn't find any related function with '3' verbosity in btcd package, so I implemented it on my own

Avionic23 commented 3 months ago

Screenshot 2024-03-06 at 17 11 19

Avionic23 commented 3 months ago

@joseguru As you can see the '2' parameter is hard-coded in RPC request for GetBlockVerboseTx function. For GetBlockVerbose function the '1' parameter is passed. Also, there is a possibility to pass '3' parameter, but I assume you cannot find that in the documentation.