From 45e67680b9c6f85787ddf12786c560243f6d1541 Mon Sep 17 00:00:00 2001 From: Jane Wang Date: Thu, 2 Oct 2025 09:57:29 -0400 Subject: [PATCH 1/8] Create stellar-keys.mdx --- cookbook/stellar-keys.mdx | 104 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 cookbook/stellar-keys.mdx diff --git a/cookbook/stellar-keys.mdx b/cookbook/stellar-keys.mdx new file mode 100644 index 0000000000..354cf6d06e --- /dev/null +++ b/cookbook/stellar-keys.mdx @@ -0,0 +1,104 @@ +--- +title: Stellar Keys +hide_table_of_contents: true +description: Manage stellar keys +custom_edit_url: https://github.com/stellar/stellar-cli/edit/main/cookbook/stellar-keys.mdx +--- + + +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 `test`: + +```bash +stellar keys generate test +``` + + +Output: +``` +✅ Key saved with alias test in ".config/soroban/identity/test.toml" +``` + +The CLI stores this identity in a TOML file. + + +### 2. Verify the Identity File + +Navigate to the configuration directory and list the contents: + +```bash +cd .config/soroban/identity && ls +``` + +Output: +``` +test.toml +``` + +The file test.toml contains the seed phrase for your identity. + + +### 3. View the Seed Phrase +``` +vim test.toml +``` +Inside, you will see the seed phrase associated with your identity. + + +### 4. Derive the Secret Key + +To display the secret key for the test identity: + +```bash +stellar keys secret test +``` + +Example 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 test identity: +```bash +stellar keys public-key test +``` + +Example output: +``` +GD3BFFX7DTNJAGDVVM5RYGGQQNURZTH4VSBLWF55YXY3L6T2WWZK57EI +``` +This is the public address of your key. + + +### 6. Fund this account + +```bash +stellar keys fund test +``` + +Example output: +``` +✅ Account test funded on "Test SDF Network ; September 2015" +``` + + +### 7. Remove the Identity + +When you no longer need this identity, remove it using: +``` +stellar keys rm test +``` + +Output: +``` +ℹ️ Removing the key's cli config file +``` + +At this point, the identity file test.toml is deleted, and the alias is no longer available in the CLI. From f4c6f56051b389dd7dac02b4e171005812f4bbd3 Mon Sep 17 00:00:00 2001 From: Jane Wang Date: Thu, 2 Oct 2025 14:57:46 -0400 Subject: [PATCH 2/8] Update stellar-keys.mdx --- cookbook/stellar-keys.mdx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cookbook/stellar-keys.mdx b/cookbook/stellar-keys.mdx index 354cf6d06e..3ea585eb4c 100644 --- a/cookbook/stellar-keys.mdx +++ b/cookbook/stellar-keys.mdx @@ -43,10 +43,13 @@ The file test.toml contains the seed phrase for your identity. ### 3. View the Seed Phrase ``` -vim test.toml +cat test.toml ``` -Inside, you will see the seed phrase associated with your identity. +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" +``` ### 4. Derive the Secret Key From 185e0ba20ce54bec15062199cbef69a568f7ddcf Mon Sep 17 00:00:00 2001 From: Jane Wang Date: Thu, 2 Oct 2025 14:58:39 -0400 Subject: [PATCH 3/8] Update stellar-keys.mdx --- cookbook/stellar-keys.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cookbook/stellar-keys.mdx b/cookbook/stellar-keys.mdx index 3ea585eb4c..4f77b481c3 100644 --- a/cookbook/stellar-keys.mdx +++ b/cookbook/stellar-keys.mdx @@ -50,6 +50,7 @@ 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 @@ -59,7 +60,7 @@ To display the secret key for the test identity: stellar keys secret test ``` -Example output: +Output: ``` SCJP663VYFZPYN75H2DYJA3FYUBP5UR23HZ4ZDHDMDY6TXVYUYMWNKTI ``` @@ -73,7 +74,7 @@ To display the corresponding public key for the test identity: stellar keys public-key test ``` -Example output: +Output: ``` GD3BFFX7DTNJAGDVVM5RYGGQQNURZTH4VSBLWF55YXY3L6T2WWZK57EI ``` @@ -86,7 +87,7 @@ This is the public address of your key. stellar keys fund test ``` -Example output: +Output: ``` ✅ Account test funded on "Test SDF Network ; September 2015" ``` From 2259d1a7dc0565891c9f766392426cfc4782e4ec Mon Sep 17 00:00:00 2001 From: Jane Wang Date: Wed, 8 Oct 2025 16:51:48 -0400 Subject: [PATCH 4/8] Run make fmt --- cookbook/stellar-keys.mdx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/cookbook/stellar-keys.mdx b/cookbook/stellar-keys.mdx index 4f77b481c3..c068303ca3 100644 --- a/cookbook/stellar-keys.mdx +++ b/cookbook/stellar-keys.mdx @@ -5,7 +5,6 @@ description: Manage stellar keys custom_edit_url: https://github.com/stellar/stellar-cli/edit/main/cookbook/stellar-keys.mdx --- - This guide walks you through generating, inspecting, and removing a Stellar identity using the CLI. ### 1. Generate a New Identity @@ -16,15 +15,14 @@ Run the following command to create a new keypair and save it under the alias na stellar keys generate test ``` - Output: + ``` ✅ Key saved with alias test in ".config/soroban/identity/test.toml" ``` The CLI stores this identity in a TOML file. - ### 2. Verify the Identity File Navigate to the configuration directory and list the contents: @@ -34,22 +32,25 @@ cd .config/soroban/identity && ls ``` Output: + ``` test.toml ``` The file test.toml contains the seed phrase for your identity. - ### 3. View the Seed Phrase + ``` cat test.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 @@ -61,25 +62,28 @@ stellar keys secret test ``` Output: + ``` SCJP663VYFZPYN75H2DYJA3FYUBP5UR23HZ4ZDHDMDY6TXVYUYMWNKTI ``` -Note: The secret key is sensitive information. Handle it with care and never expose it publicly. +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 test identity: + ```bash stellar keys public-key test ``` Output: + ``` GD3BFFX7DTNJAGDVVM5RYGGQQNURZTH4VSBLWF55YXY3L6T2WWZK57EI ``` -This is the public address of your key. +This is the public address of your key. ### 6. Fund this account @@ -88,19 +92,21 @@ stellar keys fund test ``` Output: + ``` ✅ Account test funded on "Test SDF Network ; September 2015" ``` - ### 7. Remove the Identity When you no longer need this identity, remove it using: + ``` stellar keys rm test ``` Output: + ``` ℹ️ Removing the key's cli config file ``` From f4cb3b0dd1dbfb760a894f496fb1bdc190333635 Mon Sep 17 00:00:00 2001 From: Jane Wang Date: Wed, 8 Oct 2025 17:27:29 -0400 Subject: [PATCH 5/8] Replace test identity with carol identity --- cookbook/stellar-keys.mdx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cookbook/stellar-keys.mdx b/cookbook/stellar-keys.mdx index c068303ca3..72c33cd6b8 100644 --- a/cookbook/stellar-keys.mdx +++ b/cookbook/stellar-keys.mdx @@ -9,16 +9,16 @@ This guide walks you through generating, inspecting, and removing a Stellar iden ### 1. Generate a New Identity -Run the following command to create a new keypair and save it under the alias named `test`: +Run the following command to create a new keypair and save it under the alias named `carol`: ```bash -stellar keys generate test +stellar keys generate carol ``` Output: ``` -✅ Key saved with alias test in ".config/soroban/identity/test.toml" +✅ Key saved with alias carol in ".config/soroban/identity/carol.toml" ``` The CLI stores this identity in a TOML file. @@ -34,15 +34,15 @@ cd .config/soroban/identity && ls Output: ``` -test.toml +carol.toml ``` -The file test.toml contains the seed phrase for your identity. +The file carol.toml contains the seed phrase for your identity. ### 3. View the Seed Phrase ``` -cat test.toml +cat carol.toml ``` Output: @@ -55,10 +55,10 @@ Note: The seed phrase is sensitive information. Handle it with care and never ex ### 4. Derive the Secret Key -To display the secret key for the test identity: +To display the secret key for the carol identity: ```bash -stellar keys secret test +stellar keys secret carol ``` Output: @@ -71,10 +71,10 @@ Note: The secret key is sensitive information. Handle it with care and never exp ### 5. Derive the Public Key -To display the corresponding public key for the test identity: +To display the corresponding public key for the carol identity: -```bash -stellar keys public-key test +```bas +stellar keys public-key carol ``` Output: @@ -88,13 +88,13 @@ This is the public address of your key. ### 6. Fund this account ```bash -stellar keys fund test +stellar keys fund carol ``` Output: ``` -✅ Account test funded on "Test SDF Network ; September 2015" +✅ Account carol funded on "Test SDF Network ; September 2015" ``` ### 7. Remove the Identity @@ -102,7 +102,7 @@ Output: When you no longer need this identity, remove it using: ``` -stellar keys rm test +stellar keys rm carol ``` Output: @@ -111,4 +111,4 @@ Output: ℹ️ Removing the key's cli config file ``` -At this point, the identity file test.toml is deleted, and the alias is no longer available in the CLI. +At this point, the identity file carol.toml is deleted, and the alias is no longer available in the CLI. From aba531d13fa74a66689bb4b99210aca3ee56d0cf Mon Sep 17 00:00:00 2001 From: Jane Wang Date: Thu, 9 Oct 2025 10:57:11 -0400 Subject: [PATCH 6/8] Add suggested changes --- cookbook/stellar-keys.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cookbook/stellar-keys.mdx b/cookbook/stellar-keys.mdx index 72c33cd6b8..6645f87ab2 100644 --- a/cookbook/stellar-keys.mdx +++ b/cookbook/stellar-keys.mdx @@ -27,7 +27,7 @@ The CLI stores this identity in a TOML file. Navigate to the configuration directory and list the contents: -```bash +```bash cookbooktest.ignore cd .config/soroban/identity && ls ``` @@ -41,7 +41,7 @@ The file carol.toml contains the seed phrase for your identity. ### 3. View the Seed Phrase -``` +```bash cookbooktest.ignore cat carol.toml ``` @@ -73,7 +73,7 @@ Note: The secret key is sensitive information. Handle it with care and never exp To display the corresponding public key for the carol identity: -```bas +```bash stellar keys public-key carol ``` @@ -101,7 +101,7 @@ Output: When you no longer need this identity, remove it using: -``` +```bash stellar keys rm carol ``` From 840ecbbc525ddd668caf2063be32228fa1b71d7f Mon Sep 17 00:00:00 2001 From: Jane Wang Date: Thu, 9 Oct 2025 11:00:48 -0400 Subject: [PATCH 7/8] Update cookbook/stellar-keys.mdx Co-authored-by: Elliot Voris From 412dbfba3b4a3691d26fe050e7c453136c0c63cc Mon Sep 17 00:00:00 2001 From: Jane Wang Date: Fri, 10 Oct 2025 13:56:38 -0400 Subject: [PATCH 8/8] Add suggested changes --- cookbook/stellar-keys.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cookbook/stellar-keys.mdx b/cookbook/stellar-keys.mdx index 6645f87ab2..bccf61bef3 100644 --- a/cookbook/stellar-keys.mdx +++ b/cookbook/stellar-keys.mdx @@ -51,8 +51,12 @@ 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" ``` +:::danger + 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: @@ -67,8 +71,12 @@ Output: SCJP663VYFZPYN75H2DYJA3FYUBP5UR23HZ4ZDHDMDY6TXVYUYMWNKTI ``` +:::danger + 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: @@ -97,6 +105,8 @@ 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: