Stellar Keys
This guide walks you through generating, inspecting, and removing a Stellar identity using the CLI.
1. Generate a New Identity
Run the following command to create a new keypair and save it under the alias named carol:
stellar keys generate carol
Output:
✅ Key saved with alias carol in ".config/soroban/identity/carol.toml"
The CLI stores this identity in a TOML file.
2. Verify the Identity File
Navigate to the configuration directory and list the contents:
cd .config/soroban/identity && ls
Output:
carol.toml
The file carol.toml contains the seed phrase for your identity.
3. View the Seed Phrase
cat carol.toml
Output:
seed_phrase = "patrol clean public grocery roof aim have valve cherry dismiss lunar tail duty license capable little version banana amount often cover dice couple party"
Note: The seed phrase is sensitive information. Handle it with care and never expose it publicly.
4. Derive the Secret Key
To display the secret key for the carol identity:
stellar keys secret carol
Output:
SCJP663VYFZPYN75H2DYJA3FYUBP5UR23HZ4ZDHDMDY6TXVYUYMWNKTI
Note: The secret key is sensitive information. Handle it with care and never expose it publicly.
5. Derive the Public Key
To display the corresponding public key for the carol identity:
stellar keys public-key carol
Output:
GD3BFFX7DTNJAGDVVM5RYGGQQNURZTH4VSBLWF55YXY3L6T2WWZK57EI
This is the public address of your key.
6. Fund this account
stellar keys fund carol
Output:
✅ Account carol funded on "Test SDF Network ; September 2015"
You can also fund the account while creating the key by using stellar keys generate --fund.
7. Remove the Identity
When you no longer need this identity, remove it using:
stellar keys rm carol --force
Output:
ℹ️ Removing the key's cli config file
At this point, the identity file carol.toml is deleted, and the alias is no longer available in the CLI.
Guides in this category:
Asset Management
Issue a Stellar Asset, deploy it's contract, and mint, burn, freeze, and clawback.
Add meta data to contract WASM on build
Include meta data in the contract WASM byte code on build
Contract Invoke: Argument Types
How to pass each argument type when invoking a Stellar smart contract using the CLI
Contract Lifecycle
Manage the lifecycle of a Stellar smart contract using the CLI
Deploy a contract from uploaded Wasm bytecode
Deploy an instance of a compiled contract that has already been uploaded on the network
Deploy the Stellar Asset Contract for a Stellar asset
Deploy an SAC for a Stellar asset so that it can interact with smart contracts
Extend a deployed contract instance's TTL
Use the CLI to extend the time to live (TTL) of a contract instance
Extend a deployed contract's storage entry TTL
Use the CLI to extend the time to live (TTL) of a contract's persistent storage entry
Extend a deployed contract's Wasm code TTL
Use Stellar CLI to extend contract's Wasm bytecode TTL, with or without local binary
Payments and Assets
Send XLM, stellar classic, or a soroban asset using the Stellar CLI
Restore an archived contract using the Stellar CLI
Restore an archived contract instance using the Stellar CLI
Restore archived contract data using the Stellar CLI
Restore archived contract storage entries using Stellar CLI
Stellar Keys
Manage stellar keys
Create Claimable Balance
Create claimable balances with various claim predicates using the Stellar CLI
tx Commands
Create stellar transactions using the Stellar CLI
tx op add
Create stellar transactions using the Stellar CLI
tx sign and tx send
Create stellar transactions using the Stellar CLI
Upload and deploy a smart contract
Combine the upload and deploy commands in the Stellar CLI to accomplish both tasks
Upload Wasm bytecode
Use the Stellar CLI to upload a compiled smart contract on the ledger