Solana CLI工具使用
安装CLI
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
downloading stable installer
stable commit 20a8749 initialized
Adding
export PATH="/home/surou/.local/share/solana/install/active_release/bin:$PATH" to /home/surou/.profile
根据返回信息,添加path
export PATH="/home/surou/.local/share/solana/install/active_release/bin:$PATH" to /home/surou/.profile
测试查看版本
solana --version
创建钱包
solana-keygen new
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 /home/surou/.config/solana/id.json
=================================================================================
pubkey: Aq46qVyLKFWWCCu7EpSfmMQ5YEYH31o78UJFqPmTDwvF
=================================================================================
Save this seed phrase and your BIP39 passphrase to recover your new keypair:
tourist useful danger situate sadness sentence answer know guilt paper merry draw
=================================================================================
为Aq46qVyLKFWWCCu7EpSfmMQ5YEYH31o78UJFqPmTDwvF当前钱包地址转一些SOL
当前keypair路径为:/home/surou/.config/solana/id.json
测试转账
solana transfer --from /home/surou/.config/solana/id.json FwybPcg9rMjYcyM5kJSzeDrdtTebch6WdV7k1vzCC6Wq 0.5 --allow-unfunded-recipient --url https://api.devnet.solana.io --fee-payer /home/surou/.config/solana/id.json
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »