繁体   English   中英

如何解析 Nethereum 中的签名交易?

[英]How to parse a signed transaction in Nethereum?

所以我使用TransactionSigner.SignTransaction(...)进行了交易,并将其存储以备将来参考。 我如何解析它以获取公钥/源钱包地址、目标地址、nonce 和 Wei 中的金额?

我尝试在 GitHub 存储库中搜索Parse方法,但没有找到交易。

您将需要使用 Nethereum.Signer.TransactionFactory, https://github.com/Nethereum/Nethereum/blob/master/src/Nethereum.Signer/TransactionFactory.cs

TransactionFactory 根据 RLP 检查交易的签名方式(使用 ChainId 或默认的)。

根据签署的方式,您将返回一个交易https://github.com/Nethereum/Nethereum/blob/master/src/Nethereum.Signer/Transaction.cs或 TransactionChainId https://github.com/Nethereum /Nethereum/blob/master/src/Nethereum.Signer/TransactionChainId.cs

PS 感谢您在 Nethereum gitter 中引用这个问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM