Skip to content

Conversation

@chasefleming
Copy link
Member

@chasefleming chasefleming commented Jan 7, 2026

Adds a new command to extract inline private keys from flow.json into separate
.pkey files for improved security.

Usage

flow config extract-key <account-name>  # Extract a specific account
flow config extract-key --all           # Extract all accounts with inline keys
flow config extract-key                 # Interactive selection

What it does

  • Converts accounts from inline hex key format
    ("key": "0xdeadbeef...")
    to file-based format
    ("key": { "type": "file", "location": "./account.pkey" })

  • Automatically adds key files to .gitignore and .cursorignore

  • Prevents accidental overwrites if a key file already exists


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 68.05556% with 23 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/config/extract-key.go 67.60% 17 Missing and 6 partials ⚠️

📢 Thoughts on this report? Let us know!

@chasefleming chasefleming added the Feature A new user feature or a new package API label Jan 7, 2026
@chasefleming chasefleming merged commit b2d3c26 into master Jan 7, 2026
10 checks passed
@chasefleming chasefleming deleted the cf/extract-keys branch January 7, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature A new user feature or a new package API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants