0

当使用 solana cli 创建纸质钱包然后将种子短语运行回 cli 时,我得到了一个完全不同的 pubkey?

我在这里想念什么?

在此示例中不使用 passphase。

❯ 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): none

===============================================================================
pubkey: 7A5h8N21EtjAnfcf8kxp7Bd7pNtQ5SvoYHLyBwz2796e
===============================================================================
Save this seed phrase and your BIP39 passphrase to recover your new keypair:
animal flock border attitude simple piece firm reason snack isolate siege seven
===============================================================================

~/.config/solana
❯ 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: 
2NW5bHw8dh4rS9wZSPj5u6Xec9tCHEN64PiTPUiy2ms7

4

1 回答 1

1

这在 BIP44 和 BIP39 派生路径之间有点混乱。显示的种子短语animal flock border attitude simple piece firm reason snack isolate siege seven来自遗留派生,因此应与ASK关键字一起使用,而不是prompt://关键字。

如果要恢复预期的公钥,则必须运行:

$ solana-keygen pubkey ASK

在文档这部分的底部找到更多信息:https ://docs.solana.com/wallet-guide/paper-wallet#public-key-derivation

于 2021-12-08T13:09:07.063 回答