solana cli 纸质钱包生成不同的公钥
Posted
技术标签:
【中文标题】solana cli 纸质钱包生成不同的公钥【英文标题】:solana cli paper wallets generating a different pubkey 【发布时间】:2022-01-13 07:52:09 【问题描述】:使用 solana cli 创建纸质钱包,然后将助记词运行回 cli 时,我得到了一个完全不同的 pubkey?
我在这里错过了什么?
在这个例子中没有使用密码。
❯ 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
【问题讨论】:
【参考方案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
【讨论】:
以上是关于solana cli 纸质钱包生成不同的公钥的主要内容,如果未能解决你的问题,请参考以下文章