问题描述
你好团队
您能指导我使用ethereumjs-wallet在区块链上创建帐户的方法吗?
Can you please guide me a way through to create an account on the blockchain using ethereumjs-wallet?
var 帐户= wallet.generate(); var accountAddress = account.getAddressString() var privateKey = account.getPrivateKey();
var account = wallet.generate(); var accountAddress = account.getAddressString() var privateKey = account.getPrivateKey();
以上内容似乎并不是在区块链上创建的.
The above doesn't seems to be creating them on the blockchain.
推荐答案
如果您希望保留创建的公用/专用密钥对以供以后检索,建议将它们脱链存储在类似于DApp可以轻松访问的Azure SQL数据库中.
If you wish to persist the created public/private key pairings to be retrieved later, I would suggest storing them off-chain in something akin to an Azure SQL database that your DApp can readily access.
如果您确实希望将这些帐户保留在链上,则可以创建一个智能合约来管理它们,尽管这样做并不一定会带来好处.
If you truly wish to have these accounts persisted on-chain you could created a Smart Contract(s) to manage them, though I don't necessarily see a benefit to doing so.
这篇关于在Azure POA网络上创建帐户.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!