我正试图使用solana keygen创建一个solana钱包,然后检查它的余额用这条线,我创建了带有特殊输出文件的钱包
C:UsersAli Berkin>solana-keygen new --force -o "C:UsersAli BerkinDocumentsSolanatest.json"
它成功地生成了钱包,并向我输出了这个
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):
Wrote new keypair to C:UsersAli BerkinDocumentsSolanatest.json
================================================================================
pubkey: CgvYXNqdVLvNvByFXiSkFGfRC3QFR9SGZq17Bq1bRdht
================================================================================
然后我将这个密钥对保存为我的默认密钥对
C:UsersAli Berkin>solana config set --keypair "C:UsersAli
BerkinDocumentsSolanatest.json"
Config File: C:UsersAli Berkin.configsolanacliconfig.yml
RPC URL: https://metaplex.devnet.rpcpool.com/
WebSocket URL: wss://metaplex.devnet.rpcpool.com/ (computed)
Keypair Path: C:UsersAli BerkinDocumentsSolanatest.json
Commitment: confirmed
最后,当我试图检查我的余额时,它抛出了一个错误,看起来像这个
C:UsersAli Berkin>solana balance
Error: Dynamic program error: No default signer found, run "solana-keygen new -o C:UsersAli BerkinDocumentsSolanatest.json" to create a new one
我已经在C:\Users\Ali Berkin\Documents\Solana\test.json创建了一个密钥对,但错误告诉我要创建一个。有人能帮我吗?
显然是我的用户名上的空格造成了这个问题。我试着用C:\solana打开一个新钱包,现在似乎可以用了。
C:solana>solana-keygen new --force -o "C:solanatest.json"
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):
Wrote new keypair to C:solanatest.json
pubkey: ASgogsZ7WW6uuGQYFX6BwfjwrEytzNJt4f9pVyp9gaaN
C:solana>solana config set --keypair "C:solanatest.json"
Config File: C:UsersAli Berkin.configsolanacliconfig.yml
RPC URL: https://metaplex.devnet.rpcpool.com/
WebSocket URL: wss://metaplex.devnet.rpcpool.com/ (computed)
Keypair Path: C:solanatest.json
Commitment: confirmed
C:solana>solana balance
0 SOL