sendrawtransaction rpc接口参数hex,能否转换成交易txid?

℉Nightmare`ヾ 3月前 238

调用sendrawtransaction rpc 接口没txid返回,能否在返回值中加上txid, 或者是否有根据hex是否能转换txid工具?目前的api接口只有根据txid,查找交易详情,能否提供反查接口

最新回复 (2)
全部楼主
  • 0 2

    要自己解析  没有现成的

    nel的thinsdk举例

                ThinNeo.Transaction tran = new Transaction();

                tran.Deserialize(new MemoryStream(ThinNeo.Helper.HexString2Bytes("80000001195876cb34364dc38b730077156c6bc3a7fc570044a66fbfeeea56f71327e8ab0000029b7cffdaa674beae0f930ebe6085af9093e5fe56b34a5c220ccdcf6efc336fc500c65eaf440000000f9a23e06f74cf86b8827a9108ec2e0f89ad956c9b7cffdaa674beae0f930ebe6085af9093e5fe56b34a5c220ccdcf6efc336fc50092e14b5e00000030aab52ad93f6ce17ca07fa88fc191828c58cb71014140915467ecd359684b2dc358024ca750609591aa731a0b309c7fb3cab5cd0836ad3992aa0a24da431f43b68883ea5651d548feb6bd3c8e16376e6e426f91f84c58232103322f35c7819267e721335948d385fae5be66e7ba8c748ac15467dcca0693692dac")));

                var txid =new Hash256(tran.GetHash());

  • ℉Nightmare`ヾ 3月前
    0 3
    好的,谢谢
返回