gpt4 book ai didi

Solana key 生成公钥不匹配

转载 作者:行者123 更新时间:2023-12-04 14:54:43 25 4
gpt4 key购买 nike

我正在运行 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/

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