Blockchain 如何为Nethereum实现web3.eth.getAccounts()的等效功能?

Blockchain 如何为Nethereum实现web3.eth.getAccounts()的等效功能?,blockchain,ethereum,web3,nethereum,Blockchain,Ethereum,Web3,Nethereum,我在js中使用它来提供登录Metamask用户的地址,但我想使用Nethereum来实现。有没有人能告诉我,尼瑟里姆与此相当 var accounts=wait web3.eth.getAccounts();console.log(accounts)对于Nethereum,目前我们没有任何直接支持它可以访问元掩码,因此在netherium中,您只能使用私钥或种子短语访问帐户 像下面这样 var account = new Account(privateKey); var publicAddr

我在js中使用它来提供登录Metamask用户的地址,但我想使用Nethereum来实现。有没有人能告诉我,尼瑟里姆与此相当


var accounts=wait web3.eth.getAccounts();console.log(accounts)

对于Nethereum,目前我们没有任何直接支持它可以访问元掩码,因此在netherium中,您只能使用私钥或种子短语访问帐户

像下面这样

 var account = new Account(privateKey);
 var publicAddressOfTheAboveAccount = account.Address;
如果要使用Nethereum.metamask.Blazor使用metamask访问metamask帐户实例,请选中以下链接


这是不可能的,因为MetaMask只能在web前端(JavaScript/TypeScript)中访问,而.NET不能在web浏览器中运行

为了在服务器端安全地获取用户地址,您需要要求用户使用MetaMask对消息进行签名,然后从消息签名中提取地址