2024-04-29 13:20:24 发布
网友
我试过emcpow2的pyblockchain包。但这个包似乎只是返回标题信息。我真正需要的是事务脚本和地址。如图所示,没有事务脚本方法
是否有其他方法enter image description here来解析blkxxxxx.dat文件,或者我是否错误地使用了此包
提前谢谢
只需解析为:
for transaction in block.transactions: for output in transaction.outputs: for addr in output.addresses: print(addr.address)
不建议直接读取二进制文件,因为二进制格式应该有所更改
或者,请使用REST API
$ curl http://localhost:8332/rest/blockhashbyheight/1.json $ curl http://localhost:8332/rest/block/00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048.json
只需解析为:
不建议直接读取二进制文件,因为二进制格式应该有所更改
或者,请使用REST API
相关问题 更多 >
编程相关推荐