作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在运行 solana-keygen 工具,但对其输出感到困惑。我的印象是第一个命令的公钥输出应该与使用第二个命令重新创建的公钥相同。但它们是不同的。第一个代表什么?
C:\Users\MSHIRAZ>solana-keygen new --no-outfile
Generating a new keypair
For added security, enter a BIP39 passphrase
NOTE! This passphrase improves security of the recovery seed phrase NOT the
keypair file itself, which is stored as insecure plain text
BIP39 Passphrase (empty for none):
=========================================================================
pubkey: Gu3nU5cW7W8mZesDUhjaym8e1mbsyUBey8fvhgnq7nMM
=========================================================================
Save this seed phrase and your BIP39 passphrase to recover your new keypair:
motor rate october crawl visa family prison hair annual fault tilt animal
=========================================================================
C:\Users\MSHIRAZ>solana-keygen pubkey prompt://
[pubkey recovery] seed phrase:
[pubkey recovery] If this seed phrase has an associated passphrase, enter it now. Otherwise, press ENTER to continue:
ADarcoVBd5USiMpycBGrhforf2EHqUJTc4YyByC7A8xP
C:\Users\MSHIRAZ>solana-keygen verify ADarcoVBd5USiMpycBGrhforf2EHqUJTc4YyByC7A8xP prompt://
[pubkey recovery] seed phrase:
[pubkey recovery] If this seed phrase has an associated passphrase, enter it now. Otherwise, press ENTER to continue:
Verification for public key: ADarcoVBd5USiMpycBGrhforf2EHqUJTc4YyByC7A8xP: Success
最佳答案
create 上打印的公钥是原始的 ed25519 key 对公钥,而 solana-keygen pubkey prompt://
在 m/44'/501' 打印公钥。
如果您运行 solana-keygen pubkey ASK
它应该打印原始公钥
目前有一个开放的 PR 来更新 CLI,但现在您可以按照上述方法进行操作。
https://github.com/solana-labs/solana/issues/17325#issuecomment-844317674
关于Solana key 生成公钥不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68309435/
我是一名优秀的程序员,十分优秀!