Managing Wallets
Load a Solana Wallet ('Keypair')
Every interaction with the Solana blockchain revolves around a wallet which needs to sign (and pay for) transactions.
A keypair consists of two keys - a 'public key' (or 'pubkey') and a 'secret key'. It is crucial that you keep the secret key secure at all times, as this alone is required to approve any transaction on behalf of the wallet it controls.
You can think of a keypair as analogous to a web2 API key and secret. It is required to be provided as part of requests to demonstrate authorization.
Reload an Existing Wallet
You can reload an existing Keypair using a secret key, which can be stored somewhere (such as in a Secret Manager tool, a .env file or in some other secure local storage) in bytes or in some representation of bytes.
In this example, a Keypair is reloaded from a base58 encoded secret key.
Create a New Wallet
If you do not already have a keypair, it's easy to generate one. If you intend to access this wallet again, just be sure to safely store the secret key for future recall.
Last updated