In Solana your identity is your keypair. A keypair is generated to sign your transactions. You could either generate and manage the keypair yourself, or use a wallet application that manages it for you.
A keypair is a pair of cryptographic keys. A public key (your wallet address) and a secret private key. Both keys are 32-bytes, so the keypair is 64-bytes total.
Creating a keypair manually
Generate via Solana CLI, using the generateKeyPairSigner function from @solana/kit library. After the keypair is generated, it is stored in a JSON file in your local.
Wallet applications
You can also create a wallet on an application such as Phantom or Solflare. These applications act as the interface between users and blockchain networks, generating, storing, and using private keys to sign transactions. They allow users to hold "non-custodial" control over their assets, with common types including mobile apps, browser extensions, and hardware devices.
Types of Keypair Management
- Non-Custodial (Self-Custody) Wallets: The user has total control over their private keys and recovery phrase.
- Custodial Wallets: A third party (e.g., an exchange) manages the private keys on behalf of the user, offering better recovery options but less control.
- Hardware Wallets (Cold Storage): Physical, offline devices used to store private keys securely, immune to online hacks.
- Software Wallets (Hot Wallets): Apps or browser extensions connected to the internet, designed for convenient, frequent transactions.
Security Best Practices
- Never share private keys: Anyone with the private key or seed phrase can take the funds.
- Use Hardware Wallets for Large Holdings: For long-term storage, cold storage offers the highest security.
- Secure Recovery Phrases Offline: Write down seed phrases and store them in a secure, physical location.
- Enable 2FA: For software wallets, two-factor authentication adds an extra layer of security.
Top comments (1)
Great explanation.
Mentioning generateKeyPairSigner function from @solana/kit is a good one.