gpt4 book ai didi

Sign Message Netherium(手语Netherium)

转载 作者:bug小助手 更新时间:2023-10-26 20:17:14 24 4
gpt4 key购买 nike



I'm trying to get a signature using the Netherium c# library, no errors occur, but the signature is incorrect

我正在尝试使用Netherium c#库获取签名,没有出现错误,但签名不正确


The code I use

我使用的代码


string privateKey = "privateKey";
string dataToSign = @"Welcome
name";
string rpc = "https://1rpc.io/eth";

var web3 = new Web3(rpc);

var signer = new EthereumMessageSigner();
string signature = signer.EncodeUTF8AndSign(dataToSign, new EthECKey(privateKey));
Console.Writeline(signature);


when checking the signature it gives another wallet
https://etherscan.io/verifiedSignatures#

当检查签名时,它给出另一个钱包https://etherscan.io/verifiedSignatures#


更多回答
优秀答案推荐

I figured it out when you enter text in the format

当你在格式中输入文本时,我就知道了


string str = @"str1
str2";

She perceives it as str1\n\r and not str1\nstr2 as in js
Solve str.Replace("\r\n", "\n");

她将其视为str1\n\r,而不是js solve str.Replace(“\r\n”,“\n”)中的str1\nstr2;


更多回答

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com